Wonton::StateVectorUni< T > Class Template Reference

#include <state_vector_uni.h>

Inheritance diagram for Wonton::StateVectorUni< T >:
Wonton::StateVectorBase

Public Member Functions

 StateVectorUni (std::string name, Entity_kind kind=Entity_kind::CELL, std::vector< T > data=std::vector< T >())
 Constructor for StateVectorUni. More...
 
 StateVectorUni (std::string name, T const *begin, T const *end, Entity_kind kind=Entity_kind::CELL)
 Constructor for StateVectorUni. More...
 
 ~StateVectorUni ()
 Destructor. More...
 
std::ostream & print (std::ostream &os) const
 Virtual methods. More...
 
const std::type_info & data_type () const
 
std::vector< T > & get_data ()
 Return a reference to the data in the state vector. More...
 
std::vector< T > const & get_data () const
 Return a const reference to the data in the state vector. More...
 
- Public Member Functions inherited from Wonton::StateVectorBase
 StateVectorBase (std::string name, Field_type type, Entity_kind kind=Entity_kind::CELL)
 Constructor with a name. More...
 
virtual ~StateVectorBase ()=default
 Destructor. More...
 
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...
 

Additional Inherited Members

- Protected Attributes inherited from Wonton::StateVectorBase
std::string name_
 
Field_type type_
 
Entity_kind kind_
 

Detailed Description

template<class T = double>
class Wonton::StateVectorUni< T >

This class implements a state vector for a single material field, meaning there is only one number per mesh entity. The vector of data needs to be the same size as the number of entitites in the mesh. The field can be define on the cells, nodes, etc..

Constructor & Destructor Documentation

◆ StateVectorUni() [1/2]

template<class T = double>
Wonton::StateVectorUni< T >::StateVectorUni ( std::string  name,
Entity_kind  kind = Entity_kind::CELL,
std::vector< T >  data = std::vector<T>() 
)
inline

Constructor for StateVectorUni.

Parameters
[in]namethe name of the state vector
[in]kindthe entity kind (CELL, NODE,...) of the data
[in]datathe vector of data

◆ StateVectorUni() [2/2]

template<class T = double>
Wonton::StateVectorUni< T >::StateVectorUni ( std::string  name,
T const *  begin,
T const *  end,
Entity_kind  kind = Entity_kind::CELL 
)
inline

Constructor for StateVectorUni.

Parameters
[in]namethe name of the state vector
[in]kindthe entity kind (CELL, NODE,...) of the data
[in]beginpointer to the beginning of data to be copied
[in]endpointer to the end of the data to be copied

Default arguments need to be at the end, so this signature is in a different order than the other constructor, and we need to be able to disambiguate with no default arguments.

◆ ~StateVectorUni()

template<class T = double>
Wonton::StateVectorUni< T >::~StateVectorUni ( )
inline

Destructor.

Member Function Documentation

◆ data_type()

template<class T = double>
const std::type_info& Wonton::StateVectorUni< T >::data_type ( ) const
inlinevirtual

◆ get_data() [1/2]

template<class T = double>
std::vector<T>& Wonton::StateVectorUni< T >::get_data ( )
inline

Return a reference to the data in the state vector.

Returns
a reference to the vector of data in the state vector

Return a reference to the data in the state vector.

◆ get_data() [2/2]

template<class T = double>
std::vector<T> const& Wonton::StateVectorUni< T >::get_data ( ) const
inline

Return a const reference to the data in the state vector.

Returns
a const reference to the vector of data in the state vector

Return a const reference to the data in the state vector.

◆ print()

template<class T = double>
std::ostream& Wonton::StateVectorUni< T >::print ( std::ostream &  os) const
inlinevirtual

Virtual methods.

Reimplemented from Wonton::StateVectorBase.


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