Dune::P1VTKFunction< GV, V > Class Template Reference
[Visualization ToolKit (VTK)]

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

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

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

List of all members.

Public Types

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

Public Member Functions

virtual int ncomps () const
 return number of components
virtual double evaluate (int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const
 evaluate
virtual std::string name () const
 get name
 P1VTKFunction (const GV &gv, const V &v_, const std::string &s_, int ncomps=1, int mycomp=0)
 construct from a vector and a name
virtual ~P1VTKFunction ()
 destructor
virtual double evaluate (int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const =0
 evaluate single component comp in the entity e at local coordinates xi

Detailed Description

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

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

This class turns a generic vector containing point 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 vertices. 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.

Note:
While this function may be evaluated anywhere on a given grid element, it does not interpolate between the corners of the element -- instead, it returns the value at the nearest corner (as determined in local coordinates).
Template Parameters:
GV Type of GridView the vector applies to.
V Type of vector.

Member Typedef Documentation

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

Reimplemented from Dune::VTKFunction< GV::Grid >.

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

Reimplemented from Dune::VTKFunction< GV::Grid >.


Member Enumeration Documentation

anonymous enum [inherited]

Constructor & Destructor Documentation

template<typename GV , typename V >
Dune::P1VTKFunction< GV, V >::P1VTKFunction ( 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:
gv GridView to operate on (used to instantiate a MultipleCodimMultipleGeomTypeMapper, 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.
ncomps Number of components of the field represented by the vector.
mycomp Number of the field component this function is responsible for.

References Dune::MultipleCodimMultipleGeomTypeMapper< GV, Layout >::size().

template<typename GV , typename V >
virtual Dune::P1VTKFunction< GV, V >::~P1VTKFunction (  )  [inline, virtual]

destructor


Member Function Documentation

template<typename GV , typename V >
virtual double Dune::P1VTKFunction< GV, V >::evaluate ( int  comp,
const Entity e,
const Dune::FieldVector< ctype, dim > &  xi 
) const [inline, virtual]
virtual double Dune::VTKFunction< GV::Grid >::evaluate ( int  comp,
const Entity e,
const Dune::FieldVector< ctype, dim > &  xi 
) const [pure virtual, inherited]

evaluate single component comp in the entity e at local coordinates xi

Evaluate the function in an entity at local coordinates.

Parameters:
[in] comp number of component to be evaluated
[in] e reference to grid entity of codimension 0
[in] xi point in local coordinates of the reference element of e
Returns:
value of the component
template<typename GV , typename V >
virtual std::string Dune::P1VTKFunction< GV, V >::name (  )  const [inline, virtual]

get name

Implements Dune::VTKFunction< GV::Grid >.

template<typename GV , typename V >
virtual int Dune::P1VTKFunction< GV, V >::ncomps (  )  const [inline, virtual]

return number of components

Implements Dune::VTKFunction< GV::Grid >.


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].