BEM++
2.0
|
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>
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 | |
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.
GV | Type of GridView the vector applies to. |
V | Type of vector. |
|
inline |
Construct from a vector and a name.
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. |
References Bempp::P1VectorVTKFunction< GV, V >::mapper, Bempp::P1VectorVTKFunction< GV, V >::ncomps_, and Bempp::P1VectorVTKFunction< GV, V >::v.