36 #include <boost/property_tree/ptree_fwd.hpp>
59 Sim(
const Sim& other) =
delete;
96 void Initialize(
const boost::property_tree::ptree& pt);
109 void Reinitialize(
const boost::property_tree::ptree& p);
121 boost::property_tree::ptree
ToPtree()
const;
128 void TimeSliceGo(
const std::lock_guard<std::mutex>&,
double time_slice, SimPhase phase = SimPhase::NONE);
131 void TimeSliceSetup(
const std::lock_guard<std::mutex>&);
134 void TimeSliceWrapup(
const std::lock_guard<std::mutex>&);
138 bool RandomEngineInitialize(
const boost::property_tree::ptree& pt);
141 bool RandomEngineInitialize(
const SimState& sim_state);
144 bool m_is_stationary;
146 std::string m_project_name;
147 std::string m_run_date;
149 std::mutex m_timestep_mutex;
155 #endif // end_of_include_guard
Core data with mesh, parameters, random engine and time data.
bool IsStationary() const
Core data used during model execution.
Simulator: mesh & parameters, model & algorithms.
Interface of Model Components.
std::string GetRunDate() const
Sim()
Constructor does almost no initialization work (.
Interface of RandomEngine.
virtual ~Sim()
Destructor is virtual (.
std::unique_ptr< TimeSlicer > TimeSlicing()
Return a SimTimeSlicer to proceed through a time step using time slices.
double GetSimTime() const
Namespace for the core simulator.
Interface/Implementation of Subject.
void Initialize(const boost::property_tree::ptree &pt)
Initialize with full configuration (global info, parameters, random engine, mesh) i...
Simulator: mesh & parameters, model & algorithms.
std::string GetProjectName() const
Interface of RandomEngineType.
std::string GetStatusMessage() const
Return a status message (time, steps, cellcount).
Sim & operator=(const Sim &other)
Assignment operator rebuilds copy of mesh.
void Reinitialize(const boost::property_tree::ptree &p)
boost::property_tree::ptree ToPtree() const
Serialize into ptree.
Contains the state of the whole Simulator at a given simulation step.
bool IsAtTermination() const
const boost::property_tree::ptree & GetParameters() const
Subject in Observer pattern.
Timings GetTimings() const
void ResetTimings()
Resets the execution timings.
CoreData & GetCoreData() override final
std::function< std::tuple< SimTimingTraits::CumulativeTimings, bool >(double, SimPhase)> TimeEvolverComponent
Time Evolver component interface.
see the online C++11 documentation
SimState GetState() const
Provide sim state in format suitable for i/o.