KASKADE 7 development version
Public Types | Public Member Functions | Static Public Attributes | List of all members
Kaskade::UniformSampler< Function > Class Template Reference

Class that can sample a Function(View) on a uniform rectangular grid. More...

#include <gridscanner.hh>

Detailed Description

template<class Function>
class Kaskade::UniformSampler< Function >

Class that can sample a Function(View) on a uniform rectangular grid.

This is useful, when using higher order FunctionSpaceElement s or highly nonlinear FunctionViews on a relatively coarse grid. The output to PARAVIEW can then be performed in high resolution. The use together with EdgeScanner yields a nice visualization of these functions.

Moreover, it is possible to zoom into interesting regions by defining the area of sampling appropriately.

Here a sample of how an output of UniformSampler and EdgeScanner may look like:

Definition at line 48 of file gridscanner.hh.

Public Types

typedef Function::Space Space
 
typedef Space::Grid Grid
 

Public Member Functions

 UniformSampler (Dune::FieldVector< typename Grid::ctype, spaceDim > const &lb, Dune::FieldVector< typename Grid::ctype, spaceDim > const &ub, Dune::FieldVector< typename Grid::ctype, spaceDim > const &st, Function const &fu, bool dataIsScalar=Function::components==1)
 Performs a uniform sampling of fu on the cuboid marked by lb, ub with stepsize st. More...
 
void writeVTK (std::string name)
 Print data in .vtk (Legacy) format. The extension ".vtk" is automatically appended. More...
 

Static Public Attributes

static int const spaceDim = Grid::dimension
 

Member Typedef Documentation

◆ Grid

template<class Function >
typedef Space::Grid Kaskade::UniformSampler< Function >::Grid

Definition at line 52 of file gridscanner.hh.

◆ Space

template<class Function >
typedef Function::Space Kaskade::UniformSampler< Function >::Space

Definition at line 51 of file gridscanner.hh.

Constructor & Destructor Documentation

◆ UniformSampler()

template<class Function >
Kaskade::UniformSampler< Function >::UniformSampler ( Dune::FieldVector< typename Grid::ctype, spaceDim > const &  lb,
Dune::FieldVector< typename Grid::ctype, spaceDim > const &  ub,
Dune::FieldVector< typename Grid::ctype, spaceDim > const &  st,
Function const &  fu,
bool  dataIsScalar = Function::components==1 
)
inline

Performs a uniform sampling of fu on the cuboid marked by lb, ub with stepsize st.

Parameters
lbdefines the lower bounds of the cuboid
ubdefines the upper bounds of the cuboid
stdetermines the stepsize that is taken for sampling in each direction
fuis a FunctionSpaceElement or a FunctionViews object: the function to be scanned
dataIsScalardetermines whether a vectorial or a multicomponent scalar VTK file is written

Definition at line 65 of file gridscanner.hh.

Member Function Documentation

◆ writeVTK()

template<class Function >
void Kaskade::UniformSampler< Function >::writeVTK ( std::string  name)
inline

Print data in .vtk (Legacy) format. The extension ".vtk" is automatically appended.

Definition at line 79 of file gridscanner.hh.

Member Data Documentation

◆ spaceDim

template<class Function >
int const Kaskade::UniformSampler< Function >::spaceDim = Grid::dimension
static

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