version 0.4.1
Ikarus::ResultFunction< FE, RT, UserFunction > Class Template Reference

Wrapper to evaluate results for a vtkwriter. More...

#include <ikarus/io/resultfunction.hh>

Inheritance diagram for Ikarus::ResultFunction< FE, RT, UserFunction >:
[legend]

Public Types

using FiniteElement = FE
 
using FERequirementType = typename FiniteElement::FERequirementType
 
using GridView = typename FiniteElement::GridView
 
using ctype = typename GridView::ctype
 
using Entity = typename GridView::template Codim< 0 >::Entity
 

Public Member Functions

double evaluate (int comp, const Entity &e, const Dune::FieldVector< ctype, griddim > &local) const override
 Evaluate the component at a given entity and local coordinates. More...
 
int ncomps () const override
 Get the number of components. More...
 
constexpr std::string name () const override
 Get the name of the result type. More...
 
 ResultFunction (std::vector< FiniteElement > *fes, const FERequirementType &req)
 Constructor for ResultFunction. More...
 

Static Public Attributes

static constexpr int griddim = GridView::dimension
 

Detailed Description

template<typename FE, template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
class Ikarus::ResultFunction< FE, RT, UserFunction >

Usage:

// Usage with Dune::Vtk::VtkWriter
auto resultFunction = Ikarus::makeResultVtkFunction<resType>(&fes, feRequirements);
vtkwriter.addPointData(resultFunction);
// Usage with the native Dune::VTKWriter
auto resultFunction = Ikarus::makeResultFunction<resType>(&fes, feRequirements);
vtkWriter.addVertexData(resultFunction);
Template Parameters
FEType of the finite element
RTrequested result type
UserFunctionType of the user-defined function for custom result evaluation (default is DefaultUserFunction)

Member Typedef Documentation

◆ ctype

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
using Ikarus::ResultFunction< FE, RT, UserFunction >::ctype = typename GridView::ctype

◆ Entity

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
using Ikarus::ResultFunction< FE, RT, UserFunction >::Entity = typename GridView::template Codim<0>::Entity

◆ FERequirementType

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
using Ikarus::ResultFunction< FE, RT, UserFunction >::FERequirementType = typename FiniteElement::FERequirementType

◆ FiniteElement

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
using Ikarus::ResultFunction< FE, RT, UserFunction >::FiniteElement = FE

◆ GridView

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
using Ikarus::ResultFunction< FE, RT, UserFunction >::GridView = typename FiniteElement::GridView

Constructor & Destructor Documentation

◆ ResultFunction()

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
Ikarus::ResultFunction< FE, RT, UserFunction >::ResultFunction ( std::vector< FiniteElement > *  fes,
const FERequirementType req 
)
inline

Constructs a ResultFunction object with given finite elements, ferequirements

Parameters
fesPointer to a vector of finite elements
reqFERequirements for evaluation

Member Function Documentation

◆ evaluate()

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
double Ikarus::ResultFunction< FE, RT, UserFunction >::evaluate ( int  comp,
const Entity e,
const Dune::FieldVector< ctype, griddim > &  local 
) const
inlineoverride

This function is required by the Dune::VTKFunction interface.

Parameters
compStress component index
eEntity on which to evaluate the stress
localLocal coordinates within the entity
Returns
Stress component value

◆ name()

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
constexpr std::string Ikarus::ResultFunction< FE, RT, UserFunction >::name ( ) const
inlineconstexproverride

This function is required by the Dune::VTKFunction interface.

Returns
String representing the name of the result type

◆ ncomps()

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
int Ikarus::ResultFunction< FE, RT, UserFunction >::ncomps ( ) const
inlineoverride

This function is required by the Dune::VTKFunction interface.

Returns
Number of stress components

Member Data Documentation

◆ griddim

template<typename FE , template< typename, int, int > class RT, typename UserFunction = Impl::DefaultUserFunction>
constexpr int Ikarus::ResultFunction< FE, RT, UserFunction >::griddim = GridView::dimension
staticconstexpr

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