VPTissue Reference Manual
SimInterface.h
Go to the documentation of this file.
1 #ifndef SIM_SIMULATOR_INTERFACE_H_INCLUDED
2 #define SIM_SIMULATOR_INTERFACE_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "sim/SimPhase.h"
24 
25 #include <boost/property_tree/ptree_fwd.hpp>
26 #include <string>
27 
28 
29 namespace SimPT_Sim {
30 
31 struct CoreData;
32 
37 {
38 public:
40  virtual ~SimInterface() {}
41 
43  virtual CoreData& GetCoreData() =0;
44 
46  virtual const boost::property_tree::ptree& GetParameters() const = 0;
47 
49  virtual std::string GetProjectName() const = 0;
50 
52  virtual std::string GetRunDate() const = 0;
53 
55  virtual int GetSimStep() const = 0;
56 
58  virtual Timings GetTimings() const = 0;
59 
61  virtual bool IsAtTermination() const = 0;
62 
64  virtual bool IsStationary() const = 0;
65 
67  virtual void Reinitialize(const boost::property_tree::ptree& parameters) = 0;
68 
70  virtual void TimeStep() = 0;
71 };
72 
73 } // namespace
74 
75 #endif // end_of_include_guard
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
virtual bool IsAtTermination() const =0
Query whether simulation has met termination condition.
virtual void TimeStep()=0
Let simulator take a time step.
virtual std::string GetProjectName() const =0
Return name that identifies this project.
virtual const boost::property_tree::ptree & GetParameters() const =0
Provide reference to the parameters.
virtual std::string GetRunDate() const =0
Return start time/date of the current simulation run.
Namespace for the core simulator.
virtual ~SimInterface()
Virtual destructor.
Definition: SimInterface.h:40
SimPhase enum class.
Interface for Timeable.
virtual Timings GetTimings() const =0
Execution timings in duration units specified in milliseconds.
virtual void Reinitialize(const boost::property_tree::ptree &parameters)=0
Reinitialize with parameters; executed any time the parameters change.
Simulator interface.
Definition: SimInterface.h:36
virtual int GetSimStep() const =0
Get number of simulation steps taken in this simulation history.
virtual bool IsStationary() const =0
Returns true if the simulation is in a stationary state.
virtual CoreData & GetCoreData()=0
Access to CoreData.
Utility class to for timing.
Definition: Timeable.h:38