Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator > Class Template Reference

Adaptor for turning a Fufem::Forms LocalOperator into a LocalFunction. More...

#include <dune/fufem/forms/localfunctionadaptor.hh>

Public Types

using Element = typename LocalOperator::Element
 
using Range = typename LocalOperator::Range
 

Public Member Functions

 LocalFunctionAdaptor (LocalOperator &&localOperator)
 
 LocalFunctionAdaptor (const LocalOperator &localOperator)
 
 LocalFunctionAdaptor (const LocalFunctionAdaptor &other)
 
 LocalFunctionAdaptor (LocalFunctionAdaptor &&other)
 
void bind (const Element &element)
 Bind the LocalFunction to an element.
 
void unbind ()
 Unbind the LocalFunction.
 
bool bound () const
 Check if LocalFunction is already bound to an element.
 
auto operator() (const Domain &x) const
 Evaluate the local function.
 
const ElementlocalContext () const
 Return the element the local-function is bound to.
 

Detailed Description

template<class LocalOperator>
class Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >

Adaptor for turning a Fufem::Forms LocalOperator into a LocalFunction.

In Dune::Fufem::Forms a LocalOperator represents the localized version of a multilinear operator from a tuple of finite element spaces to the integrable functions. In this sense a 0-linear (or nullary) operator represents a fixed integrable function and its LocalOperator is essentially a LocalFunction in the sense of Dune::Functions. However, the interface of a nullary LocalOperator and a nullary LocalFunction is slightly different: While the LocalFunction can simply be evaluated at points given by local coordinates, a LocalOperator implements cached evaluations an thus requires to first being bound to a cache associated to a QuadratureRule and then being evaluated at a QuadraturePoint identified by an index.

The LocalFunctionAdaptor adapts a LocalOperator to the LocalFunction interface by managing a local cache and binding passing it to the operator in the desired form. This is meant to be used in nullary Dune::Fufem::Forms operators to implement the GridFunction interface of Dune::Functions.

Member Typedef Documentation

◆ Element

template<class LocalOperator >
using Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::Element = typename LocalOperator::Element

◆ Range

template<class LocalOperator >
using Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::Range = typename LocalOperator::Range

Constructor & Destructor Documentation

◆ LocalFunctionAdaptor() [1/4]

template<class LocalOperator >
Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::LocalFunctionAdaptor ( LocalOperator &&  localOperator)
inline

◆ LocalFunctionAdaptor() [2/4]

template<class LocalOperator >
Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::LocalFunctionAdaptor ( const LocalOperator &  localOperator)
inline

◆ LocalFunctionAdaptor() [3/4]

template<class LocalOperator >
Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::LocalFunctionAdaptor ( const LocalFunctionAdaptor< LocalOperator > &  other)
inline

◆ LocalFunctionAdaptor() [4/4]

template<class LocalOperator >
Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::LocalFunctionAdaptor ( LocalFunctionAdaptor< LocalOperator > &&  other)
inline

Member Function Documentation

◆ bind()

template<class LocalOperator >
void Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::bind ( const Element element)
inline

Bind the LocalFunction to an element.

◆ bound()

template<class LocalOperator >
bool Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::bound ( ) const
inline

Check if LocalFunction is already bound to an element.

◆ localContext()

template<class LocalOperator >
const Element & Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::localContext ( ) const
inline

Return the element the local-function is bound to.

◆ operator()()

template<class LocalOperator >
auto Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::operator() ( const Domain &  x) const
inline

Evaluate the local function.

◆ unbind()

template<class LocalOperator >
void Dune::Fufem::Forms::LocalFunctionAdaptor< LocalOperator >::unbind ( )
inline

Unbind the LocalFunction.


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