GRINS-0.8.0
|
Class to encapsulate initializing and running GRINS Simulation. More...
#include <runner.h>
Public Member Functions | |
Runner (int argc, char *argv[]) | |
Setup input objects. More... | |
~Runner () | |
const GetPot & | get_input_file () const |
const GetPot & | get_command_line () const |
Simulation & | get_simulation () |
const Simulation & | get_simulation () const |
const libMesh::LibMeshInit & | get_libmesh_init () const |
void | init () |
Initialize the Simulation objects. More... | |
void | run () |
Runs the simulation that was setup at construction time. More... | |
Protected Member Functions | |
void | echo_version_info (std::ostream &out, int argc, char *argv[]) |
Echo GRINS, libMesh version info as well as command line. More... | |
std::string | check_and_get_inputfile (int argc, char *argv[], GetPot &command_line) |
Check (and error if not found) and then return GetPot input file name. More... | |
void | check_for_unused_vars (const GetPot &input, bool warning_only) |
Check for any unused variables in GetPot input file. More... | |
Protected Attributes | |
SimulationInitializer | _initializer |
SimulationBuilder | _sim_builder |
GetPot | _command_line |
libMesh::UniquePtr< libMesh::LibMeshInit > | _libmesh_init |
libMesh::UniquePtr< GetPot > | _inputfile |
libMesh::UniquePtr< Simulation > | _simulation |
Private Member Functions | |
Runner () | |
Class to encapsulate initializing and running GRINS Simulation.
This class encapsulates all of the construction, initialization, etc. libMesh and GRINS objects to facilitate easy construction of a GRINS-based program. The user only needs to construct this object, init(), and then run(). Accessors are provided to perform auxillary functions as needed beyond a single Simulation run.
GRINS::Runner::Runner | ( | int | argc, |
char * | argv[] | ||
) |
Setup input objects.
The constructor will only setup input parsing objects and LibMeshInit. The user must call init() to initialize the Simulation objects. This allows the user to use the underlying command line and input file objects to do steps that may be needed before Simulation initialization.
Definition at line 37 of file runner.C.
References _command_line, _inputfile, check_and_get_inputfile(), and echo_version_info().
|
private |
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
Definition at line 74 of file runner.h.
References _libmesh_init.
Referenced by main().
|
inline |
|
inline |
void GRINS::Runner::init | ( | ) |
Initialize the Simulation objects.
Definition at line 53 of file runner.C.
References _command_line, _inputfile, _libmesh_init, _sim_builder, and _simulation.
Referenced by main(), and run().
void GRINS::Runner::run | ( | ) |
Runs the simulation that was setup at construction time.
Definition at line 104 of file runner.C.
References _command_line, _inputfile, _simulation, and check_for_unused_vars().
Referenced by main(), and run().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 100 of file runner.h.
Referenced by get_libmesh_init(), and init().
|
protected |
|
protected |
Definition at line 104 of file runner.h.
Referenced by get_simulation(), init(), and run().