dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Dune::PDELab::VTKGridFunctionAdapter< T > Class Template Reference

wrap a GridFunction so it can be used with the VTKWriter from dune-grid. More...

#include <dune/pdelab/common/vtkexport.hh>

Inheritance diagram for Dune::PDELab::VTKGridFunctionAdapter< T >:
Inheritance graph

Public Member Functions

 VTKGridFunctionAdapter (const T &t_, std::string s_, const std::vector< std::size_t > &remap_=rangeVector(std::size_t(T::Traits::dimRange)))
 construct a VTKGridFunctionAdapter
 
 VTKGridFunctionAdapter (const std::shared_ptr< const T > &t_, std::string s_, const std::vector< std::size_t > &remap_=rangeVector(std::size_t(T::Traits::dimRange)))
 construct a VTKGridFunctionAdapter
 
virtual int ncomps () const override
 
virtual double evaluate (int comp, const Entity &e, const Dune::FieldVector< DF, n > &xi) const override
 
virtual std::string name () const override
 

Detailed Description

template<typename T>
class Dune::PDELab::VTKGridFunctionAdapter< T >

wrap a GridFunction so it can be used with the VTKWriter from dune-grid.

Examples
recipe-communication.cc.

Constructor & Destructor Documentation

◆ VTKGridFunctionAdapter() [1/2]

template<typename T >
Dune::PDELab::VTKGridFunctionAdapter< T >::VTKGridFunctionAdapter ( const T &  t_,
std::string  s_,
const std::vector< std::size_t > &  remap_ = rangeVector(std::size_t(T::Traits::dimRange)) 
)
inline

construct a VTKGridFunctionAdapter

Parameters
t_GridFunction object to wrap. A reference to the grid function object is stored internally and the constructed object becomes invalid as soon as that reference becomes invalid.
s_Name of the field as returned by name().
remap_How components are remapped between PDELab and VTK. The default value yields the identity map with entries (0,1,...,T::Traits::dimRange-1).

The resulting VTKFunction will have remap_.size() components. None of the elements of remap_ should be greater or equal to T::Traits::dimRange. When component c is requested by the VTKWriter, it will be mapped to the component remap_[c] of the GridFunction.

◆ VTKGridFunctionAdapter() [2/2]

template<typename T >
Dune::PDELab::VTKGridFunctionAdapter< T >::VTKGridFunctionAdapter ( const std::shared_ptr< const T > &  t_,
std::string  s_,
const std::vector< std::size_t > &  remap_ = rangeVector(std::size_t(T::Traits::dimRange)) 
)
inline

construct a VTKGridFunctionAdapter

Parameters
t_Shared pointer to a GridFunction object to wrap.
s_Name of the field as returned by name().
remap_How components are remapped between PDELab and VTK. The default value yields the identity map with entries (0,1,...,T::Traits::dimRange-1).

The resulting VTKFunction will have remap_.size() components. None of the elements of remap_ should be greater or equal to T::Traits::dimRange. When component c is requested by the VTKWriter, it will be mapped to the component remap_[c] of the GridFunction.

Member Function Documentation

◆ evaluate()

template<typename T >
virtual double Dune::PDELab::VTKGridFunctionAdapter< T >::evaluate ( int  comp,
const Entity &  e,
const Dune::FieldVector< DF, n > &  xi 
) const
inlineoverridevirtual

◆ name()

template<typename T >
virtual std::string Dune::PDELab::VTKGridFunctionAdapter< T >::name ( ) const
inlineoverridevirtual

◆ ncomps()

template<typename T >
virtual int Dune::PDELab::VTKGridFunctionAdapter< T >::ncomps ( ) const
inlineoverridevirtual

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