dune-grid 3.0-git
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Dune::VTKWriter< GridView >::VTKLocalFunction Class Reference

Type erasure wrapper for VTK data sets. More...

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

Classes

struct  FunctionWrapper
 Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. More...
 
struct  FunctionWrapperBase
 Base class for polymorphic container of underlying data set. More...
 
struct  VTKFunctionWrapper
 Type erasure implementation for legacy VTKFunctions. More...
 

Public Types

typedef VTK::DataArrayWriter< float > Writer
 

Public Member Functions

template<typename F >
 VTKLocalFunction (F &&f, VTK::FieldInfo fieldInfo, typename std::enable_if< detail::_has_local_context< F >::value, int >::type dummy=0)
 Construct a VTKLocalFunction for a dune-functions style LocalFunction.
 
template<typename F >
 VTKLocalFunction (F &&f, VTK::FieldInfo fieldInfo, typename std::enable_if< not detail::_has_local_context< F >::value, int >::type dummy=0)
 Construct a VTKLocalFunction for a dune-functions style Function.
 
 VTKLocalFunction (const std::shared_ptr< const VTKFunction > &vtkFunctionPtr)
 Construct a VTKLocalFunction for a legacy VTKFunction.
 
std::string name () const
 Returns the name of the data set.
 
const VTK::FieldInfofieldInfo () const
 Returns the VTK::FieldInfo for the data set.
 
void bind (const Entity &e) const
 Bind the data set to grid entity e.
 
void unbind () const
 Unbind the data set from the currently bound entity.
 
void write (const Coordinate &pos, Writer &w) const
 Write the value of the data set at local coordinate pos to the writer w.
 

Public Attributes

std::shared_ptr< FunctionWrapperBase_f
 
VTK::FieldInfo _fieldInfo
 

Detailed Description

template<class GridView>
class Dune::VTKWriter< GridView >::VTKLocalFunction

Type erasure wrapper for VTK data sets.

This wrapper has value semantics

Member Typedef Documentation

◆ Writer

template<class GridView >
typedef VTK::DataArrayWriter<float> Dune::VTKWriter< GridView >::VTKLocalFunction::Writer

Constructor & Destructor Documentation

◆ VTKLocalFunction() [1/3]

template<class GridView >
template<typename F >
Dune::VTKWriter< GridView >::VTKLocalFunction::VTKLocalFunction ( F &&  f,
VTK::FieldInfo  fieldInfo,
typename std::enable_if< detail::_has_local_context< F >::value, int >::type  dummy = 0 
)
inline

Construct a VTKLocalFunction for a dune-functions style LocalFunction.

◆ VTKLocalFunction() [2/3]

template<class GridView >
template<typename F >
Dune::VTKWriter< GridView >::VTKLocalFunction::VTKLocalFunction ( F &&  f,
VTK::FieldInfo  fieldInfo,
typename std::enable_if< not detail::_has_local_context< F >::value, int >::type  dummy = 0 
)
inline

Construct a VTKLocalFunction for a dune-functions style Function.

◆ VTKLocalFunction() [3/3]

template<class GridView >
Dune::VTKWriter< GridView >::VTKLocalFunction::VTKLocalFunction ( const std::shared_ptr< const VTKFunction > &  vtkFunctionPtr)
inlineexplicit

Construct a VTKLocalFunction for a legacy VTKFunction.

Member Function Documentation

◆ bind()

template<class GridView >
void Dune::VTKWriter< GridView >::VTKLocalFunction::bind ( const Entity &  e) const
inline

Bind the data set to grid entity e.

◆ fieldInfo()

template<class GridView >
const VTK::FieldInfo & Dune::VTKWriter< GridView >::VTKLocalFunction::fieldInfo ( ) const
inline

Returns the VTK::FieldInfo for the data set.

◆ name()

template<class GridView >
std::string Dune::VTKWriter< GridView >::VTKLocalFunction::name ( ) const
inline

Returns the name of the data set.

◆ unbind()

template<class GridView >
void Dune::VTKWriter< GridView >::VTKLocalFunction::unbind ( ) const
inline

Unbind the data set from the currently bound entity.

◆ write()

template<class GridView >
void Dune::VTKWriter< GridView >::VTKLocalFunction::write ( const Coordinate &  pos,
Writer w 
) const
inline

Write the value of the data set at local coordinate pos to the writer w.

Member Data Documentation

◆ _f

template<class GridView >
std::shared_ptr<FunctionWrapperBase> Dune::VTKWriter< GridView >::VTKLocalFunction::_f

◆ _fieldInfo

template<class GridView >
VTK::FieldInfo Dune::VTKWriter< GridView >::VTKLocalFunction::_fieldInfo

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