Class Model#

Inheritance Relationships#

Base Type#

Class Documentation#

class Model : public BaseModel#

The main SANSMIC model class.

Public Functions

Model()#
Model(string out_prefix)#

Create a new model for the simulation.

Parameters:

out_prefix – the prefix to use for file outputs

void configure(Scenario scen)#

Configure the model with the scenario provided.

void run_sim(void)#

Run the complete model.

int run_stage()#

Run the next stage and all timesteps therein.

Returns:

1 if the stage is complete

int run_step()#

Run the next time step.

Returns:

1 if the stage is complete

int init_stage(void)#

Move on to the next stage.

Returns:

the current stage number

int end_stage()#

End the current stage.

Returns:

1 if the stage is complete

int open_outfiles(bool append = false)#

Open output files and initialize the headers.

Parameters:

append – whether the files should be opened with append, by default false

Returns:

success code

void close_outfiles(void)#

Close the file handles for output files.