BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
Bempp::P1VectorVTKFunction< GV, V > Class Template Reference

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

#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/p1_vector_vtk_function.hpp>

Inheritance diagram for Bempp::P1VectorVTKFunction< GV, V >:

Public Types

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

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
 
 P1VectorVTKFunction (const GV &gv, const V &v_, const std::string &s_, int ncomps=1)
 Construct from a vector and a name. More...
 

Private Types

typedef Dune::VTKFunction< GV > Base
 Base class.
 
typedef
Dune::MultipleCodimMultipleGeomTypeMapper
< GV, Dune::MCMGVertexLayout > 
Mapper
 Mapper for vertices.
 

Private Attributes

const V & v
 store a reference to the vector
 
std::string s
 name of this function
 
int ncomps_
 number of components of the field stored in the vector
 
Mapper mapper
 mapper used to map elements to indices
 

Detailed Description

template<typename GV, typename V>
class Bempp::P1VectorVTKFunction< 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().

As opposed to a Dune::P1VTKFunction, this class represents all components of a vector field at once.

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
GVType of GridView the vector applies to.
VType of vector.

Constructor & Destructor Documentation

template<typename GV , typename V >
Bempp::P1VectorVTKFunction< GV, V >::P1VectorVTKFunction ( const GV &  gv,
const V &  v_,
const std::string &  s_,
int  ncomps = 1 
)
inline

Construct from a vector and a name.

Parameters
gvGridView 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.
ncompsNumber of components of the field represented by the vector.

References Bempp::P1VectorVTKFunction< GV, V >::mapper, Bempp::P1VectorVTKFunction< GV, V >::ncomps_, and Bempp::P1VectorVTKFunction< GV, V >::v.


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