VPTissue Reference Manual
|
Simulator: mesh & parameters, model & algorithms. More...
#include <Sim.h>
Public Member Functions | |
Sim () | |
Constructor does almost no initialization work (. More... | |
Sim (const Sim &other)=delete | |
No copy-constructor. | |
virtual | ~Sim () |
Destructor is virtual (. More... | |
CoreData & | GetCoreData () override final |
const boost::property_tree::ptree & | GetParameters () const |
std::string | GetProjectName () const |
std::string | GetRunDate () const |
int | GetSimStep () const |
double | GetSimTime () const |
SimState | GetState () const |
Provide sim state in format suitable for i/o. | |
std::string | GetStatusMessage () const |
Return a status message (time, steps, cellcount). | |
Timings | GetTimings () const |
void | Initialize (const boost::property_tree::ptree &pt) |
Initialize with full configuration (global info, parameters, random engine, mesh) i.e. More... | |
void | Initialize (const SimState &sim_state) |
Initialize with full configuration (global info, parameters, random engine, mesh).i.e. More... | |
bool | IsAtTermination () const |
bool | IsStationary () const |
Sim & | operator= (const Sim &other) |
Assignment operator rebuilds copy of mesh. | |
void | Reinitialize (const boost::property_tree::ptree &p) |
void | ResetTimings () |
Resets the execution timings. | |
std::unique_ptr< TimeSlicer > | TimeSlicing () |
Return a SimTimeSlicer to proceed through a time step using time slices. | |
void | TimeStep () |
boost::property_tree::ptree | ToPtree () const |
Serialize into ptree. | |
Public Member Functions inherited from SimPT_Sim::SimInterface | |
virtual | ~SimInterface () |
Virtual destructor. | |
Public Member Functions inherited from SimPT_Sim::ClockMan::Timeable<> | |
virtual | ~Timeable () |
Destructor virtual for polymorphic class. | |
Public Member Functions inherited from SimPT_Sim::Util::Subject< SimPT_Sim::Event::SimEvent, std::weak_ptr< const void > > | |
void | Notify (const EventType &) |
void | Register (const U *, CallbackType) |
void | Unregister (const U *) |
void | UnregisterAll () |
Friends | |
class | TimeSlicer |
Make Timeslicer our friend. | |
Additional Inherited Members | |
Public Types inherited from SimPT_Sim::ClockMan::Timeable<> | |
using | Timings = typename ClockTraits< std::chrono::system_clock, typename std::chrono::system_clock::duration >::CumulativeTimings |
Public Types inherited from SimPT_Sim::ClockMan::ClockTraits< std::chrono::system_clock, typename std::chrono::system_clock::duration > | |
using | Clock = std::chrono::system_clock |
Type for clock. | |
using | CumulativeTimings = SimPT_Sim::ClockMan::CumulativeRecords< typename std::chrono::system_clock::duration > |
Records with cumulative timing info. | |
using | Duration = typename std::chrono::system_clock::duration |
Type for time duration units. | |
using | IndividualTimings = SimPT_Sim::ClockMan::IndividualRecords< typename std::chrono::system_clock::duration > |
Records with individual timing info. | |
using | Stopclock = SimPT_Sim::ClockMan::Stopwatch< std::chrono::system_clock > |
Stopwatch to measure time durations. | |
Public Types inherited from SimPT_Sim::Util::Subject< SimPT_Sim::Event::SimEvent, std::weak_ptr< const void > > | |
typedef std::function< void(const EventType &)> | CallbackType |
typedef SimPT_Sim::Event::SimEvent | EventType |
typedef const std::weak_ptr< const void > * | KeyType |
SimPT_Sim::Sim::Sim | ( | ) |
Constructor does almost no initialization work (.
|
virtual |
|
inlinefinaloverridevirtual |
Implements SimPT_Sim::SimInterface.
Definition at line 68 of file Sim.h.
Referenced by SimPT_Sim::TimeSlicer::IncrementStepCount().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 97 of file Sim.cpp.
Referenced by ToPtree().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 102 of file Sim.cpp.
Referenced by ToPtree().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 107 of file Sim.cpp.
Referenced by ToPtree().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 112 of file Sim.cpp.
Referenced by GetState(), GetStatusMessage(), IsAtTermination(), and ToPtree().
double SimPT_Sim::Sim::GetSimTime | ( | ) | const |
Definition at line 117 of file Sim.cpp.
Referenced by GetState(), GetStatusMessage(), IsAtTermination(), and ToPtree().
|
virtual |
void SimPT_Sim::Sim::Initialize | ( | const boost::property_tree::ptree & | pt | ) |
Initialize with full configuration (global info, parameters, random engine, mesh) i.e.
complete setup prior to first use.
Referenced by SimPT_Shell::Ws::StartupFilePtree::GetSimState().
void SimPT_Sim::Sim::Initialize | ( | const SimState & | sim_state | ) |
Initialize with full configuration (global info, parameters, random engine, mesh).i.e.
complete setup prior to first use.
Definition at line 180 of file Sim.cpp.
References SimPT_Sim::SimState::GetMeshState(), SimPT_Sim::SimState::GetParameters(), SimPT_Sim::SimState::GetProjectName(), SimPT_Sim::SimState::GetTime(), SimPT_Sim::SimState::GetTimeStep(), Reinitialize(), and SimPT_Sim::ClockMan::TimeStamp::ToString().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 202 of file Sim.cpp.
References GetSimStep(), GetSimTime(), and IsStationary().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 222 of file Sim.cpp.
Referenced by IsAtTermination().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 310 of file Sim.cpp.
Referenced by Initialize().
|
virtual |
Implements SimPT_Sim::SimInterface.
Definition at line 360 of file Sim.cpp.
References TimeSlicing().