All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
openfluid::ware::PluggableSimulator Class Reference

Abstract class for simulator plugin. More...

#include <ware/PluggableSimulator.hpp>

Inheritance diagram for openfluid::ware::PluggableSimulator:
openfluid::ware::SimulationContributorWare openfluid::ware::SimulationInspectorWare openfluid::ware::SimulationDrivenWare openfluid::ware::PluggableWare openfluid::machine::Generator openfluid::machine::FixedGenerator openfluid::machine::InjectGenerator openfluid::machine::InterpGenerator openfluid::machine::RandomGenerator

List of all members.

Public Member Functions

 PluggableSimulator ()
virtual ~PluggableSimulator ()
void initializeWare (const WareID_t &SimID, const unsigned int &MaxThreads)
virtual void initParams (const openfluid::ware::WareParams_t &Params)=0
virtual void prepareData ()=0
virtual void checkConsistency ()=0
virtual
openfluid::base::SchedulingRequest 
initializeRun ()=0
virtual
openfluid::base::SchedulingRequest 
runStep ()=0
virtual void finalizeRun ()=0

Protected Member Functions

bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, openfluid::core::StringValue &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, openfluid::core::DoubleValue &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, openfluid::core::VectorValue &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, openfluid::core::MatrixValue &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, double &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, long &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, float &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, int &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, std::string &Val) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, std::vector< std::string > &Vals) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, std::vector< double > &Vals) const
bool OPENFLUID_GetSimulatorParameter (const openfluid::ware::WareParams_t &Params, const openfluid::ware::WareParamKey_t &ParamName, std::vector< long > &Vals) const
unsigned int OPENFLUID_GetSimulatorMaxThreads () const
void OPENFLUID_SetSimulatorMaxThreads (const unsigned int &MaxNumThreads)
openfluid::base::SchedulingRequest AtTheEnd () const
openfluid::base::SchedulingRequest Never () const
openfluid::base::SchedulingRequest DefaultDeltaT () const
openfluid::base::SchedulingRequest MultipliedDefaultDeltaT (const double &Mult) const
openfluid::base::SchedulingRequest Duration (const openfluid::core::Duration_t &D) const

Detailed Description

Abstract class for simulator plugin.

Abstract class for simulator plugin interface, defining the minimal structure for a simulator.
All simulators must inherit from this class.

Author:
Jean-Christophe FABRE <fabrejc@supagro.inra.fr>

Constructor & Destructor Documentation

Constructor

Virtual destructor


Member Function Documentation

Checks the simulator consistency. Internally called by the framework.

Implemented in openfluid::machine::InjectGenerator, openfluid::machine::InterpGenerator, openfluid::machine::RandomGenerator, and openfluid::machine::FixedGenerator.

virtual void openfluid::ware::PluggableSimulator::finalizeRun ( ) [pure virtual]
void openfluid::ware::PluggableSimulator::initializeWare ( const WareID_t SimID,
const unsigned int &  MaxThreads 
)

Internally called by the framework.

virtual void openfluid::ware::PluggableSimulator::initParams ( const openfluid::ware::WareParams_t Params) [pure virtual]

Initializes simulator parameters of the simulator, given as a hash map. Internally called by the framework.

Implemented in openfluid::machine::InjectGenerator, openfluid::machine::InterpGenerator, openfluid::machine::RandomGenerator, and openfluid::machine::FixedGenerator.

Returns the maximum number of threads that can be concurrently run in threaded spatial loops

Returns:
the number of threads

Gets a simulator parameter from the parameters set, as a StringValue

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter

Gets a simulator parameter from the parameters set, as a DoubleValue

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter

Gets a simulator parameter from the parameters set, as a VectorValue

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter

Gets a simulator parameter from the parameters set, as a MatrixValue

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
double &  Val 
) const [protected]

Gets a simulator parameter from the parameters set, as a double

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter

Gets a simulator parameter value from the parameters set, as a long int

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
float &  Val 
) const [protected]

Gets a simulator parameter from the parameters set, as a float

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter

Gets a simulator parameter value from the parameters set, as an int

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
std::string &  Val 
) const [protected]

Gets a simulator parameter value from the parameters set, as a string

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
std::vector< std::string > &  Vals 
) const [protected]

Gets a simulator parameter vector of values from the parameters set, as a vector of strings

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
std::vector< double > &  Vals 
) const [protected]

Gets a simulator parameter vector of values from the parameters set, as a vector of doubles

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
bool openfluid::ware::PluggableSimulator::OPENFLUID_GetSimulatorParameter ( const openfluid::ware::WareParams_t Params,
const openfluid::ware::WareParamKey_t ParamName,
std::vector< long > &  Vals 
) const [protected]

Gets a simulator parameter vector of values from the parameters set, as a vector of long ints

Parameters:
[in]Paramsthe parameters set for the simulator
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
void openfluid::ware::PluggableSimulator::OPENFLUID_SetSimulatorMaxThreads ( const unsigned int &  MaxNumThreads) [protected]

Sets the maximum number of threads that can be concurrently run in threaded spatial loops

Parameters:
[in]MaxNumThreadsthe number of threads
virtual void openfluid::ware::PluggableSimulator::prepareData ( ) [pure virtual]

Prepares data. Internally called by the framework.

Implemented in openfluid::machine::Generator, openfluid::machine::InjectGenerator, and openfluid::machine::InterpGenerator.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines