dune-vtk  0.2
Public Member Functions | List of all members
Dune::Vtk::Function< GridView > Class Template Reference

Wrapper class for functions allowing local evaluations. More...

#include <dune/vtk/function.hh>

Public Member Functions

template<class LF , class... Args, class = IsLocalFunction<LF>>
 Function (LF &&localFct, std::string name, std::vector< int > components, Args &&... args)
 (1) Construct from a LocalFunction directly More...
 
template<class LF , class... Args, class = IsLocalFunction<LF>>
 Function (LF &&localFct, std::string name, int ncomps, Args &&... args)
 (2) Construct from a LocalFunction directly More...
 
template<class LF , class... Args, class = IsLocalFunction<LF>, class R = Range<LF,LocalDomain>>
 Function (LF &&localFct, std::string name, Args &&... args)
 (3) Construct from a LocalFunction directly. More...
 
template<class... Args>
 Function (Function< GridView > const &fct, Args &&... args)
 (4) Construct from a Vtk::Function More...
 
template<class GF , class... Args, disableCopyMove< Function, GF > = 0, class = IsGridFunction<GF>>
 Function (GF &&fct, std::string name, Args &&... args)
 (5) Construct from a GridFunction More...
 
template<class F >
 Function (F &&fct, Vtk::FieldInfo info,...)
 (6) Constructor that forwards the number of components and data type to the other constructor More...
 
 Function (std::shared_ptr< VTKFunction< GridView > const > const &fct,...)
 (7) Construct from legacy VTKFunction More...
 
 Function ()=default
 (8) Default constructor. After construction, the function is an an invalid state. More...
 
std::string const & name () const
 Return a name associated with the function. More...
 
void setName (std::string name)
 Set the function name. More...
 
int numComponents () const
 Return the number of components of the Range as it is written to the file. More...
 
void setComponents (std::vector< int > components)
 Set the components of the Range to visualize. More...
 
void setComponents (int ncomps)
 Set the number of components of the Range and generate component range [0...ncomps) More...
 
Vtk::DataTypes dataType () const
 Return the VTK Datatype associated with the functions range type. More...
 
void setDataType (Vtk::DataTypes type)
 Set the data-type for the components. More...
 
Vtk::RangeTypes rangeType () const
 The category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED. More...
 
void setRangeType (Vtk::RangeTypes type, std::size_t ncomp=1)
 Set the category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED. More...
 
void setFieldInfo (Vtk::FieldInfo info)
 Set all the parameters from a FieldInfo object. More...
 

Detailed Description

template<class GridView>
class Dune::Vtk::Function< GridView >

Wrapper class for functions allowing local evaluations.

Constructor & Destructor Documentation

◆ Function() [1/8]

template<class GridView >
template<class LF , class... Args, class = IsLocalFunction<LF>>
Dune::Vtk::Function< GridView >::Function ( LF &&  localFct,
std::string  name,
std::vector< int >  components,
Args &&...  args 
)
inline

(1) Construct from a LocalFunction directly

Parameters
localFctA local-function, providing a bind(Element) and an operator()(LocalDomain)
nameThe name to use as identification in the VTK file
componentsA vector of component indices to extract from the range type
categoryThe Vtk::RangeTypes category for the range. [Vtk::RangeTypes::AUTO]
dataTypeThe Vtk::DataTypes used in the output. [Vtk::DataTypes::FLOAT32]

The arguments category and dataType can be passed in any order.

NOTE: Stores the localFunction by value.

◆ Function() [2/8]

template<class GridView >
template<class LF , class... Args, class = IsLocalFunction<LF>>
Dune::Vtk::Function< GridView >::Function ( LF &&  localFct,
std::string  name,
int  ncomps,
Args &&...  args 
)
inline

(2) Construct from a LocalFunction directly

Parameters
localFctA local-function, providing a bind(Element) and an operator()(LocalDomain)
nameThe name to use as identification in the VTK file
ncompsNumber of components of the pointwise data. Is extracted from the range type of the GridFunction if not given.

Forwards all the other parmeters to the constructor (1)

NOTE: Stores the localFunction by value.

◆ Function() [3/8]

template<class GridView >
template<class LF , class... Args, class = IsLocalFunction<LF>, class R = Range<LF,LocalDomain>>
Dune::Vtk::Function< GridView >::Function ( LF &&  localFct,
std::string  name,
Args &&...  args 
)
inline

(3) Construct from a LocalFunction directly.

Same as Constructor (1) or (2) but deduces the number of components from the static range type of the local-function. This defaults to 1 of no static size information could be extracted.

◆ Function() [4/8]

template<class GridView >
template<class... Args>
Dune::Vtk::Function< GridView >::Function ( Function< GridView > const &  fct,
Args &&...  args 
)
inlineexplicit

(4) Construct from a Vtk::Function

◆ Function() [5/8]

template<class GridView >
template<class GF , class... Args, disableCopyMove< Function, GF > = 0, class = IsGridFunction<GF>>
Dune::Vtk::Function< GridView >::Function ( GF &&  fct,
std::string  name,
Args &&...  args 
)
inline

(5) Construct from a GridFunction

Parameters
fctA Grid(View)-function, providing a localFunction(fct)
nameThe name to use as identification in the VTK file

Forwards all other arguments to the constructor (1) or (2).

NOTE: Stores the localFunction(fct) by value.

◆ Function() [6/8]

template<class GridView >
template<class F >
Dune::Vtk::Function< GridView >::Function ( F &&  fct,
Vtk::FieldInfo  info,
  ... 
)
inline

(6) Constructor that forwards the number of components and data type to the other constructor

◆ Function() [7/8]

template<class GridView >
Dune::Vtk::Function< GridView >::Function ( std::shared_ptr< VTKFunction< GridView > const > const &  fct,
  ... 
)
inlineexplicit

(7) Construct from legacy VTKFunction

Parameters
fctThe Dune::VTKFunction to wrap

◆ Function() [8/8]

template<class GridView >
Dune::Vtk::Function< GridView >::Function ( )
default

(8) Default constructor. After construction, the function is an an invalid state.

Member Function Documentation

◆ dataType()

template<class GridView >
Vtk::DataTypes Dune::Vtk::Function< GridView >::dataType ( ) const
inline

Return the VTK Datatype associated with the functions range type.

◆ name()

template<class GridView >
std::string const& Dune::Vtk::Function< GridView >::name ( ) const
inline

Return a name associated with the function.

◆ numComponents()

template<class GridView >
int Dune::Vtk::Function< GridView >::numComponents ( ) const
inline

Return the number of components of the Range as it is written to the file.

◆ rangeType()

template<class GridView >
Vtk::RangeTypes Dune::Vtk::Function< GridView >::rangeType ( ) const
inline

The category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED.

◆ setComponents() [1/2]

template<class GridView >
void Dune::Vtk::Function< GridView >::setComponents ( int  ncomps)
inline

Set the number of components of the Range and generate component range [0...ncomps)

◆ setComponents() [2/2]

template<class GridView >
void Dune::Vtk::Function< GridView >::setComponents ( std::vector< int >  components)
inline

Set the components of the Range to visualize.

◆ setDataType()

template<class GridView >
void Dune::Vtk::Function< GridView >::setDataType ( Vtk::DataTypes  type)
inline

Set the data-type for the components.

◆ setFieldInfo()

template<class GridView >
void Dune::Vtk::Function< GridView >::setFieldInfo ( Vtk::FieldInfo  info)
inline

Set all the parameters from a FieldInfo object.

◆ setName()

template<class GridView >
void Dune::Vtk::Function< GridView >::setName ( std::string  name)
inline

Set the function name.

◆ setRangeType()

template<class GridView >
void Dune::Vtk::Function< GridView >::setRangeType ( Vtk::RangeTypes  type,
std::size_t  ncomp = 1 
)
inline

Set the category of the range, SCALAR, VECTOR, TENSOR, or UNSPECIFIED.


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