20 #ifndef GEOS_MAININTERFACE_GEOSXSTATE_HPP_
21 #define GEOS_MAININTERFACE_GEOSXSTATE_HPP_
37 #if defined( GEOS_USE_CALIPER )
50 namespace dataRepository
56 class FieldSpecificationManager;
57 class FunctionManager;
58 class CommunicationTools;
59 struct CommandLineOptions;
103 explicit GeosxState( std::unique_ptr< CommandLineOptions > && commandLineOptions );
154 GEOS_ERROR_IF( m_commandLineOptions ==
nullptr,
"Not initialized." );
155 return *m_commandLineOptions;
174 GEOS_ERROR_IF( m_problemManager ==
nullptr,
"Not initialized." );
175 return *m_problemManager;
213 {
return m_initTime; }
220 {
return m_runTime; }
228 std::unique_ptr< CommandLineOptions > m_commandLineOptions;
231 std::unique_ptr< conduit::Node > m_rootNode;
234 std::unique_ptr< ProblemManager > m_problemManager;
237 std::unique_ptr< CommunicationTools > m_commTools;
239 #if defined( GEOS_USE_CALIPER )
241 std::unique_ptr< cali::ConfigManager > m_caliperManager;
245 std::chrono::system_clock::duration m_initTime;
248 std::chrono::system_clock::duration m_runTime;
#define GEOS_ERROR_IF(EXP, msg)
Conditionally raise a hard error and terminate the program.
Holds the global GEOSX state. This is a singleton class, no more than one instance exists at at time....
ProblemManager & getProblemManager()
Return the ProblemManager.
State getState() const
Return the current State.
conduit::Node & getRootConduitNode()
Return the root conduit node.
std::chrono::system_clock::duration getRunTime() const
Return the time taken to run the problem.
void run()
Run the simulation.
GeosxState(std::unique_ptr< CommandLineOptions > &&commandLineOptions)
Construct a new state from command line options.
dataRepository::Group & getProblemManagerAsGroup()
Return the ProblemManager but as a dataRepository::Group.
CommunicationTools & getCommunicationTools()
Return the CommunicationTools.
void applyInitialConditions()
Apply initial conditions and if performing a restart overwrites the data repository.
bool initializeDataRepository()
Initialize the Data Repository from the input file.
CommandLineOptions const & getCommandLineOptions()
Return the command line options.
FunctionManager & getFunctionManager()
Return the FunctionManager.
std::chrono::system_clock::duration getInitTime() const
Return the time taken to setup the problem.
FieldSpecificationManager & getFieldSpecificationManager()
Return the FieldSpecificationManager.
This is the class handling the operation flow of the problem being ran in GEOS.
GeosxState & getGlobalState()
Return the current GeosxState.
State
A description of the global state.
@ Node
location is node (like displacements in finite elements)
std::ostream & operator<<(std::ostream &stream, mapBase< K, V, SORTED > const &map)
Stream output operator for map types.
string durationToString(std::chrono::system_clock::duration const duration)
Return a string representing duration in seconds.