21 #ifndef bempp_p1_vector_vtk_function_hpp
22 #define bempp_p1_vector_vtk_function_hpp
24 #include "../common/common.hpp"
26 #include <dune/grid/io/file/vtk/function.hh>
52 template<
typename GV,
typename V>
54 :
public Dune::VTKFunction<GV>
57 typedef Dune::VTKFunction<GV>
Base;
59 typedef Dune::MultipleCodimMultipleGeomTypeMapper<
72 typedef typename Base::Entity Entity;
73 typedef typename Base::ctype ctype;
83 virtual double evaluate(
int comp,
const Entity& e,
84 const Dune::FieldVector<ctype, dim>& xi)
const
89 for (
int i = 0; i < e.template count<dim>(); ++i)
91 Dune::FieldVector<ctype,dim> local =
92 Dune::GenericReferenceElements<ctype,dim>::general(gt)
95 if (local.infinity_norm() < min)
97 min = local.infinity_norm();
105 virtual std::string
name()
const
129 DUNE_THROW(Dune::IOError,
"P1VectorVTKFunction: size mismatch");
virtual std::string name() const
get name
Definition: p1_vector_vtk_function.hpp:105
Take a vector and interpret it as point data for the VTKWriter.
Definition: p1_vector_vtk_function.hpp:53
Dune::GeometryType GeometryType
Identifier of geometry type.
Definition: geometry_type.hpp:34
const V & v
store a reference to the vector
Definition: p1_vector_vtk_function.hpp:63
Mapper mapper
mapper used to map elements to indices
Definition: p1_vector_vtk_function.hpp:69
virtual int ncomps() const
return number of components
Definition: p1_vector_vtk_function.hpp:77
int ncomps_
number of components of the field stored in the vector
Definition: p1_vector_vtk_function.hpp:67
Dune::MultipleCodimMultipleGeomTypeMapper< GV, Dune::MCMGVertexLayout > Mapper
Mapper for vertices.
Definition: p1_vector_vtk_function.hpp:60
std::string s
name of this function
Definition: p1_vector_vtk_function.hpp:65
Dune::VTKFunction< GV > Base
Base class.
Definition: p1_vector_vtk_function.hpp:57
P1VectorVTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1)
Construct from a vector and a name.
Definition: p1_vector_vtk_function.hpp:124
virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const
evaluate
Definition: p1_vector_vtk_function.hpp:83