|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
Class representing a variable reference in a result file hierarchy. More...
#include <FFrVariableReference.H>


Public Types | |
| using | FFrResultContainerRef = std::pair< FFrResultContainer *, size_t > |
| Convenience type alias. More... | |
Public Member Functions | |
| FFrVariableReference (FFrVariable *var) | |
| The constructor initializes myVariable. More... | |
| virtual const std::string & | getDescription () const |
| Returns the variable name. More... | |
| virtual const std::string & | getType () const |
| Returns the variable type, e.g., SCALAR, VEC3, etc. More... | |
| size_t | getWordLength () const |
| Returns the word length (in bits) of the variable. More... | |
| size_t | getNumWords () const |
| Returns the total number of words in the variable. More... | |
| virtual bool | isVariableFloat () const |
| Returns true if this variable contain float data. More... | |
| virtual bool | isVarRef () const |
| Returns true since this entry is a Variable Reference. More... | |
| virtual bool | isEmpty () const |
| Returns true if this variable has no result data. More... | |
| FFaOperationBase * | getReadOperation () |
| Creates an operation reading the data of the variable from file. More... | |
| unsigned int | getTimeStamp () const |
| Returns the (most recent) time stamp of this variable. More... | |
| double | getDistanceFromResultPoint (const bool usePositionedKey=false) const |
| Returns the smallest distance to current extraxtor position. More... | |
| bool | hasDataForCurrentKey (const bool usePositionedKey=false) const |
| Checks if this entry has any data at current extractor position. More... | |
| void | getValidKeys (std::set< double > &validValues) const |
| Extracts a list of time steps for which this entry has data. More... | |
| virtual void | printPosition (std::ostream &os) const |
| Prints out the positioning data of this variable. More... | |
| virtual void | removeContainers (const std::set< FFrResultContainer * > &cont) |
| Removes data associated with given containers for this entry. More... | |
| virtual int | traverse (FFrResultContainer *resultContainer, FFrEntryBase *owner, FFrEntryBase *&objToBeModified, int binPos) |
| Traverses to build owner hierarchy and calculate binary sizes. More... | |
| virtual bool | merge (FFrEntryBase *obj) |
| Merges another entry into *this. More... | |
| virtual bool | equal (const FFrEntryBase *obj) const |
| Returns true if *this and *obj are considered equal. More... | |
| virtual bool | comp (const FFrEntryBase *obj) const |
| Returns true if *this equals another specified entry. More... | |
| virtual bool | less (const FFrEntryBase *obj) const |
| Returns true if *this is ordered before *obj. More... | |
| template<class T > | |
| bool | readVariable (T &value) |
| Reads a variable from the results container for current time step. More... | |
| template<> | |
| bool | readVariable (double &value) |
| Specialization for double variables - also accounting for float data. More... | |
| template<> | |
| bool | readVariable (Vec3Vec &value) |
| Specialization for array for FaVec3 objects - reading from a 1D array. More... | |
Public Member Functions inherited from FFrEntryBase | |
| virtual | ~FFrEntryBase () |
| Empty destructor. More... | |
| FFaResultDescription | getEntryDescription () const |
| Returns the full path of this result entry. More... | |
| virtual bool | hasDescription () const |
| Returns whether the entry has a description or not. More... | |
| virtual int | getBaseID () const |
| Returns the base ID of the object if this entry is an Object Group. More... | |
| virtual bool | hasBaseID () const |
| Returns whether this entry has a base ID or not. More... | |
| virtual int | getUserID () const |
| Returns the user ID for this entry. More... | |
| virtual bool | hasUserID () const |
| Returns whether this entry has a user ID or not. More... | |
| virtual const FFrEntries * | getDataFields () const |
| Returns a pointer to the data fields of this entry. More... | |
| virtual bool | hasDataFields () const |
| Returns whether this entry has data fields or not. More... | |
| template<class T > | |
| int | readPositionedTimestepData (const T *values, int nvals) const |
| Reads variable reference data from the hierarhcy under this entry. More... | |
| FFrEntryBase * | getOwner () const |
| Returns the owner of this entry in the hierarchy. More... | |
| void | setOwner (FFrEntryBase *owner) |
| Defines the owner of this entry in the hierarchy. More... | |
| virtual void | setGlobal () |
| Defines this as a global scope entry. More... | |
| bool | isGlobal () const |
| Check if this entry is in global scope or not. More... | |
| virtual bool | isOG () const |
| Returns whether this entry is an Object Group or not. More... | |
| virtual bool | isSOG () const |
| Returns whether this entry is a Super Object Group or not. More... | |
| virtual bool | isIG () const |
| Returns whether this entry is an Item Group or not. More... | |
| template<class T > | |
| bool | readVar (T &value) |
| Reads a variable from the results container for current time step. More... | |
Public Attributes | |
| std::vector< FFrResultContainerRef > | containers |
| List of result file containers in which this variable exists. More... | |
| FFrVariable * | myVariable |
| Points to the actual variable with data. More... | |
| FFrVariableReference * | next |
| Used in memory management. More... | |
Protected Member Functions | |
| virtual int | readPosData (const double *vals, int nvals, int arrayPos) const |
| Reads double data from the hierarhcy under this entry. More... | |
| virtual int | readPosData (const float *vals, int nvals, int arrayPos) const |
| Reads float data from the hierarhcy under this entry. More... | |
| virtual int | readPosData (const int *vals, int nvals, int arrayPos) const |
| Reads integer data from the hierarhcy under this entry. More... | |
Protected Member Functions inherited from FFrEntryBase | |
| FFrEntryBase () | |
| Default constructor. More... | |
| FFrEntryBase (const FFrEntryBase &obj) | |
| Copy constructor. More... | |
| FFrEntryBase & | operator= (const FFrEntryBase &)=delete |
| Disable default assignment operator. More... | |
Private Member Functions | |
| int | getNearestContainer () const |
| Returns the index of the nearest container for the current setting. More... | |
Private Attributes | |
| union { | |
| FFrVariable * myVariable | |
| Points to the actual variable with data. More... | |
| FFrVariableReference * next | |
| Used in memory management. More... | |
| }; | |
| Shared data memory segment for myVariable and next. More... | |
Class representing a variable reference in a result file hierarchy.
This class does not represent the variable itself, but a reference to one through a pointer. There may be many references pointing to the same physical variable, which are represented by the FFrVariable class.
| using FFrVariableReference::FFrResultContainerRef = std::pair<FFrResultContainer*,size_t> |
Convenience type alias.
|
inlineexplicit |
The constructor initializes myVariable.
|
inlinevirtual |
Returns true if *this equals another specified entry.
Reimplemented from FFrEntryBase.
|
virtual |
Returns true if *this and *obj are considered equal.
Implements FFrEntryBase.
|
virtual |
Returns the variable name.
Implements FFrEntryBase.
| double FFrVariableReference::getDistanceFromResultPoint | ( | const bool | usePositionedKey = false | ) | const |
Returns the smallest distance to current extraxtor position.
If usePositionedKey is true, the current physical position of the owning extractor object is used, otherwise the requested position is used.
|
private |
Returns the index of the nearest container for the current setting.
Returns -1 if no containers are found.
| size_t FFrVariableReference::getNumWords | ( | ) | const |
Returns the total number of words in the variable.
| FFaOperationBase * FFrVariableReference::getReadOperation | ( | ) |
Creates an operation reading the data of the variable from file.
| unsigned int FFrVariableReference::getTimeStamp | ( | ) | const |
Returns the (most recent) time stamp of this variable.
|
virtual |
Returns the variable type, e.g., SCALAR, VEC3, etc.
Implements FFrEntryBase.
| void FFrVariableReference::getValidKeys | ( | std::set< double > & | validValues | ) | const |
Extracts a list of time steps for which this entry has data.
| size_t FFrVariableReference::getWordLength | ( | ) | const |
Returns the word length (in bits) of the variable.
| bool FFrVariableReference::hasDataForCurrentKey | ( | const bool | usePositionedKey = false | ) | const |
Checks if this entry has any data at current extractor position.
If usePositionedKey is true, the current physical position of the owning extractor object is used, otherwise the requested position is used.
|
inlinevirtual |
Returns true if this variable has no result data.
Implements FFrEntryBase.
|
virtual |
Returns true if this variable contain float data.
Implements FFrEntryBase.
|
inlinevirtual |
Returns true since this entry is a Variable Reference.
Reimplemented from FFrEntryBase.
|
virtual |
Returns true if *this is ordered before *obj.
Implements FFrEntryBase.
|
virtual |
Merges another entry into *this.
Implements FFrEntryBase.
|
virtual |
Prints out the positioning data of this variable.
Implements FFrEntryBase.
|
protectedvirtual |
Reads double data from the hierarhcy under this entry.
Implements FFrEntryBase.
|
protectedvirtual |
Reads float data from the hierarhcy under this entry.
Implements FFrEntryBase.
|
protectedvirtual |
Reads integer data from the hierarhcy under this entry.
Implements FFrEntryBase.
| bool FFrVariableReference::readVariable | ( | double & | value | ) |
Specialization for double variables - also accounting for float data.
| template bool FFrVariableReference::readVariable< FaMat34 > | ( | T & | value | ) |
Reads a variable from the results container for current time step.
| bool FFrVariableReference::readVariable | ( | Vec3Vec & | value | ) |
Specialization for array for FaVec3 objects - reading from a 1D array.
|
virtual |
Removes data associated with given containers for this entry.
Implements FFrEntryBase.
|
virtual |
Traverses to build owner hierarchy and calculate binary sizes.
Reimplemented from FFrEntryBase.
| union { ... } |
Shared data memory segment for myVariable and next.
| std::vector<FFrResultContainerRef> FFrVariableReference::containers |
List of result file containers in which this variable exists.
| FFrVariable* FFrVariableReference::myVariable |
Points to the actual variable with data.
| FFrVariableReference* FFrVariableReference::next |
Used in memory management.