Dune Core Modules (2.4.2)

Dune::P0VTKFunction< GV, V > Class Template Reference

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

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

Public Member Functions

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

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.

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

References DUNE_THROW.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 20, 23:31, 2024)