VPTissue Reference Manual
SimPT_Sim::Sim Class Reference

Simulator: mesh & parameters, model & algorithms. More...

#include <Sim.h>

Inheritance diagram for SimPT_Sim::Sim:
Inheritance graph
Collaboration diagram for SimPT_Sim::Sim:
Collaboration graph

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...
 
CoreDataGetCoreData () 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
 
Simoperator= (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< TimeSlicerTimeSlicing ()
 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
 

Detailed Description

Simulator: mesh & parameters, model & algorithms.

Definition at line 50 of file Sim.h.

Constructor & Destructor Documentation

SimPT_Sim::Sim::Sim ( )

Constructor does almost no initialization work (.

See also
Sim::Initialize).

Definition at line 65 of file Sim.cpp.

SimPT_Sim::Sim::~Sim ( )
virtual

Destructor is virtual (.

See also
Subject ).

Definition at line 93 of file Sim.cpp.

Member Function Documentation

CoreData& SimPT_Sim::Sim::GetCoreData ( )
inlinefinaloverridevirtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 68 of file Sim.h.

Referenced by SimPT_Sim::TimeSlicer::IncrementStepCount().

Here is the caller graph for this function:

const ptree & SimPT_Sim::Sim::GetParameters ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 97 of file Sim.cpp.

Referenced by ToPtree().

Here is the caller graph for this function:

string SimPT_Sim::Sim::GetProjectName ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 102 of file Sim.cpp.

Referenced by ToPtree().

Here is the caller graph for this function:

std::string SimPT_Sim::Sim::GetRunDate ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 107 of file Sim.cpp.

Referenced by ToPtree().

Here is the caller graph for this function:

int SimPT_Sim::Sim::GetSimStep ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 112 of file Sim.cpp.

Referenced by GetState(), GetStatusMessage(), IsAtTermination(), and ToPtree().

Here is the caller graph for this function:

double SimPT_Sim::Sim::GetSimTime ( ) const
See also
SimInterface.

Definition at line 117 of file Sim.cpp.

Referenced by GetState(), GetStatusMessage(), IsAtTermination(), and ToPtree().

Here is the caller graph for this function:

Sim::Timings SimPT_Sim::Sim::GetTimings ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 151 of file Sim.cpp.

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

bool SimPT_Sim::Sim::IsAtTermination ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 202 of file Sim.cpp.

References GetSimStep(), GetSimTime(), and IsStationary().

Here is the call graph for this function:

bool SimPT_Sim::Sim::IsStationary ( ) const
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 222 of file Sim.cpp.

Referenced by IsAtTermination().

Here is the caller graph for this function:

void SimPT_Sim::Sim::Reinitialize ( const boost::property_tree::ptree &  p)
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 310 of file Sim.cpp.

Referenced by Initialize().

Here is the caller graph for this function:

void SimPT_Sim::Sim::TimeStep ( )
virtual
See also
SimInterface.

Implements SimPT_Sim::SimInterface.

Definition at line 360 of file Sim.cpp.

References TimeSlicing().

Here is the call graph for this function:


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