#include <state_vector_base.h>
Public Member Functions | |
StateVectorBase (std::string name, Field_type type, Entity_kind kind=Entity_kind::CELL) | |
Constructor with a name. More... | |
virtual | ~StateVectorBase ()=default |
Destructor. More... | |
virtual std::ostream & | print (std::ostream &os) const |
Virtual methods. More... | |
virtual const std::type_info & | data_type () const =0 |
std::string | get_name () const |
Query Metadata. More... | |
Field_type | get_type () const |
Return the field type [MESH_FIELD, MULTIMATERIAL_FIELD] of the state vector. More... | |
Entity_kind | get_kind () const |
Return the entity kind [CELL, NODE] of the state vector. More... | |
Protected Attributes | |
std::string | name_ |
Field_type | type_ |
Entity_kind | kind_ |
Detailed Description
This class implements a base class state vector. A StateVectorBase instance holds metadata common for all field types, such as the name of the field and on what mesh entity the field is defined. The primary reason for this base class is so that we can implement a single container that holds different conceptual field types such as single or multi material fields with different internal representations. We need a common base class pointer so we can store all the different types together. We can recast the pointer to the correct type whenever needed.
Constructor & Destructor Documentation
◆ StateVectorBase()
|
inlineexplicit |
Constructor with a name.
- Parameters
-
name[in] Name of the StateVector type[in] Type of the StateVector (Field_type) (Single/Multi) kind[in] Kind of StateVector (CELL, NODE)
◆ ~StateVectorBase()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ data_type()
|
pure virtual |
◆ get_kind()
|
inline |
Return the entity kind [CELL, NODE] of the state vector.
- Returns
- the Entity_kind [CELL, NODE] of the state vector
Return the entity kind [CELL, NODE] of the state vector.
◆ get_name()
|
inline |
Query Metadata.
Return the name of the state vector.
- Returns
- the name of the state vector
Return the name of the state vector.
◆ get_type()
|
inline |
Return the field type [MESH_FIELD, MULTIMATERIAL_FIELD] of the state vector.
- Returns
- the Field_type [MESH_FIELD, MULTIMATERIAL_FIELD] of the state vector
Return the field type [MESH_FIELD, MULTIMATERIAL_FIELD] of the state vector.
◆ print()
|
inlinevirtual |
Virtual methods.
Reimplemented in Wonton::StateVectorUni< T >, Wonton::StateVectorMulti< T >, Wonton::StateVectorMultiRaw< T >, and Wonton::StateVectorUniRaw< T >.
Member Data Documentation
◆ kind_
|
protected |
◆ name_
|
protected |
◆ type_
|
protected |
The documentation for this class was generated from the following file:
- /home/wonton/wonton/wonton/state/state_vector_base.h