KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::FunctionViews::Gradient< Function, asVector > Class Template Reference

Derivative of a given finite element function. More...

#include <functionviews.hh>

Public Types

typedef Function::Space Space
typedef Function::Scalar Scalar
using ValueType

Public Member Functions

 Gradient (Function const &f_)
Space const & space () const
template<class SFS>
int order (SFS const &sfs) const
ValueType value (typename Function::Space::Evaluator const &evaluator) const
 evaluates the derivative
template<class Cell, class Position>
ValueType value (Cell const &cell, Position const &xi) const
 evaluates the derivative

Static Public Attributes

static int const dim = Space::dim

(Note that these are not member symbols.)

template<class Function>
Gradient< Function, false > gradient (Function const &f)
 creates a function view of the gradient
template<class Function>
Gradient< Function, true > gradientAsVector (Function const &f)
 creates a function view of the gradient

Detailed Description

template<typename Function, bool asVector = Function::components==1>
class Kaskade::FunctionViews::Gradient< Function, asVector >

Derivative of a given finite element function.

For a finite element function \( \Omega \subset \mathbb{R}^n \to \mathbb{R}^m \), this provides a function view with values in

  • \( \mathbb{R}^{m} \) if \( m == 1 \)
  • \( \mathbb{R}^{n\times m} \) if \( m > 1 \) and asVector==false
  • \( \mathbb{R}^{nm} \) if \( m > 1 \) and asVector==true, with columns of \( f_x \) concatenated.

For more information on the construction of such views cf. FunctionViews

Definition at line 114 of file functionviews.hh.

Member Typedef Documentation

◆ Scalar

template<typename Function, bool asVector = Function::components==1>
typedef Function::Scalar Kaskade::FunctionViews::Gradient< Function, asVector >::Scalar

Definition at line 122 of file functionviews.hh.

◆ Space

template<typename Function, bool asVector = Function::components==1>
typedef Function::Space Kaskade::FunctionViews::Gradient< Function, asVector >::Space

Definition at line 119 of file functionviews.hh.

◆ ValueType

template<typename Function, bool asVector = Function::components==1>
using Kaskade::FunctionViews::Gradient< Function, asVector >::ValueType
Initial value:
std::conditional_t<asVector, Dune::FieldVector<Scalar,dim*m>,

Definition at line 125 of file functionviews.hh.

Constructor & Destructor Documentation

◆ Gradient()

template<typename Function, bool asVector = Function::components==1>
Kaskade::FunctionViews::Gradient< Function, asVector >::Gradient ( Function const & f_)
inline

Definition at line 128 of file functionviews.hh.

Referenced by gradient(), and gradientAsVector().

Member Function Documentation

◆ order()

template<typename Function, bool asVector = Function::components==1>
template<class SFS>
int Kaskade::FunctionViews::Gradient< Function, asVector >::order ( SFS const & sfs) const
inline

Definition at line 137 of file functionviews.hh.

◆ space()

template<typename Function, bool asVector = Function::components==1>
Space const & Kaskade::FunctionViews::Gradient< Function, asVector >::space ( ) const
inline

Definition at line 131 of file functionviews.hh.

◆ value() [1/2]

template<typename Function, bool asVector = Function::components==1>
template<class Cell, class Position>
ValueType Kaskade::FunctionViews::Gradient< Function, asVector >::value ( Cell const & cell,
Position const & xi ) const
inline

evaluates the derivative

Returns
for scalar functions, a derivative vector, for vectorial components, the Jacobian

Definition at line 156 of file functionviews.hh.

◆ value() [2/2]

template<typename Function, bool asVector = Function::components==1>
ValueType Kaskade::FunctionViews::Gradient< Function, asVector >::value ( typename Function::Space::Evaluator const & evaluator) const
inline

evaluates the derivative

Returns
for scalar functions, a derivative vector, for vectorial components, the Jacobian

Definition at line 146 of file functionviews.hh.

Member Data Documentation

◆ dim

template<typename Function, bool asVector = Function::components==1>
int const Kaskade::FunctionViews::Gradient< Function, asVector >::dim = Space::dim
static

Definition at line 120 of file functionviews.hh.


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