dune-grid  2.7.0
Public Types | Public Member Functions | List of all members
Dune::P0VTKFunction< GV, V > Class Template Referenceabstract

Take a vector and interpret it as cell data for the VTKWriter. More...

#include <dune/grid/io/file/vtk/function.hh>

Inheritance diagram for Dune::P0VTKFunction< GV, V >:
Inheritance graph

Public Types

typedef Base::Entity Entity
 
typedef Base::ctype ctype
 
enum  
 

Public Member Functions

int ncomps () const override
 return number of components More...
 
double evaluate (int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
 evaluate More...
 
std::string name () const override
 get name More...
 
VTK::Precision precision () const override
 get output precision for the field More...
 
 P0VTKFunction (const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0, VTK::Precision prec=VTK::Precision::float32)
 construct from a vector and a name More...
 
virtual ~P0VTKFunction ()
 destructor More...
 
virtual int ncomps () const=0
 
virtual std::string name () const=0
 get name More...
 
virtual VTK::Precision precision () const
 get output precision for the field More...
 

Detailed Description

template<typename GV, typename V>
class Dune::P0VTKFunction< GV, V >

Take a vector and interpret it as cell data for the VTKWriter.

This class turns a generic vector containing cell data into a VTKFunction. The vector must allow read access to the data via operator[]() and store the data in the order given by MultipleCodimMultipleGeomTypeMapper with a layout class that allows only elements. Also, it must support the method size().

While the number of components of the function is always 1, the vector may represent a field with multiple components of which one may be selected.

Template Parameters
GVType of GridView the vector applies to.
VType of vector.

Member Typedef Documentation

◆ ctype

template<typename GV , typename V >
typedef Base::ctype Dune::P0VTKFunction< GV, V >::ctype

◆ Entity

template<typename GV , typename V >
typedef Base::Entity Dune::P0VTKFunction< GV, V >::Entity

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Constructor & Destructor Documentation

◆ P0VTKFunction()

template<typename GV , typename V >
Dune::P0VTKFunction< GV, V >::P0VTKFunction ( const GV &  gv,
const V &  v_,
const std::string &  s_,
int  ncomps = 1,
int  mycomp = 0,
VTK::Precision  prec = VTK::Precision::float32 
)
inline

construct from a vector and a name

Parameters
gvGridView to operate on (used to instantiate a MultipleCodimMultipleGeomeTypeMapper, otherwise no reference or copy is stored). Note that this must be the GridView the vector applies to as well as the GridView later used by the VTKWriter – i.e. we do not implicitly restrict or prolongate the data.
v_Reference to the vector holding the data. The reference is stored internally and must be valid for as long as this functions evaluate method is used.
s_Name of this function in the VTK file.
ncompsNumber of components of the field represented by the vector.
mycompNumber of the field component this function is responsible for.
precthe precision with which to output the field

◆ ~P0VTKFunction()

template<typename GV , typename V >
virtual Dune::P0VTKFunction< GV, V >::~P0VTKFunction ( )
inlinevirtual

destructor

Member Function Documentation

◆ evaluate()

template<typename GV , typename V >
double Dune::P0VTKFunction< GV, V >::evaluate ( int  ,
const Entity e,
const Dune::FieldVector< ctype, dim > &   
) const
inlineoverridevirtual

evaluate

Implements Dune::VTKFunction< GV >.

◆ name() [1/2]

template<typename GV , typename V >
std::string Dune::P0VTKFunction< GV, V >::name ( ) const
inlineoverride

get name

◆ name() [2/2]

virtual std::string Dune::VTKFunction< GV >::name
pure virtualinherited

get name

◆ ncomps() [1/2]

template<typename GV , typename V >
int Dune::P0VTKFunction< GV, V >::ncomps ( ) const
inlineoverride

return number of components

◆ ncomps() [2/2]

virtual int Dune::VTKFunction< GV >::ncomps
pure virtualinherited

return number of components (1 for scalar valued functions, 3 for vector valued function in 3D etc.)

◆ precision() [1/2]

virtual VTK::Precision Dune::VTKFunction< GV >::precision
inlinevirtualinherited

get output precision for the field

◆ precision() [2/2]

template<typename GV , typename V >
VTK::Precision Dune::P0VTKFunction< GV, V >::precision ( ) const
inlineoverride

get output precision for the field


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