Stride Reference Manual  - generated for commit 9643b11
stride::SimController Class Reference

Controls a simulation run initiated with the command line interface (cli). More...

#include <SimController.h>

Inheritance diagram for stride::SimController:
Inheritance graph
Collaboration diagram for stride::SimController:
Collaboration graph

Public Member Functions

 SimController (const boost::property_tree::ptree &config, const std::string &name="SimController")
 Straight initialization. More...
 
void Control ()
 Control the execution of the simulation. More...
 
std::shared_ptr< SimGetSim () const
 Reference the simulator (method used mostly in tests). More...
 

Private Attributes

std::shared_ptr< Simm_simulator
 

Additional Inherited Members

- Protected Member Functions inherited from stride::ControlHelper
 ControlHelper ()
 Empty controller: used as target for delegation. More...
 
void CheckEnv ()
 Check install environment. More...
 
void CheckOutputPrefix ()
 
void InstallLogger ()
 Make the appropriate logger for cli environment and register as stride_logger. More...
 
void LogStartup ()
 Logs info on setup for cli environment to stride_logger. More...
 
void RegisterViewers (std::shared_ptr< SimRunner > runner)
 Register the viewers of the SimRunner. More...
 
void Shutdown ()
 Logs info on setup for cli environment to stride_logger. More...
 
 ControlHelper (const boost::property_tree::ptree &config, std::string name)
 Straight initialization. More...
 
 ~ControlHelper ()
 Simple destructor. More...
 
- Protected Attributes inherited from stride::ControlHelper
boost::property_tree::ptree m_config
 Main configuration for run and sim. More...
 
std::string m_name
 Contoller's name. More...
 
std::string m_output_prefix
 Prefix to output (name prefix or prefix dir) More...
 
util::Stopwatch m_run_clock
 Stopwatch for timing the computation. More...
 
std::shared_ptr< spdlog::logger > m_stride_logger
 General logger. More...
 
bool m_use_install_dirs
 Working dir or install dir mode. More...
 

Detailed Description

Controls a simulation run initiated with the command line interface (cli).

SimController setup functions include (

See also
ControlHelper):
  • checks the OpenMP environment
  • checks the file system environment
  • interprets and executes the ouput prefix
  • intalls a stride logger
The SimController execution:
  • creates a population (
Population)
  • creates a simulation runner (
SimRunner)
  • registers the appropriate viewers
  • runs the simulation

Definition at line 47 of file SimController.h.

Constructor & Destructor Documentation

stride::SimController::SimController ( const boost::property_tree::ptree &  config,
const std::string &  name = "SimController" 
)
explicit

Straight initialization.

Definition at line 35 of file SimController.cpp.

Member Function Documentation

void stride::SimController::Control ( )
std::shared_ptr<Sim> stride::SimController::GetSim ( ) const
inline

Reference the simulator (method used mostly in tests).

Definition at line 57 of file SimController.h.

Member Data Documentation

std::shared_ptr<Sim> stride::SimController::m_simulator
private

Definition at line 57 of file SimController.h.

Referenced by Control().


The documentation for this class was generated from the following files: