Neugen FFREAD interface

As mentioned in the past I've made an interface which allows neugen to be configured from an FFREAD card. This works well in MINOS since gminos is also configured with FFREAD. But the interface is general.

Details

FFREAD has a hook FFUSER that allows user code to be called after an FFREAD card is read. FFUSER is called for cards which begin with a *. The interface exploits the FFUSER feature to call neugen configuration routines with arguments also set in the FFREAD file.

Defined FFREAD cards:

The routines are defined by define_n3_ffr_keys which has to be called after initial calls to initialize_configuration and begin_generation. The N3XSEC card doesn't use the FFUSER interface because it needs to be called after all FFREAD cards are read so as to pick up all neugen configuration changes.

Example FFREAD file

*N3CFG 'MODBYRS   ' 2
*N3MOD 'FORMATION_ZONE' 1
*N3MOD 'PIABSORPTION  ' 2
*N3PAR 'FORM_TIME   ' 0.526
N3XSC TRUE

Shortcomings

The interface is a little bit brittle. You'll notice that the length of the input character strings are multiples of 4. Empirically, this seems to be an FFREAD requirement. However, the lengths passed to neugen configuration routines are set equal to internal character buffers (variables chin) in neugen.

The interface is very sensitive to the length of the character string between the quotations (e.g. 'MODBYRS ').

The order of cards is also important since initialize_configuration (and model_choice ?) resets parameters.