Public Member Functions | Protected Member Functions | Protected Attributes
openfluid::base::PluggableFunction Class Reference

Abstract class for plugin interface. More...

Inheritance diagram for openfluid::base::PluggableFunction:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PluggableFunction ()
virtual ~PluggableFunction ()
void initializeFunction (openfluid::core::CoreRepository *CoreData, openfluid::base::ExecutionMessages *ExecMsgs, openfluid::base::EnvironmentProperties *FuncEnv, const unsigned int &MaxThreads, const openfluid::base::FuncID_t &FuncID)
void finalizeFunction ()
virtual bool initParams (openfluid::core::FuncParamsMap_t Params)=0
virtual bool prepareData ()=0
virtual bool checkConsistency ()=0
virtual bool initializeRun (const SimulationInfo *SimInfo)=0
virtual bool runStep (const SimulationStatus *SimStatus)=0
virtual bool finalizeRun (const SimulationInfo *SimInfo)=0

Protected Member Functions

void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::Value &Val)
void OPENFLUID_AppendVariable (openfluid::core::Unit &aUnit, const openfluid::core::VariableName_t VarName, const openfluid::core::Value &Val)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const double Val)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const long Val)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const bool Val)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const std::string &Val)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const openfluid::core::Value &Val)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const double Val)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const long Val)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const bool Val)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const std::string Val)
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, openfluid::core::Value *Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, openfluid::core::Value &Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, double *Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, double &Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, long *Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, long &Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, bool *Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, bool &Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, std::string *Val) const
void OPENFLUID_GetVariable (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, std::string &Val) const
bool OPENFLUID_IsVariableExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName) const
bool OPENFLUID_IsVariableExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step) const
bool OPENFLUID_IsVariableExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const openfluid::core::Value::Type ValueType) const
bool OPENFLUID_IsTypedVariableExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::Value::Type VarType) const
bool OPENFLUID_IsTypedVariableExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::VariableName_t VarName, const openfluid::core::TimeStep_t Step, const openfluid::core::Value::Type VarType) const
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const openfluid::core::Value &Val)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const double &Val)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const long &Val)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const std::string &Val)
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::StringValue &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::DoubleValue *Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::DoubleValue &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::VectorValue *Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::VectorValue &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, openfluid::core::MatrixValue &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, double *Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, double &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, long *Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, long &Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, std::string *Val) const
void OPENFLUID_GetInputData (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName, std::string &Val) const
bool OPENFLUID_IsInputDataExist (const openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t InputName) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, openfluid::core::StringValue &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, openfluid::core::DoubleValue &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, openfluid::core::VectorValue &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, openfluid::core::MatrixValue &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, double *Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, double &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, long *Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, long &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, float *Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, float &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, int *Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, int &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::string *Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::string &Val) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< std::string > *Vals) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< std::string > &Vals) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< double > *Vals) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< double > &Vals) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< long > *Vals) const
bool OPENFLUID_GetFunctionParameter (const openfluid::core::FuncParamsMap_t Params, const openfluid::core::FuncParamKey_t ParamName, std::vector< long > &Vals) const
void OPENFLUID_AppendEvent (openfluid::core::Unit *UnitPtr, openfluid::core::Event &Ev)
void OPENFLUID_GetEvents (const openfluid::core::Unit *UnitPtr, const openfluid::core::DateTime BeginDate, const openfluid::core::DateTime EndDate, openfluid::core::EventsCollection *Events) const
void OPENFLUID_GetEvents (const openfluid::core::Unit *UnitPtr, const openfluid::core::DateTime BeginDate, const openfluid::core::DateTime EndDate, openfluid::core::EventsCollection &Events) const
bool OPENFLUID_IsUnitClassExist (openfluid::core::UnitClass_t ClassName)
bool OPENFLUID_IsUnitExist (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID)
void OPENFLUID_GetUnitsCount (unsigned int &UnitsCount)
bool OPENFLUID_GetUnitsCount (const openfluid::core::UnitClass_t ClassName, unsigned int &UnitsCount)
bool OPENFLUID_GetUnit (const openfluid::core::UnitClass_t &ClassName, const openfluid::core::UnitID_t &ID, openfluid::core::Unit *aUnit)
openfluid::core::UnitOPENFLUID_GetUnit (const openfluid::core::UnitClass_t &ClassName, const openfluid::core::UnitID_t &ID)
void OPENFLUID_AddUnit (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID, openfluid::core::PcsOrd_t PcsOrder)
void OPENFLUID_DeleteUnit (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID)
bool OPENFLUID_AddFromToConnection (openfluid::core::UnitClass_t ClassNameFrom, openfluid::core::UnitID_t IDFrom, openfluid::core::UnitClass_t ClassNameTo, openfluid::core::UnitID_t IDTo)
bool OPENFLUID_AddFromToConnection (openfluid::core::Unit *FromUnit, openfluid::core::Unit *ToUnit)
bool OPENFLUID_RemoveFromToConnection (openfluid::core::UnitClass_t ClassNameFrom, openfluid::core::UnitID_t IDFrom, openfluid::core::UnitClass_t ClassNameTo, openfluid::core::UnitID_t IDTo)
bool OPENFLUID_RemoveFromToConnection (openfluid::core::Unit *FromUnit, openfluid::core::Unit *ToUnit)
bool OPENFLUID_AddChildParentConnection (openfluid::core::UnitClass_t ClassNameChild, openfluid::core::UnitID_t IDChild, openfluid::core::UnitClass_t ClassNameParent, openfluid::core::UnitID_t IDParent)
bool OPENFLUID_AddChildParentConnection (openfluid::core::Unit *ChildUnit, openfluid::core::Unit *ParentUnit)
bool OPENFLUID_RemoveChildParentConnection (openfluid::core::UnitClass_t ClassNameChild, openfluid::core::UnitID_t IDChild, openfluid::core::UnitClass_t ClassNameParent, openfluid::core::UnitID_t IDParent)
bool OPENFLUID_RemoveChildParentConnection (openfluid::core::Unit *ChildUnit, openfluid::core::Unit *ParentUnit)
bool OPENFLUID_IsUnitConnectedTo (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameTo, const openfluid::core::UnitID_t &IDTo)
bool OPENFLUID_IsUnitConnectedFrom (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameFrom, const openfluid::core::UnitID_t &IDFrom)
bool OPENFLUID_IsUnitChildOf (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameParent, const openfluid::core::UnitID_t &IDParent)
bool OPENFLUID_IsUnitParentOf (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameChild, const openfluid::core::UnitID_t &IDChild)
void OPENFLUID_BuildUnitsMatrix (const openfluid::core::UnitClass_t &UnitsClass, const unsigned int &ColsNbr, const unsigned int &RowsNbr)
void OPENFLUID_ExportUnitsGraphAsDotFile (const std::string &Filename)
void OPENFLUID_RaiseWarning (std::string Sender, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Source, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Source, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Source, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Source, std::string Msg)
bool OPENFLUID_GetRunEnvironment (std::string Key, std::string *Val)
bool OPENFLUID_GetRunEnvironment (std::string Key, bool *Val)
unsigned int OPENFLUID_GetFunctionMaxThreads () const
void OPENFLUID_SetFunctionMaxThreads (const unsigned int &MaxNumThreads)

Protected Attributes

openfluid::core::CoreRepositorymp_CoreData
StdoutAndFileOutputStream OPENFLUID_Logger

Detailed Description

Abstract class for plugin interface.

Abstract class for plugin interface, defining the minimal structure for a simulation function.
All simulation functions must inherit from this class.

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

Constructor & Destructor Documentation

Constructor

Virtual destructor


Member Function Documentation

Checks the function consistency. Internally called by the framework.

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

Internally called by the framework.

virtual bool openfluid::base::PluggableFunction::finalizeRun ( const SimulationInfo SimInfo) [pure virtual]

Internally called by the framework.

virtual bool openfluid::base::PluggableFunction::initializeRun ( const SimulationInfo SimInfo) [pure virtual]

Initializes function parameters of the function, 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.

Adds a child-parent connection between two units

Parameters:
[in]ClassNameChildclass name of the "child" unit
[in]IDChildID of the "child" unit
[in]ClassNameParentclass name of the "parent" unit
[in]IDParentID of the "parent" unit
Returns:
false if the connection already exists

Adds a child-parent connection between two units

Parameters:
[in]ChildUnitpointer to the "child" unit
[in]ParentUnitpointer to the "parent" unit
Returns:
false if the connection already exists

Adds a from-to connection between two units

Parameters:
[in]ClassNameFromclass name of the "from" unit
[in]IDFromID of the "from" unit
[in]ClassNameToclass name of the "to" unit
[in]IDToID of the "to" unit
Returns:
false if the unit connection already exists

Adds a from-to connection between two units

Parameters:
[in]FromUnitpointer to the "from" unit
[in]ToUnitpointer to the "to" unit
Returns:
false if the connection already exists

Adds a unit to the set of units if not already exists

Parameters:
[in]ClassNameclass name of the added unit
[in]IDID of the added unit
[in]PcsOrderProcess order of the added unit

Appends an event on a unit

Parameters:
[in]UnitPtra Unit
[in]Evthe event to append

Appends a distributed variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable
Deprecated:

Appends a distributed variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]aUnita Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable
void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable ( openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const double  Val 
) [protected]

Appends a distributed double variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable (double)

Appends a distributed long variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable (long)

Appends a distributed boolean variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable (bool)
void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable ( openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const std::string &  Val 
) [protected]

Appends a distributed string variable value for a unit at the end of the previously added values for this variable

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Valthe added value of the variable (string)
void openfluid::base::PluggableFunction::OPENFLUID_BuildUnitsMatrix ( const openfluid::core::UnitClass_t UnitsClass,
const unsigned int &  ColsNbr,
const unsigned int &  RowsNbr 
) [protected]

Builds a ColsNbr x RowsNbr unix matrix with bi-directionnal connections

Parameters:
[in]UnitsClassthe name of units class
[in]ColsNbrthe number of units on the X axis
[in]RowsNbrthe number of units on the Y axis

Deletes a unit from the set of units if exists

Parameters:
[in]ClassNameclass name of the removed unit
[in]IDID of the added unit
Returns:
true if the unit has been correctly deleted
void openfluid::base::PluggableFunction::OPENFLUID_ExportUnitsGraphAsDotFile ( const std::string &  Filename) [protected]

Exports the graph of the landscape representation as a graphviz dot file. The file is saved in the output directory of the simulation.

Parameters:
[in]Filenamethe name of the export file

Gets discrete events happening on a unit during a time period

Parameters:
[in]UnitPtra Unit
[in]BeginDatethe beginning of the time period
[in]EndDatethe ending of the time period
[out]Eventsthe collection of event corresponding to the request
Deprecated:

Gets discrete events happening on a unit during a time period

Parameters:
[in]UnitPtra Unit
[in]BeginDatethe beginning of the time period
[in]EndDatethe ending of the time period
[out]Eventsthe collection of event corresponding to the request
unsigned int openfluid::base::PluggableFunction::OPENFLUID_GetFunctionMaxThreads ( ) const [inline, protected]

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

Returns:
the number of threads

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::string *  Val 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
Deprecated:
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::string &  Val 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valthe value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< std::string > *  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
Deprecated:
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< std::string > &  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< double > *  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
Deprecated:
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< double > &  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< long > *  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter
Deprecated:
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( const openfluid::core::FuncParamsMap_t  Params,
const openfluid::core::FuncParamKey_t  ParamName,
std::vector< long > &  Vals 
) const [protected]

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

Parameters:
[in]Paramsthe parameters set for the simulation function
[in]ParamNamethe name of the requested parameter
[out]Valsthe vector of values of the requested parameter

Gets input data for a unit, as a StringValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property

Gets input data for a unit, as a DoubleValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
Deprecated:

Gets input data for a unit, as a DoubleValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property

Gets input data for a unit, as a VectorValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
Deprecated:

Gets input data for a unit, as a VectorValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property

Gets input data for a unit, as a MatrixValue

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
double *  Val 
) const [protected]

Gets input data for a unit, as a double

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
double &  Val 
) const [protected]

Gets input data for a unit, as a double

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
long *  Val 
) const [protected]

Gets input data for a unit, as a long integer

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
long &  Val 
) const [protected]

Gets input data for a unit, as a long integer

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
std::string *  Val 
) const [protected]

Gets input data for a unit, as a string

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( const openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t  InputName,
std::string &  Val 
) const [protected]

Gets input data for a unit, as a string

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the requested property
[out]Valthe value of the requested property
bool openfluid::base::PluggableFunction::OPENFLUID_GetRunEnvironment ( std::string  Key,
std::string *  Val 
) [protected]

Gets an environment string value associated to a Key

Parameters:
[in]Keythe sender of the message
[out]Valthe value associated with the environment key
bool openfluid::base::PluggableFunction::OPENFLUID_GetRunEnvironment ( std::string  Key,
bool *  Val 
) [protected]

Gets an environment boolean value associated to a Key

Parameters:
[in]Keythe sender of the message
[out]Valthe value associated with the environment key

Returns a pointer to the queried unit if exists

Parameters:
[in]ClassNamethe queried class name
[in]IDthe queried unit ID
[out]aUnita pointer to the requested Unit, NULL if the unit does not exist
Returns:
false if the unit does not exist
void openfluid::base::PluggableFunction::OPENFLUID_GetUnitsCount ( unsigned int &  UnitsCount) [protected]

Returns the total number of units

Parameters:
[out]UnitsCountthe queried class name
bool openfluid::base::PluggableFunction::OPENFLUID_GetUnitsCount ( const openfluid::core::UnitClass_t  ClassName,
unsigned int &  UnitsCount 
) [protected]

Returns the number of units of the class if the queried unit class exists

Parameters:
[in]ClassNamethe queried class name
[out]UnitsCountthe queried class name
Returns:
false if the unit class does not exist

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
Deprecated:

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
double *  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
double &  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
long *  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
long &  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
bool *  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
bool &  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
std::string *  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable
Deprecated:
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( const openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
std::string &  Val 
) const [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the requested variable
[out]Valthe value of the requested variable

Returns true if a distributed input data exists, false otherwise

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the queried variable

Returns true if a distributed variable exists and if the type set for this variable is the given type, false otherwise

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]VarTypethe type of the variable

Returns true if a distributed variable exists and if a value has been set for the given step and if the type set for this variable is the given type, false otherwise

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the variable
[in]VarTypethe type of the variable

Returns true if a given unit is "a child of" another unit

Parameters:
[in]aUnitthe given unit
[in]ClassNameParentthe class name of the other unit to test
[in]IDParentthe ID of the other unit to test
Returns:
true if the given unit is "a child of" the other unit

Returns true if the queried unit class exists

Parameters:
[in]ClassNamethe queried class name

Returns true if a given unit is connected "from" another unit

Parameters:
[in]aUnitthe given unit
[in]ClassNameFromthe class name of the other unit to test
[in]IDFromthe ID of the other unit to test
Returns:
true if the given unit is connected "from" the other unit

Returns true if a given unit is connected "to" another unit

Parameters:
[in]aUnitthe given unit
[in]ClassNameTothe class name of the other unit to test
[in]IDTothe ID of the other unit to test
Returns:
true if the given unit is connected "to" the other unit

Returns true if the queried unit exists

Parameters:
[in]ClassNamethe class of the queried unit
[in]IDthe ID of the queried unit

Returns true if a given unit is "parent of" another unit

Parameters:
[in]aUnitthe given unit
[in]ClassNameChildthe class name of the other unit to test
[in]IDChildthe ID of the other unit to test
Returns:
true if the given unit is "parent of" the other unit

Returns true if a distributed variable exists, false otherwise

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable

Returns true if a distributed variable exists and if a value has been set for the given step, false otherwise

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the variable

Returns true if a distributed variable exists and if a value has been set for the given step and if the value type is the given type, false otherwise

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the requested variable
[in]Stepthe time step for the value of the variable
[in]ValueTypethe type of the value
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in]Senderthe sender of the message
[in]TimeStepthe time step number when the message occurred
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Msg 
) [protected]

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in]Senderthe sender of the message
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Source,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in]Senderthe sender of the message
[in]Sourceof the message (location in the sender)
[in]TimeStepthe time step number when the message occurred
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Source,
std::string  Msg 
) [protected]

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in]Senderthe sender of the message
[in]Sourceof the message (location in the sender)
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked warning message to the kernel. This do not stops the simulation

Parameters:
[in]Senderthe sender of the message
[in]TimeStepthe time step number when the message occurred
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Msg 
) [protected]

Raises a warning message to the kernel. This do not stops the simulation

Parameters:
[in]Senderthe sender of the message
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Source,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked warning message to the kernel. This do not stops the simulation

Parameters:
[in]Senderthe sender of the message
[in]Sourcethe source of the message
[in]TimeStepthe time step number when the message occurred
[in]Msgthe content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Source,
std::string  Msg 
) [protected]

Raises a warning message to the kernel. This do not stops the simulation

Parameters:
[in]Senderthe sender of the message
[in]Sourcethe source of the message
[in]Msgthe content of the message

Removes a child-parent connection between two units

Parameters:
[in]ClassNameChildclass name of the "child" unit
[in]IDChildID of the "child" unit
[in]ClassNameParentclass name of the "parent" unit
[in]IDParentID of the "parent" unit
Returns:
false if the connection does not exist

Removes a child-parent connection between two units

Parameters:
[in]ChildUnitpointer to the "child" unit
[in]ParentUnitpointer to the "parent" unit
Returns:
false if the connection does not exist

Removes a from-to connection between two units

Parameters:
[in]ClassNameFromclass name of the "from" unit
[in]IDFromID of the "from" unit
[in]ClassNameToclass name of the "to" unit
[in]IDToID of the "to" unit
Returns:
false if the unit connection does not exist

Removes a from-to connection between two units

Parameters:
[in]FromUnitpointer to the "from" unit
[in]ToUnitpointer to the "to" unit
Returns:
false if the connection does not exist
void openfluid::base::PluggableFunction::OPENFLUID_SetFunctionMaxThreads ( 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

Sets input data for a unit

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the set property
[in]Valthe value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const double &  Val 
) [protected]

Sets input data for a unit, as a double

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the set property
[in]Valthe value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const long &  Val 
) [protected]

Sets input data for a unit, as a long integer

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the set property
[in]Valthe value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const std::string &  Val 
) [protected]

Sets input data for a unit, as a string

Parameters:
[in]UnitPtra Unit
[in]InputNamethe name of the set property
[out]Valthe value of the set property

Sets a distributed variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Stepthe time step for the value of the variable
[in]Valthe added value of the variable
void openfluid::base::PluggableFunction::OPENFLUID_SetVariable ( openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
const double  Val 
) [protected]

Sets a distributed double variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Stepthe time step for the value of the variable
[in]Valthe added value of the variable (double)

Sets a distributed double variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Stepthe time step for the value of the variable
[in]Valthe added value of the variable (long)

Sets a distributed double variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Stepthe time step for the value of the variable
[in]Valthe added value of the variable (bool)
void openfluid::base::PluggableFunction::OPENFLUID_SetVariable ( openfluid::core::Unit UnitPtr,
const openfluid::core::VariableName_t  VarName,
const openfluid::core::TimeStep_t  Step,
const std::string  Val 
) [protected]

Sets a distributed double variable value for a unit at a time step

Parameters:
[in]UnitPtra Unit
[in]VarNamethe name of the variable
[in]Stepthe time step for the value of the variable
[in]Valthe added value of the variable (string)
virtual bool openfluid::base::PluggableFunction::prepareData ( ) [pure virtual]

Prepares data. Internally called by the framework.

Implemented in openfluid::machine::Generator.

virtual bool openfluid::base::PluggableFunction::runStep ( const SimulationStatus SimStatus) [pure virtual]

Member Data Documentation

Pointer to the core repository (const). It should be used with care. Prefer to use the OPENFLUID_Xxxx methods.


Generated using Doxygen 1.7.6.1
Creative Commons License Creative Commons By-NC-ND license