
Abstract class for plugin interface. More...

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.
Constructor
| virtual openfluid::base::PluggableFunction::~PluggableFunction | ( | ) | [virtual] |
Virtual destructor
| virtual bool openfluid::base::PluggableFunction::checkConsistency | ( | ) | [pure virtual] |
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.
Implemented in openfluid::machine::InjectGenerator, openfluid::machine::InterpGenerator, openfluid::machine::RandomGenerator, and openfluid::machine::FixedGenerator.
| void openfluid::base::PluggableFunction::initializeFunction | ( | openfluid::core::CoreRepository * | CoreData, |
| openfluid::base::ExecutionMessages * | ExecMsgs, | ||
| openfluid::base::EnvironmentProperties * | FuncEnv, | ||
| const unsigned int & | MaxThreads, | ||
| const openfluid::base::FuncID_t & | FuncID | ||
| ) |
Internally called by the framework.
| virtual bool openfluid::base::PluggableFunction::initializeRun | ( | const SimulationInfo * | SimInfo | ) | [pure virtual] |
Internally called by the framework.
Implemented in openfluid::machine::InjectGenerator, openfluid::machine::InterpGenerator, openfluid::machine::RandomGenerator, and openfluid::machine::FixedGenerator.
| virtual bool openfluid::base::PluggableFunction::initParams | ( | openfluid::core::FuncParamsMap_t | Params | ) | [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.
| bool openfluid::base::PluggableFunction::OPENFLUID_AddChildParentConnection | ( | openfluid::core::UnitClass_t | ClassNameChild, |
| openfluid::core::UnitID_t | IDChild, | ||
| openfluid::core::UnitClass_t | ClassNameParent, | ||
| openfluid::core::UnitID_t | IDParent | ||
| ) | [protected] |
Adds a child-parent connection between two units
| [in] | ClassNameChild | class name of the "child" unit |
| [in] | IDChild | ID of the "child" unit |
| [in] | ClassNameParent | class name of the "parent" unit |
| [in] | IDParent | ID of the "parent" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_AddChildParentConnection | ( | openfluid::core::Unit * | ChildUnit, |
| openfluid::core::Unit * | ParentUnit | ||
| ) | [protected] |
Adds a child-parent connection between two units
| [in] | ChildUnit | pointer to the "child" unit |
| [in] | ParentUnit | pointer to the "parent" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_AddFromToConnection | ( | openfluid::core::UnitClass_t | ClassNameFrom, |
| openfluid::core::UnitID_t | IDFrom, | ||
| openfluid::core::UnitClass_t | ClassNameTo, | ||
| openfluid::core::UnitID_t | IDTo | ||
| ) | [protected] |
Adds a from-to connection between two units
| [in] | ClassNameFrom | class name of the "from" unit |
| [in] | IDFrom | ID of the "from" unit |
| [in] | ClassNameTo | class name of the "to" unit |
| [in] | IDTo | ID of the "to" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_AddFromToConnection | ( | openfluid::core::Unit * | FromUnit, |
| openfluid::core::Unit * | ToUnit | ||
| ) | [protected] |
Adds a from-to connection between two units
| [in] | FromUnit | pointer to the "from" unit |
| [in] | ToUnit | pointer to the "to" unit |
| void openfluid::base::PluggableFunction::OPENFLUID_AddUnit | ( | openfluid::core::UnitClass_t | ClassName, |
| openfluid::core::UnitID_t | ID, | ||
| openfluid::core::PcsOrd_t | PcsOrder | ||
| ) | [protected] |
Adds a unit to the set of units if not already exists
| [in] | ClassName | class name of the added unit |
| [in] | ID | ID of the added unit |
| [in] | PcsOrder | Process order of the added unit |
| void openfluid::base::PluggableFunction::OPENFLUID_AppendEvent | ( | openfluid::core::Unit * | UnitPtr, |
| openfluid::core::Event & | Ev | ||
| ) | [protected] |
Appends an event on a unit
| [in] | UnitPtr | a Unit |
| [in] | Ev | the event to append |
| void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::Value & | Val | ||
| ) | [protected] |
Appends a distributed variable value for a unit at the end of the previously added values for this variable
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the added value of the variable |
| void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable | ( | openfluid::core::Unit & | aUnit, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::Value & | Val | ||
| ) | [protected] |
Appends a distributed variable value for a unit at the end of the previously added values for this variable
| [in] | aUnit | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the added value of the variable (double) |
| void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const long | Val | ||
| ) | [protected] |
Appends a distributed long variable value for a unit at the end of the previously added values for this variable
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the added value of the variable (long) |
| void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const bool | Val | ||
| ) | [protected] |
Appends a distributed boolean variable value for a unit at the end of the previously added values for this variable
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Val | the 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
| [in] | UnitsClass | the name of units class |
| [in] | ColsNbr | the number of units on the X axis |
| [in] | RowsNbr | the number of units on the Y axis |
| void openfluid::base::PluggableFunction::OPENFLUID_DeleteUnit | ( | openfluid::core::UnitClass_t | ClassName, |
| openfluid::core::UnitID_t | ID | ||
| ) | [protected] |
Deletes a unit from the set of units if exists
| [in] | ClassName | class name of the removed unit |
| [in] | ID | ID of the added unit |
| 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.
| [in] | Filename | the name of the export file |
| void openfluid::base::PluggableFunction::OPENFLUID_GetEvents | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::DateTime | BeginDate, | ||
| const openfluid::core::DateTime | EndDate, | ||
| openfluid::core::EventsCollection * | Events | ||
| ) | const [protected] |
Gets discrete events happening on a unit during a time period
| [in] | UnitPtr | a Unit |
| [in] | BeginDate | the beginning of the time period |
| [in] | EndDate | the ending of the time period |
| [out] | Events | the collection of event corresponding to the request |
| void openfluid::base::PluggableFunction::OPENFLUID_GetEvents | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::DateTime | BeginDate, | ||
| const openfluid::core::DateTime | EndDate, | ||
| openfluid::core::EventsCollection & | Events | ||
| ) | const [protected] |
Gets discrete events happening on a unit during a time period
| [in] | UnitPtr | a Unit |
| [in] | BeginDate | the beginning of the time period |
| [in] | EndDate | the ending of the time period |
| [out] | Events | the 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
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| openfluid::core::StringValue & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a StringValue
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| openfluid::core::DoubleValue & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a DoubleValue
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| openfluid::core::VectorValue & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a VectorValue
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| openfluid::core::MatrixValue & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a MatrixValue
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| double * | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a double
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| double & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a double
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| long * | Val | ||
| ) | const [protected] |
Gets a function parameter value from the parameters set, as a long int
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| long & | Val | ||
| ) | const [protected] |
Gets a function parameter value from the parameters set, as a long int
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| float * | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a float
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| float & | Val | ||
| ) | const [protected] |
Gets a function parameter from the parameters set, as a float
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| int * | Val | ||
| ) | const [protected] |
Gets a function parameter value from the parameters set, as an int
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the value of the requested parameter |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter | ( | const openfluid::core::FuncParamsMap_t | Params, |
| const openfluid::core::FuncParamKey_t | ParamName, | ||
| int & | Val | ||
| ) | const [protected] |
Gets a function parameter value from the parameters set, as an int
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Val | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the 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< std::string > & | Vals | ||
| ) | const [protected] |
Gets a function parameter vector of values from the parameters set, as a vector of strings
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the 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
| [in] | Params | the parameters set for the simulation function |
| [in] | ParamName | the name of the requested parameter |
| [out] | Vals | the vector of values of the requested parameter |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::StringValue & | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a StringValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the value of the requested property |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::DoubleValue * | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a DoubleValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the value of the requested property |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::DoubleValue & | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a DoubleValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the value of the requested property |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::VectorValue * | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a VectorValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the value of the requested property |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::VectorValue & | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a VectorValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the value of the requested property |
| void openfluid::base::PluggableFunction::OPENFLUID_GetInputData | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName, | ||
| openfluid::core::MatrixValue & | Val | ||
| ) | const [protected] |
Gets input data for a unit, as a MatrixValue
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the requested property |
| [out] | Val | the 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
| [in] | Key | the sender of the message |
| [out] | Val | the 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
| [in] | Key | the sender of the message |
| [out] | Val | the value associated with the environment key |
| bool openfluid::base::PluggableFunction::OPENFLUID_GetUnit | ( | const openfluid::core::UnitClass_t & | ClassName, |
| const openfluid::core::UnitID_t & | ID, | ||
| openfluid::core::Unit * | aUnit | ||
| ) | [protected] |
Returns a pointer to the queried unit if exists
| [in] | ClassName | the queried class name |
| [in] | ID | the queried unit ID |
| [out] | aUnit | a pointer to the requested Unit, NULL if the unit does not exist |
| openfluid::core::Unit* openfluid::base::PluggableFunction::OPENFLUID_GetUnit | ( | const openfluid::core::UnitClass_t & | ClassName, |
| const openfluid::core::UnitID_t & | ID | ||
| ) | [protected] |
| void openfluid::base::PluggableFunction::OPENFLUID_GetUnitsCount | ( | unsigned int & | UnitsCount | ) | [protected] |
Returns the total number of units
| [out] | UnitsCount | the 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
| [in] | ClassName | the queried class name |
| [out] | UnitsCount | the queried class name |
| void openfluid::base::PluggableFunction::OPENFLUID_GetVariable | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::TimeStep_t | Step, | ||
| openfluid::core::Value * | Val | ||
| ) | const [protected] |
Gets the distributed variable value for a unit at a time step
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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, | ||
| openfluid::core::Value & | Val | ||
| ) | const [protected] |
Gets the distributed variable value for a unit at a time step
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the requested variable |
| [out] | Val | the value of the requested variable |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsInputDataExist | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t | InputName | ||
| ) | const [protected] |
Returns true if a distributed input data exists, false otherwise
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the queried variable |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsTypedVariableExist | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::Value::Type | VarType | ||
| ) | const [protected] |
Returns true if a distributed variable exists and if the type set for this variable is the given type, false otherwise
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | VarType | the type of the variable |
| bool openfluid::base::PluggableFunction::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 [protected] |
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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the variable |
| [in] | VarType | the type of the variable |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitChildOf | ( | openfluid::core::Unit * | aUnit, |
| const openfluid::core::UnitClass_t & | ClassNameParent, | ||
| const openfluid::core::UnitID_t & | IDParent | ||
| ) | [protected] |
Returns true if a given unit is "a child of" another unit
| [in] | aUnit | the given unit |
| [in] | ClassNameParent | the class name of the other unit to test |
| [in] | IDParent | the ID of the other unit to test |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitClassExist | ( | openfluid::core::UnitClass_t | ClassName | ) | [protected] |
Returns true if the queried unit class exists
| [in] | ClassName | the queried class name |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitConnectedFrom | ( | openfluid::core::Unit * | aUnit, |
| const openfluid::core::UnitClass_t & | ClassNameFrom, | ||
| const openfluid::core::UnitID_t & | IDFrom | ||
| ) | [protected] |
Returns true if a given unit is connected "from" another unit
| [in] | aUnit | the given unit |
| [in] | ClassNameFrom | the class name of the other unit to test |
| [in] | IDFrom | the ID of the other unit to test |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitConnectedTo | ( | openfluid::core::Unit * | aUnit, |
| const openfluid::core::UnitClass_t & | ClassNameTo, | ||
| const openfluid::core::UnitID_t & | IDTo | ||
| ) | [protected] |
Returns true if a given unit is connected "to" another unit
| [in] | aUnit | the given unit |
| [in] | ClassNameTo | the class name of the other unit to test |
| [in] | IDTo | the ID of the other unit to test |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitExist | ( | openfluid::core::UnitClass_t | ClassName, |
| openfluid::core::UnitID_t | ID | ||
| ) | [protected] |
Returns true if the queried unit exists
| [in] | ClassName | the class of the queried unit |
| [in] | ID | the ID of the queried unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitParentOf | ( | openfluid::core::Unit * | aUnit, |
| const openfluid::core::UnitClass_t & | ClassNameChild, | ||
| const openfluid::core::UnitID_t & | IDChild | ||
| ) | [protected] |
Returns true if a given unit is "parent of" another unit
| [in] | aUnit | the given unit |
| [in] | ClassNameChild | the class name of the other unit to test |
| [in] | IDChild | the ID of the other unit to test |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsVariableExist | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName | ||
| ) | const [protected] |
Returns true if a distributed variable exists, false otherwise
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| bool openfluid::base::PluggableFunction::OPENFLUID_IsVariableExist | ( | const openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::TimeStep_t | Step | ||
| ) | const [protected] |
Returns true if a distributed variable exists and if a value has been set for the given step, false otherwise
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the variable |
| bool openfluid::base::PluggableFunction::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 [protected] |
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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the requested variable |
| [in] | Step | the time step for the value of the variable |
| [in] | ValueType | the 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
| [in] | Sender | the sender of the message |
| [in] | TimeStep | the time step number when the message occurred |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Source | of the message (location in the sender) |
| [in] | TimeStep | the time step number when the message occurred |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Source | of the message (location in the sender) |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | TimeStep | the time step number when the message occurred |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Source | the source of the message |
| [in] | TimeStep | the time step number when the message occurred |
| [in] | Msg | the 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
| [in] | Sender | the sender of the message |
| [in] | Source | the source of the message |
| [in] | Msg | the content of the message |
| bool openfluid::base::PluggableFunction::OPENFLUID_RemoveChildParentConnection | ( | openfluid::core::UnitClass_t | ClassNameChild, |
| openfluid::core::UnitID_t | IDChild, | ||
| openfluid::core::UnitClass_t | ClassNameParent, | ||
| openfluid::core::UnitID_t | IDParent | ||
| ) | [protected] |
Removes a child-parent connection between two units
| [in] | ClassNameChild | class name of the "child" unit |
| [in] | IDChild | ID of the "child" unit |
| [in] | ClassNameParent | class name of the "parent" unit |
| [in] | IDParent | ID of the "parent" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_RemoveChildParentConnection | ( | openfluid::core::Unit * | ChildUnit, |
| openfluid::core::Unit * | ParentUnit | ||
| ) | [protected] |
Removes a child-parent connection between two units
| [in] | ChildUnit | pointer to the "child" unit |
| [in] | ParentUnit | pointer to the "parent" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_RemoveFromToConnection | ( | openfluid::core::UnitClass_t | ClassNameFrom, |
| openfluid::core::UnitID_t | IDFrom, | ||
| openfluid::core::UnitClass_t | ClassNameTo, | ||
| openfluid::core::UnitID_t | IDTo | ||
| ) | [protected] |
Removes a from-to connection between two units
| [in] | ClassNameFrom | class name of the "from" unit |
| [in] | IDFrom | ID of the "from" unit |
| [in] | ClassNameTo | class name of the "to" unit |
| [in] | IDTo | ID of the "to" unit |
| bool openfluid::base::PluggableFunction::OPENFLUID_RemoveFromToConnection | ( | openfluid::core::Unit * | FromUnit, |
| openfluid::core::Unit * | ToUnit | ||
| ) | [protected] |
Removes a from-to connection between two units
| [in] | FromUnit | pointer to the "from" unit |
| [in] | ToUnit | pointer to the "to" unit |
| 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
| [in] | MaxNumThreads | the number of threads |
| void openfluid::base::PluggableFunction::OPENFLUID_SetInputData | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::InputDataName_t & | InputName, | ||
| const openfluid::core::Value & | Val | ||
| ) | [protected] |
Sets input data for a unit
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the set property |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the set property |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the set property |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | InputName | the name of the set property |
| [out] | Val | the value of the set property |
| void openfluid::base::PluggableFunction::OPENFLUID_SetVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::TimeStep_t | Step, | ||
| const openfluid::core::Value & | Val | ||
| ) | [protected] |
Sets a distributed variable value for a unit at a time step
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Step | the time step for the value of the variable |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Step | the time step for the value of the variable |
| [in] | Val | the added value of the variable (double) |
| void openfluid::base::PluggableFunction::OPENFLUID_SetVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::TimeStep_t | Step, | ||
| const long | Val | ||
| ) | [protected] |
Sets a distributed double variable value for a unit at a time step
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Step | the time step for the value of the variable |
| [in] | Val | the added value of the variable (long) |
| void openfluid::base::PluggableFunction::OPENFLUID_SetVariable | ( | openfluid::core::Unit * | UnitPtr, |
| const openfluid::core::VariableName_t | VarName, | ||
| const openfluid::core::TimeStep_t | Step, | ||
| const bool | Val | ||
| ) | [protected] |
Sets a distributed double variable value for a unit at a time step
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Step | the time step for the value of the variable |
| [in] | Val | the 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
| [in] | UnitPtr | a Unit |
| [in] | VarName | the name of the variable |
| [in] | Step | the time step for the value of the variable |
| [in] | Val | the 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] |
Internally called by the framework.
Implemented in openfluid::machine::InjectGenerator, openfluid::machine::InterpGenerator, openfluid::machine::RandomGenerator, and openfluid::machine::FixedGenerator.
Pointer to the core repository (const). It should be used with care. Prefer to use the OPENFLUID_Xxxx methods.
Creative Commons By-NC-ND license