Dune::cpgrid::EntityVariable< T, codim > Class Template Reference

A class design to hold a variable with a value for each entity of the given codimension, where the variable is not changing in sign with orientation. Examples include pressures and positions. More...

#include <EntityRep.hpp>

Inheritance diagram for Dune::cpgrid::EntityVariable< T, codim >:
Inheritance graph

Public Types

typedef std::vector< T > V
 
typedef std::vector< T >::iterator iterator
 
typedef std::vector< T >::const_iterator const_iterator
 

Public Member Functions

 EntityVariable ()
 Default constructor. More...
 
const T & operator[] (const EntityRep< codim > &e) const
 Random access to the variable through an EntityRep. More...
 
T & operator[] (const EntityRep< codim > &e)
 Random access to the variable through an EntityRep. More...
 
const T & get (int i) const
 
T & get (int i)
 

Detailed Description

template<typename T, int codim>
class Dune::cpgrid::EntityVariable< T, codim >

A class design to hold a variable with a value for each entity of the given codimension, where the variable is not changing in sign with orientation. Examples include pressures and positions.

Template Parameters
TA value type for the variable, such as double for pressure etc.
codimCodimension.

Member Typedef Documentation

◆ const_iterator

template<typename T >
typedef std::vector<T>::const_iterator Dune::cpgrid::EntityVariableBase< T >::const_iterator
inherited

◆ iterator

template<typename T >
typedef std::vector<T>::iterator Dune::cpgrid::EntityVariableBase< T >::iterator
inherited

◆ V

template<typename T >
typedef std::vector<T> Dune::cpgrid::EntityVariableBase< T >::V
inherited

Constructor & Destructor Documentation

◆ EntityVariable()

template<typename T , int codim>
Dune::cpgrid::EntityVariable< T, codim >::EntityVariable ( )
inline

Default constructor.

Member Function Documentation

◆ get() [1/2]

template<typename T >
T & Dune::cpgrid::EntityVariableBase< T >::get ( int  i)
inlineinherited

◆ get() [2/2]

template<typename T >
const T & Dune::cpgrid::EntityVariableBase< T >::get ( int  i) const
inlineinherited

◆ operator[]() [1/2]

template<typename T , int codim>
T & Dune::cpgrid::EntityVariable< T, codim >::operator[] ( const EntityRep< codim > &  e)
inline

Random access to the variable through an EntityRep.

Parameters
eEntity representation.
Returns
a mutable reference to the varable, at e.

References Dune::cpgrid::EntityVariableBase< T >::get(), and Dune::cpgrid::EntityRep< codim >::index().

◆ operator[]() [2/2]

template<typename T , int codim>
const T & Dune::cpgrid::EntityVariable< T, codim >::operator[] ( const EntityRep< codim > &  e) const
inline

Random access to the variable through an EntityRep.

Parameters
eEntity representation.
Returns
a const reference to the varable, at e.

References Dune::cpgrid::EntityVariableBase< T >::get(), and Dune::cpgrid::EntityRep< codim >::index().


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