Dune Core Modules (2.11.0)

Dune::Vtk::GridFunction< GridView, ComponentMapper > Class Template Reference

A Vtk::GridFunction is a function-like object that can be bound to a grid element an that provides an evaluate method with a component argument. More...

#include <dune/vtk/gridfunctions/gridfunction.hh>

Public Member Functions

template<class F , class R = RangeType<ResolveRef_t<F>,Domain>>
 GridFunction (F &&f, std::string name, int numComponents=dimRange< R >())
 Constructor. Pass any type F supporting the Function interface wrappers the name of the function and a number of components in the range (optional).
 
template<class F >
 GridFunction (F &&f, const Vtk::FieldInfo &info)
 Constructor. Pass any type F supporting the Function interface wrappers and the FieldInfo describing this function.
 
 GridFunction ()=default
 Default Constructor, creates an invalid function that must be assigned a valid function object.
 
 GridFunction (const GridFunction &other)
 Copy constructor, clones the underlying implementation.
 
GridFunctionoperator= (const GridFunction &other)
 Copy assignment operator, clones the underlying implementation.
 
Impl::RangeProxy< GridFunction, Domain > operator() (Domain const &x) const
 Return a proxy object to access the components of the range vector.
 
double evaluate (int i, Domain const &x) const
 Evaluate the ith component of the Range value at coordinate x
 
std::string const & name () const
 Return a name associated with the function.
 
void setName (std::string name)
 Set the function name.
 
int numComponents () const
 Return the number of components of the Range as it is written to the file.
 
const std::vector< int > & components () const
 Return the components vector.
 
void setComponents (std::vector< int > components)
 Set the components of the Range to visualize.
 
void setComponents (int ncomps)
 Set the number of components of the Range and generate component range [0...ncomps)
 
Vtk::DataTypes dataType () const
 Return the VTK Datatype associated with the functions range type.
 
void setDataType (Vtk::DataTypes type)
 Set the data-type for the components.
 
Vtk::RangeTypes rangeType () const
 The category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED.
 
void setRangeType (Vtk::RangeTypes type, std::size_t ncomp=1)
 Set the category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED.
 
void setFieldInfo (const Vtk::FieldInfo &info)
 Set all the parameters from a FieldInfo object.
 

Friends

LocalFunction localFunction (GridFunction const &self)
 Create the associated local function.
 

Detailed Description

template<class GridView, class ComponentMapper = DefaultComponentMapper>
class Dune::Vtk::GridFunction< GridView, ComponentMapper >

A Vtk::GridFunction is a function-like object that can be bound to a grid element an that provides an evaluate method with a component argument.

Stores internally a Vtk::LocalFunctionInterface object for the concrete evaluation.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Feb 14, 23:39, 2026)