dune-pdelab  2.5-dev
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction Class Reference

#include <dune/pdelab/function/discretegridviewfunction.hh>

Public Types

enum  { maxDiffOrder = LocalBasisTraits::diffOrder - diffOrder }
 
using GlobalFunction = DiscreteGridViewFunction
 
using Domain = LocalDomain
 
using Range = GlobalFunction::Range
 
using Element = GlobalFunction::Element
 
using size_type = std::size_t
 

Public Member Functions

 LocalFunction (const shared_ptr< const GridFunctionSpace > gfs, const shared_ptr< const Vector > v)
 
void bind (const Element &element)
 Bind LocalFunction to grid element. More...
 
void unbind ()
 
const ElementlocalContext () const
 
Range operator() (const Domain &coord)
 Evaluate LocalFunction at bound element. More...
 

Protected Attributes

const shared_ptr< const GridFunctionSpacepgfs_
 
const shared_ptr< const Vectorv_
 
LFS lfs_
 
LFSCache lfs_cache_
 
XView x_view_
 
std::vector< ElementaryRangexl_
 
std::vector< Rangeyb_
 
const Elementelement_
 

Friends

DiscreteGridViewFunction< GFS, V, diffOrder+1 >::LocalFunction derivative (const LocalFunction &t)
 free function to obtain the derivative of a LocalFunction More...
 

Member Typedef Documentation

◆ Domain

template<typename GFS , typename V , int diffOrder = 0>
using Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::Domain = LocalDomain

◆ Element

template<typename GFS , typename V , int diffOrder = 0>
using Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::Element = GlobalFunction::Element

◆ GlobalFunction

template<typename GFS , typename V , int diffOrder = 0>
using Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::GlobalFunction = DiscreteGridViewFunction

◆ Range

template<typename GFS , typename V , int diffOrder = 0>
using Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::Range = GlobalFunction::Range

◆ size_type

template<typename GFS , typename V , int diffOrder = 0>
using Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::size_type = std::size_t

Member Enumeration Documentation

◆ anonymous enum

template<typename GFS , typename V , int diffOrder = 0>
anonymous enum
Enumerator
maxDiffOrder 

Constructor & Destructor Documentation

◆ LocalFunction()

template<typename GFS , typename V , int diffOrder = 0>
Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::LocalFunction ( const shared_ptr< const GridFunctionSpace gfs,
const shared_ptr< const Vector v 
)
inline

Member Function Documentation

◆ bind()

template<typename GFS , typename V , int diffOrder = 0>
void Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::bind ( const Element element)
inline

Bind LocalFunction to grid element.

You must call this method before evaluate() and after changes to the coefficient vector.

◆ localContext()

template<typename GFS , typename V , int diffOrder = 0>
const Element& Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::localContext ( ) const
inline

◆ operator()()

template<typename GFS , typename V , int diffOrder = 0>
Range Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::operator() ( const Domain coord)
inline

Evaluate LocalFunction at bound element.

The result of this method is undefined if you did not call bind() beforehand or changed the coefficient vector after the last call to bind(). In the latter case you have to call bind() again in order to make operator() usable.

◆ unbind()

template<typename GFS , typename V , int diffOrder = 0>
void Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::unbind ( )
inline

Friends And Related Function Documentation

◆ derivative

template<typename GFS , typename V , int diffOrder = 0>
DiscreteGridViewFunction<GFS,V,diffOrder+1>::LocalFunction derivative ( const LocalFunction t)
friend

free function to obtain the derivative of a LocalFunction

This free function will be found by ADL.

It returns an other LocalFunction, which represents the derivative of parameter t. The returned object has always all derivatives. In particular this means that:

  • derivative(lf) yields the jacobian
  • derivative(derivative(lf)) yields the hessian
Todo:
do we really want to return a bound object?
Note
if t is in bound state, the derivative will be bound as well.
Parameters
tlocal function we want to differentiate

Member Data Documentation

◆ element_

template<typename GFS , typename V , int diffOrder = 0>
const Element* Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::element_
protected

◆ lfs_

template<typename GFS , typename V , int diffOrder = 0>
LFS Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::lfs_
protected

◆ lfs_cache_

template<typename GFS , typename V , int diffOrder = 0>
LFSCache Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::lfs_cache_
protected

◆ pgfs_

template<typename GFS , typename V , int diffOrder = 0>
const shared_ptr<const GridFunctionSpace> Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::pgfs_
protected

◆ v_

template<typename GFS , typename V , int diffOrder = 0>
const shared_ptr<const Vector> Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::v_
protected

◆ x_view_

template<typename GFS , typename V , int diffOrder = 0>
XView Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::x_view_
protected

◆ xl_

template<typename GFS , typename V , int diffOrder = 0>
std::vector<ElementaryRange> Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::xl_
mutableprotected

◆ yb_

template<typename GFS , typename V , int diffOrder = 0>
std::vector<Range> Dune::PDELab::DiscreteGridViewFunction< GFS, V, diffOrder >::LocalFunction::yb_
mutableprotected

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