Base class for variables that store one or more components of data.
No assumption about data element connectivity or array properties is made.
|
virtual | ~WmVariable () |
| Destroy object.
|
|
virtual void | setup (const WxCryptSet &wxc) |
| Setup object using supplied crypset.
|
|
virtual void | copy (const WmVariable &var) |
| Set the variable from supplied one.
|
|
virtual void | fill (const std::vector< WxAny > &fillValues) |
| For each component, apply a fill value throughout the domain.
|
|
virtual void | swap (WmVariable &otherVar) |
| Swap the internal data storage of this variable with otherVar leaving the outer shell the same, given both have same size and properties.
|
|
virtual bool | checkCompatible (const WmVariable &var) const |
| Compares this variable to another supplied WmVariable and report if they are swap compatible.
|
|
virtual void | dump (WxIoBase &io, WxIoNodeType &grpNode) const |
| Dump object to file.
|
|
virtual void | load (WxIoBase &io, const WxIoNodeType &grpNode) |
| Load object from file.
|
|
bool | hasComponent (const std::string &componentName) const |
| Check if this variable has a component matching the name supplied.
|
|
virtual const std::type_info & | getElementTypeForComponent (unsigned int index) const |
| Returns a type_info reference for the most primative element type stored by the variable.
|
|
virtual const std::type_info & | getElementType () const |
| Returns a type_info reference for the most primative element type stored by the variable.
|
|
unsigned int | getNumComponents () const |
| Returns number of components represented in the variable.
|
|
std::vector< std::string > | getComponentNames () const |
| Get names of all components (alphabetical order)
|
|
variableComponent_t | getIndexForComponent (const std::string &componentName) const |
| Returns the component number associated with the componentName.
|
|
const std::string & | getComponentName (const variableComponent_t index) const |
| Returns the component name for a given index.
|
|
virtual const WxAny | min (const int componentIndex) const |
| Returns the minimum value for the component identified.
|
|
virtual const WxAny | absoluteMin (const int componentIndex) const |
| Returns the absolute minimum value for the component identified Absolute min is the closest value to zero Value will be negative if any negative values were found.
|
|
const WmSolverBase & | getParent () const |
| Get the parent solver.
|
|
virtual | ~WxObject () |
| Dtor: destroy object.
|
|
void | setIo (WxIoBase &io) |
| Set the I/O pointer for use in object.
|
|
void | setMsg (WxMsgBase &msg) |
| Set the msg pointer for use in object.
|
|
WxIoBase & | getIo () |
| Return reference to I/O object.
|
|
const WxIoBase & | getIo () const |
| Return constant reference to I/O object.
|
|
WxMsgBase & | getMsg () |
| Return reference to msg object.
|
|
const WxMsgBase & | getMsg () const |
| Return const reference to msg object.
|
|
virtual void | setup (const WxCryptSet &wxc) |
| Setup object using supplied crypset.
|
|
virtual void | init () |
| Initialize the object.
|
|
virtual void | finishBuild () |
| Finish building the object.
|
|
virtual void | load (WxIoBase &io, const WxIoNodeType &grpNode) |
| Load object from file.
|
|
virtual void | dump (WxIoBase &io, WxIoNodeType &grpNode) const |
| Dump object to file.
|
|
virtual std::string | name () const |
| Get name of object.
|
|
void | setName (const std::string &nm) |
| Set object's name.
|
|
|
| WmVariable (const WmConstOpaquePtr &parent_solver) |
| Constructor sets up basic variable container, but no properties or specifics.
|
|
| WmVariable (const std::string &name, const std::vector< std::string > &orderedComponentNames) |
| Constructor sets up basic variable container, and all properties otherwise set through setup() method in the no-argument form.
|
|
const std::type_info & | getRealTypeID () const |
| Get the type that real type aliases.
|
|
std::string | getRealTypeStr () const |
| Get the name for the type that real type aliases.
|
|
| WxObject () |
| Create object, that will be initialized subsequently.
|
|
| WxObject (const std::string &name) |
| Create object with given name bypassing object setup phase Protected because there is no reason to have a WxObject directly, as it is meant to be a parent class.
|
|
virtual const std::type_info & WmVariable::getElementTypeForComponent |
( |
unsigned int |
index | ) |
const |
|
virtual |
Returns a type_info reference for the most primative element type stored by the variable.
i.e. The type is expected to be float, double, int, or some low-level struct
- Parameters
-
index | Component index of interest |
- Returns
- type_info object reference associated with the fundemental element type stored in the variable
Reimplemented in WmUnstructuredArray.
virtual void WmVariable::setup |
( |
const WxCryptSet & |
wxc | ) |
|
|
virtual |
Setup object using supplied crypset.
This method reads in parameters needed to initialize the object. This establishes variable name and component names. The cryptset should have variables
NumComponents = int # number of components per value associated with this variable; if specified, components are named c0,c1,etc. ComponentNames = [ string, ... ] # names assigned to each component of the variable
Either ComponentNames or NumComponents can be specified, not both. If neither is specified, 1 component named to match the variable name is assumed. Subsequent calls to this function have no affect.
Component names shoud be a vector of names for each sub component like "x", "y", "z" or "E","B","J" The compents can be hierarchically named using dot '.' tokens such as "E.x", "E.y", "J.normal".
- Parameters
-
wxc | Cryptset using which the object is set up. |
Reimplemented from WxObject.
Reimplemented in WmUnstructuredArray, and WmDistributedVariable.