|
FEDEM Model Database
R8.0
Source code of the FEDEM model database
|
#include <FmMathFuncBase.H>


Public Types | |
| enum | FuncUse { NONE , GENERAL , DRIVE_FILE , ROAD_FUNCTION , WAVE_FUNCTION , CURR_FUNCTION , SPR_TRA_STIFF , SPR_TRA_FORCE , SPR_ROT_STIFF , SPR_ROT_TORQUE , DA_TRA_COEFF , DA_TRA_FORCE , DA_ROT_COEFF , DA_ROT_TORQUE } |
| Enum that indicates what the function is used for. More... | |
Public Types inherited from FmModelMemberBase | |
| enum | Signal { MODEL_MEMBER_CONNECTED , MODEL_MEMBER_DISCONNECTED , MODEL_MEMBER_FINISHED_DISCONNECTED , MODEL_MEMBER_CHANGED } |
| Enumerator for database signals. More... | |
Public Types inherited from FmBase | |
| enum | CopyMode { NOTHING , SHALLOW , DEEP_UNRESOLVED , DEEP_APPEND , DEEP_REPLACE } |
| Enumerator for the different copying modes. More... | |
Public Types inherited from FFaFieldContainer | |
| using | FindCB = FFaDynCB4< FFaFieldContainer *&, int, int, const IntVec & > |
| Convenience alias for resolve call-backs. More... | |
Public Member Functions | |
| void | getEngines (std::vector< FmEngine * > &toFill) const |
| FmMathFuncBase * | copy () const |
| virtual bool | isListable () const |
| virtual bool | isLegalSprDmpFunc () const |
| virtual bool | hasSmartPoints () const |
| virtual bool | isSurfaceFunc () const |
| virtual bool | interactiveErase () |
| Hook for class-dependent tasks for interactive deleting an object. More... | |
| virtual int | printSolverEntry (FILE *fp) |
| Hoook for printing the solver input file entry for this object. More... | |
| virtual const char * | getFunctionFsiName () const |
| virtual const char * | getFunctionUIName () const |
| virtual const char * | getUITypeName () const |
| Returns the type name of this object for use in the GUI. More... | |
| virtual std::string | getInfoString () const |
| virtual bool | initGetValue () |
| virtual double | getValue (double x, int &ierr) const |
| virtual double | getValue (const DoubleVec &x, int &ierr) const |
| virtual double | getValue (double g, double d, const FaVec3 &X, double t) const |
| virtual unsigned int | getNoArgs () const |
| virtual void | setNoArgs (unsigned int) |
| virtual int | getSmartPoints (double start, double stop, DoubleVec &x, DoubleVec &y) |
| int | getCurvePoints (double start, double stop, double inc, DoubleVec &x, DoubleVec &y) |
| virtual void | getXAxisDomain (double &, double &) const |
| virtual void | getFunctionVariables (std::vector< FmFuncVariable > &, bool) const |
| virtual void | getParameters (std::vector< FmParameter > &toFill) const |
| virtual int | getExtrapolationType () const |
| virtual const DoubleVec & | getData () const |
| virtual DoubleVec & | getData () |
| FmCurveSet * | getPreviewCurve () const |
| bool | setFunctionUsage (int usage) |
| bool | setFunctionUse (FuncUse newUse, bool checkUniqueID=false) |
| bool | isUsedAs (FuncUse usage) const |
| FuncUse | getFunctionUse () const |
| virtual void | onEventSwitched (const FmSimulationEvent *) |
| Hook for simulation event handling. More... | |
Public Member Functions inherited from FmParamObjectBase | |
| virtual const char ** | getPixmap () const |
Public Member Functions inherited from FmStructPropertyBase | |
| bool | isListable () const override |
| Hook for list view filtering. More... | |
| FmBase * | duplicate () const override |
| Returns a connected copy of this object. More... | |
Public Member Functions inherited from FmSimulationModelBase | |
| virtual void | initAfterResolve () |
| Hook for initialisation after resolving cross references. More... | |
| virtual void | initAfterParse () |
| Hook for initialisation after simulation event switching. More... | |
| bool | parseField (const std::string &keyWord, const std::string &fieldValue) |
| Parses the field keyWord from a text string. More... | |
| void | removeFieldsExceptFor (const std::vector< FDictIt > &keep) |
| Removes all fields from this object, except for the specified ones. More... | |
| void | setAsDefault (const std::vector< FDictIt > &fieldNames) |
| Updates default values to the current value for specified fields. More... | |
| void | getFields (std::vector< FDictIt > &fieldNames) const |
| Returns all field names present in this object. More... | |
| bool | isEventModified () const |
| Checks if *this is referred by simulation events. More... | |
| std::string | getObjectInfo () const |
| Returns a string with all information stored in this object. More... | |
| FmSimulationModelBase * | copy (int cloneDepth) const |
| Makes a copy of this object. More... | |
| FmBase * | clone (int depth) const final |
| Returns an unconnected copy of this object. More... | |
| virtual bool | clone (FmBase *, int) |
| Copies the fields of another object into *this. More... | |
| virtual FmBase * | clone (int) const |
| Returns an unconnected copy of this object. More... | |
Public Member Functions inherited from FmModelMemberBase | |
| void | sendSignal (Signal sig) |
| Broadcasts a database signal to trigger call-back invokations. More... | |
| const char * | getItemName () const override |
| Returns the name of this item. More... | |
| std::string | getItemDescr () const override |
| Returns the description of this item. More... | |
| int | getItemID () const final |
| Returns the user ID of this item. More... | |
| int | getItemBaseID () const final |
| Returns the base ID of this item. More... | |
| void | getItemAssemblyPath (std::vector< int > &assID) const final |
| Returns the sub-assembly ID path of this item. More... | |
| void | onMainConnected () final |
| Invokes call-backs after this object is inserted into the database. More... | |
| void | onMainDisconnected () final |
| Invokes call-backs after this object is removed from the database. More... | |
| void | onMainAboutToDisconnect () final |
| Invokes call-backs before this object is removed from the database. More... | |
| void | onChanged () |
| Invokes call-backs when this object updated. More... | |
| void | printID (FILE *myFile, bool withBaseID=true) const |
| Prints the ID of this object in the solver input file format. More... | |
| int | getBaseID () const |
| Returns the base ID of this object. More... | |
| bool | setTag (const std::string &tag) |
| Assigns a tag to this object. More... | |
| bool | isTagged (const std::string &tag) const |
| Returns true if this object has a tag assigned to it. More... | |
| const std::string & | getTag () const |
| Returns a const reference to the tag assigned to this object. More... | |
| bool | moveTo (FmSubAssembly *newAss) |
| Moves this object to another sub-assembly. More... | |
Public Member Functions inherited from FmBase | |
| FmBase * | getNext () const |
| Returns the next object in the linked list. More... | |
| FmBase * | getPrev () const |
| Returns the previous object in the linked list. More... | |
| virtual std::string | getUserDescription (size_t maxLength=0) const |
| Returns the user-defined description of this object. More... | |
| virtual bool | setUserDescription (const std::string &descr) |
| Sets the user-defined description of this object. More... | |
| bool | makeCopyDescr () |
| Prepends "Copy of " to the user description. More... | |
| virtual std::string | getIdPath (bool withBrackets=true) const |
| Returns the user ID including the sub-assembly path. More... | |
| std::string | getIdString (bool withDescription=false) const |
| Returns a composed string describing this object. More... | |
| int | getID () const |
| Returns the user ID of this object. More... | |
| void | setID (int Id) |
| Sets the user ID of this object. More... | |
| void | getAssemblyID (IntVec &assID) const |
| Retrieves the assembly ID of this object. More... | |
| FmBase * | getParentAssembly () const |
| Returns the sub-assembly this object is part of, if any. More... | |
| FmBase * | getCommonAncestor (const FmBase *other) const |
| Returns the sub-assembly both *this and *other descent from. More... | |
| void | setParentAssembly (FmBase *subAss) |
| Sets the parent sub-assembly for this object. More... | |
| void | setParentAssembly (int Id, int classType=-1) |
| Sets the parent sub-assembly for this object. More... | |
| int | getResolvedID () const final |
| Returns the user Id of *this, for use in I/O and resolving. More... | |
| void | getResolvedAssemblyID (IntVec &assID) const final |
| Gets the assembly path of *this, for use in I/O and resolving. More... | |
| bool | cloneOrConnect () |
| Inserts or copies this object into the model database. More... | |
| virtual bool | connect () |
| Inserts this object into the model database. More... | |
| virtual bool | disconnect () |
| Removes this object from the model database. More... | |
| virtual void | drawObject () |
| Visualization interface for objects that can be rendered. More... | |
| bool | isPartOf (const FmSubAssembly *subAss) const |
| Returns true if *this is part of the specified sub-assembly. More... | |
| std::ostream & | writeFields (std::ostream &os) const |
| Writes all data fields of this object to the given output stream. More... | |
| virtual std::ostream & | writeFMF (std::ostream &os) |
| Writes out this object in the model database file format. More... | |
| virtual bool | clone (FmBase *, int) |
| Copies the fields of another object into *this. More... | |
Public Member Functions inherited from FFaFieldContainer | |
| FFaFieldContainer () | |
| The default constructor does nothing. More... | |
| virtual | ~FFaFieldContainer () |
| The destructor clears the references to *this in myRefBy. More... | |
| bool | erase () |
| Deletes *this assuming it is heap-allocated. More... | |
| void | getFields (FieldMap &mapToFill) const |
| Builds a map of all fields in this FFaFieldContainer. More... | |
| FFaFieldBase * | getField (const std::string &fieldName) const |
| Returns the named field in this FFaFieldContainer. More... | |
| void | getReferredObjs (ObjectMap &mapToFill) const |
| Builds a map of all other objects referred to by *this. More... | |
| void | getReferringObjs (ObjectMap &mapToFill) const |
| Builds a map of all other objects referring to *this. More... | |
| void | getReferringObjs (ObjectVec &vecToFill, const std::string &contextName, bool sortOnId=false) const |
| Builds a list of FFaFieldContainer objects referring to *this. More... | |
| template<class T > | |
| void | getReferringObjs (std::vector< T * > &vecToFill, const std::string &context="", bool sortOnId=false) const |
| Builds a list of class T objects referring to *this. More... | |
| template<class T > | |
| bool | hasReferringObjs (T *&ptr, const std::string &context="") const |
| Checks if there are any references of type T to this object. More... | |
| void | releaseReferencesToMe (const std::string &contextName="", FFaFieldContainer *replacement=NULL) |
| Directly removes all references to this object. More... | |
| void | resolve (FindCB &findCB) |
| Resolves all FFaReferences and FFaReferenceLists in this object. More... | |
| void | unresolve () |
| Unresolves all FFaReferences and FFaReferenceLists in this object. More... | |
| void | updateReferences (int oldAssId, int newAssId) |
| Updates the assembly ID in the references in this object. More... | |
| void | updateReferences (const IntVec &oldAssId, const IntVec &newAssID) |
| Updates the assembly ID in the references in this object. More... | |
| bool | readField (const std::string &key, std::istream &is, bool datafieldsOnly=false) |
| Reads the value of a field named key from an input stream. More... | |
| bool | copy (const FFaFieldContainer *other, bool fieldsOnly=false, bool unresolve=false) |
| Copies all fields and references from another object into *this. More... | |
| bool | copyFields (const FFaFieldContainer *obj) |
| Copies all field values from another object into *this. More... | |
| bool | resetFields (const FFaFieldContainer *obj) |
| Resets fields to their default value. More... | |
Public Member Functions inherited from FFaListViewItem | |
| FFaListViewItem () | |
| Default constructor. More... | |
| virtual | ~FFaListViewItem () |
| The destructor deletes the position and expand status mapping. More... | |
| virtual const char ** | getListViewPixmap () const |
| Returns the pixmap of this item. More... | |
| bool | setPositionInListView (const char *lvName, int pos) |
| Sets the position of this item in the named list view. More... | |
| int | getPositionInListView (const char *lvName) const |
| Returns the position of this item in the named list view. More... | |
| bool | setExpandedInListView (const char *lvName, bool exp) |
| Sets the expand status of this item in the named list view. More... | |
| bool | getExpandedInListView (const char *lvName) const |
| Returns the expand status of this item in the named list view. More... | |
| bool | isSubjectToLVPositioning (const char *lvName) const |
| Returns whether this item is positioned in the named list view. More... | |
Public Member Functions inherited from FFaViewItem | |
| FFaViewItem ()=default | |
| Default constructor. More... | |
| FFaViewItem (const FFaViewItem &)=delete | |
| Disable default copy constructor. More... | |
| virtual | ~FFaViewItem () |
| Empty destructor. More... | |
| FFaViewItem & | operator= (const FFaViewItem &)=delete |
| Disable default assignment operator. More... | |
Static Public Member Functions | |
| static void | resolveAfterRead () |
Static Public Member Functions inherited from FmModelMemberBase | |
| static FFaSwitchBoardConnector * | getSignalConnector () |
| Returns the model database signal connector. More... | |
| static void | resolveBaseIDProblems () |
| Resolves the conflicting base ID issues for baseIdProblems. More... | |
Static Public Member Functions inherited from FFaFieldContainer | |
| static void | removeDictInstance () |
| Removes the heap-allocated field name dictionary. More... | |
Static Public Member Functions inherited from FFaViewItem | |
| static bool | compareDescr (FFaViewItem *i1, FFaViewItem *i2) |
| Binary comparison of description strings (implementation of less). More... | |
| static bool | compareID (FFaViewItem *i1, FFaViewItem *i2) |
| Binary comparison of user IDs (implementation of less). More... | |
| static int | compareDescr3w (FFaViewItem *i1, FFaViewItem *i2) |
| Three-way lexicographical comparison of description strings. More... | |
| static int | compareID3w (FFaViewItem *i1, FFaViewItem *i2) |
| Three-way lexicographical comparison of user IDs. More... | |
Protected Member Functions | |
| FmMathFuncBase () | |
| virtual | ~FmMathFuncBase () |
| virtual int | printSolverData (FILE *) |
| virtual bool | cloneLocal (FmBase *obj, int depth) |
| Clones the data fields of *obj into *this. More... | |
Protected Member Functions inherited from FmParamObjectBase | |
| FmParamObjectBase () | |
Protected Member Functions inherited from FmStructPropertyBase | |
| FmStructPropertyBase () | |
| Default constructor. More... | |
Protected Member Functions inherited from FmSimulationModelBase | |
| FmSimulationModelBase () | |
| Default constructor. More... | |
| bool | cloneLocal (FmBase *obj, int depth) override |
| Clones the data fields of *obj into *this. More... | |
Protected Member Functions inherited from FmModelMemberBase | |
| virtual void | mainConnectedEvent () |
| Hook for class-dependent tasks when the object is connected. More... | |
| virtual void | mainDisconnectedEvent () |
| Hook for class-dependent tasks when the object is disconnected. More... | |
| virtual void | changedEvent () |
| Hook for class-dependent tasks when the object is updated. More... | |
| FmModelMemberBase (bool isDummy=false) | |
| Default constructor. More... | |
| bool | eraseOptions () override |
| Hook for class-specific tasks before deleting *this in erase(). More... | |
Protected Member Functions inherited from FmBase | |
| FmBase (bool isDummy=false) | |
| Default constructor. More... | |
| virtual | ~FmBase () |
| Empty destructor. More... | |
| bool | eraseOrConnect () |
| Conditionally inserts this object into the model database. More... | |
| bool | mainConnect (bool allowNonUniqueIDs=false) |
| Inserts this object into the model database, unless aready present. More... | |
| bool | mainDisconnect () |
| Removes this object from the model database, if present. More... | |
| void | insertAfter (FmBase *afterPt) |
| Inserts *this after *afterPt in the database ring. More... | |
Protected Member Functions inherited from FFaFieldContainer | |
| void | addRef (FFaReferenceBase *ref) |
| Adds a reference to the internal book keeping of this object. More... | |
| void | addRefList (FFaReferenceListBase *list) |
| Adds a reference list to the internal book keeping of this object. More... | |
| void | addField (const std::string &identifier, FFaFieldBase *field) |
| Adds a field to the internal book keeping of this object. More... | |
| void | removeField (const std::string &identifier) |
| Removes the field from the internal book keeping of this object. More... | |
Static Protected Member Functions | |
| static bool | localParse (const char *keyWord, std::istream &activeStatement, FmMathFuncBase *obj) |
Static Protected Member Functions inherited from FmBase | |
| static bool | localParse (const char *keyWord, std::istream &activeStatement, FmBase *obj) |
| Parses the keyWord field for *obj, if it is a defined field. More... | |
Protected Attributes | |
| int | myExplType |
| DoubleVec | myExplData |
Protected Attributes inherited from FmModelMemberBase | |
| FFaNoCopyField< int > | myBaseID |
| Base ID, unique over all object types. More... | |
| FFaField< std::string > | myTag |
| Text string used for grouping objects. More... | |
Protected Attributes inherited from FFaFieldContainer | |
| FieldContainerMap | myFields |
| All data fields of this object. More... | |
Private Member Functions | |
| Fmd_DB_HEADER_INIT () | |
| FFaEnumMapping (FuncUse) | |
Private Attributes | |
| FFaField< FuncUseEnum > | myUse |
Additional Inherited Members | |
Static Public Attributes inherited from FmSimulationModelBase | |
| static std::string | relPathCorrection |
| For writing of solver input file. More... | |
Static Public Attributes inherited from FmModelMemberBase | |
| static bool | ignoreBaseID = false |
| Set to true when importing sub-assembly. More... | |
| static bool | inInteractiveErase = false |
| Set to true when interactive delete. More... | |
Protected Types inherited from FFaFieldContainer | |
| using | FDict = std::set< std::string > |
| Convenience type alias, a set of text strings used as a dictionary. More... | |
| using | FDictIt = FDict::const_iterator |
| Convenience type alias, a const_iterator pointing into a dictionary. More... | |
| using | FieldContainerMap = std::map< FDictIt, FFaFieldBase *, FDictLess > |
| Convenience type alias, a field container map. More... | |
| using | FieldContainerDict = FFaSingelton< FDict, FFaFieldContainer > |
| Convenience type alias, a heap-allocated dictionary singelton. More... | |
Enum that indicates what the function is used for.
|
protected |
|
protectedvirtual |
|
protectedvirtual |
Clones the data fields of *obj into *this.
This method tries to copy all fields of the cloned object into this object.
Reimplemented from FmBase.
Reimplemented in FmfWaveSpectrum, FmfWaveSinus, FmfUserDefined, FmfStep, FmfSquarePuls, FmfSpline, FmfSmoothTraj, FmfSinusoidal, FmfScale, FmfRamp, FmfMultiVarBase, FmfMultiArgBase, FmfMathExpr, FmfLinVelVar, FmfLinVar, FmfLimRamp, FmfExternalFunction, FmfDiracPuls, FmfDeviceFunction, FmfDelayedComplSinus, FmfConstant, and FmfComplSinus.
| FmMathFuncBase * FmMathFuncBase::copy | ( | ) | const |
|
inlineprivate |
|
private |
| int FmMathFuncBase::getCurvePoints | ( | double | start, |
| double | stop, | ||
| double | inc, | ||
| DoubleVec & | x, | ||
| DoubleVec & | y | ||
| ) |
|
inlinevirtual |
Reimplemented in FmfMultiVarBase.
|
inlinevirtual |
Reimplemented in FmfUserDefined, and FmfMultiVarBase.
| void FmMathFuncBase::getEngines | ( | std::vector< FmEngine * > & | toFill | ) | const |
Returns all engines referring to this function.
|
virtual |
Reimplemented in FmfMultiVarBase, FmfExternalFunction, and FmfConstant.
|
virtual |
Reimplemented in FmfWaveSpectrum, FmfWaveSinus, FmfStep, FmfSpline, FmfSmoothTraj, FmfSinusoidal, FmfScale, FmfRamp, FmfLinVelVar, FmfLinVar, FmfLimRamp, FmfExternalFunction, FmfDiracPuls, FmfDeviceFunction, and FmfConstant.
|
inlinevirtual |
Reimplemented in FmfWaveSpectrum, FmfWaveSinus, FmfUserDefined, FmfStep, FmfSquarePuls, FmfSpline, FmfSmoothTraj, FmfSinusoidal, FmfScale, FmfRamp, FmfMathExpr, FmfLinVelVar, FmfLinVar, FmfLimRamp, FmfExternalFunction, FmfDiracPuls, FmfDeviceFunction, FmfDelayedComplSinus, FmfConstant, and FmfComplSinus.
|
inline |
|
inlinevirtual |
Reimplemented in FmfSinusoidal, FmfUserDefined, FmfStep, FmfSquarePuls, FmfSmoothTraj, FmfScale, FmfRamp, FmfLimRamp, FmfDiracPuls, FmfDelayedComplSinus, FmfConstant, and FmfComplSinus.
|
virtual |
Re-implementation of FmBase::getInfoString to obtain compatible names in the Function query menus and the object browser.
Reimplemented from FmBase.
|
inlinevirtual |
Reimplemented in FmfUserDefined, FmfMathExpr, FmfExternalFunction, and FmfConstant.
|
inlinevirtual |
Implements FmParamObjectBase.
| FmCurveSet * FmMathFuncBase::getPreviewCurve | ( | ) | const |
|
virtual |
Reimplemented in FmfDeviceFunction.
|
virtual |
Returns the type name of this object for use in the GUI.
Reimplemented from FmBase.
|
inlinevirtual |
Reimplemented in FmfMultiArgBase, FmfMathExpr, and FmfUserDefined.
|
virtual |
Reimplemented in FmfWaveSpectrum.
|
virtual |
Reimplemented in FmfWaveSpectrum, FmfMultiArgBase, and FmfDeviceFunction.
|
inlinevirtual |
Reimplemented in FmfSpline, and FmfLinVelVar.
|
virtual |
Reimplemented in FmfSinusoidal, and FmfDeviceFunction.
|
virtual |
Reimplemented in FmfWaveSpectrum, FmfWaveSinus, FmfSinusoidal, FmfMultiVarBase, FmfMultiArgBase, and FmfDeviceFunction.
|
virtual |
Hook for class-dependent tasks for interactive deleting an object.
This method can be overriden in sub-classes when additional user feedback is needed before the object can be deleted. It returns false if the user cancelled the delete.
Reimplemented from FmModelMemberBase.
|
virtual |
Reimplemented in FmfDeviceFunction.
|
virtual |
Re-implementation of FmSimulationModelBase::isListable to filter out functions used in engines (general functions).
Reimplemented from FmSimulationModelBase.
|
inlinevirtual |
Reimplemented in FmfWaveSpectrum, and FmfUserDefined.
|
inline |
|
staticprotected |
|
virtual |
Hook for simulation event handling.
Reimplemented from FmSimulationModelBase.
|
inlineprotectedvirtual |
|
virtual |
Hoook for printing the solver input file entry for this object.
Reimplemented from FmModelMemberBase.
Reimplemented in FmfDeviceFunction.
|
static |
To be called after the model is read. Sorts functions according to new function/engine regime. If a road/spring/damper function is used in several different places, copies are created. Only functions with use type NONE are considered.
| bool FmMathFuncBase::setFunctionUsage | ( | int | usage | ) |
| bool FmMathFuncBase::setFunctionUse | ( | FuncUse | newUse, |
| bool | checkUniqueID = false |
||
| ) |
|
inlinevirtual |
Reimplemented in FmfMathExpr.
|
protected |
|
protected |
|
private |