Wonton::StateVectorBase Class Referenceabstract

#include <state_vector_base.h>

Inheritance diagram for Wonton::StateVectorBase:
Wonton::StateVectorMulti< T > Wonton::StateVectorMultiRaw< T > Wonton::StateVectorUni< T > Wonton::StateVectorUniRaw< T >

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()

Wonton::StateVectorBase::StateVectorBase ( std::string  name,
Field_type  type,
Entity_kind  kind = Entity_kind::CELL 
)
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()

virtual Wonton::StateVectorBase::~StateVectorBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ data_type()

virtual const std::type_info& Wonton::StateVectorBase::data_type ( ) const
pure virtual

◆ get_kind()

Entity_kind Wonton::StateVectorBase::get_kind ( ) const
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()

std::string Wonton::StateVectorBase::get_name ( ) const
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()

Field_type Wonton::StateVectorBase::get_type ( ) const
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()

virtual std::ostream& Wonton::StateVectorBase::print ( std::ostream &  os) const
inlinevirtual

Member Data Documentation

◆ kind_

Entity_kind Wonton::StateVectorBase::kind_
protected

◆ name_

std::string Wonton::StateVectorBase::name_
protected

◆ type_

Field_type Wonton::StateVectorBase::type_
protected

The documentation for this class was generated from the following file: