dune-functions  2.5-dev
Classes | Public Types | Public Member Functions | Friends | List of all members
Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R > Class Template Reference

A grid function induced by a global basis and a coefficient vector. More...

#include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>

Classes

class  LocalFunction
 

Public Types

using Basis = B
 
using TreePath = TP
 
using Vector = V
 
using GridView = typename Basis::GridView
 
using EntitySet = GridViewEntitySet< GridView, 0 >
 
using Tree = typename Basis::LocalView::Tree
 
using SubTree = typename TypeTree::ChildForTreePath< Tree, TreePath >
 
using NodeToRangeEntry = NTRE
 
using Domain = typename EntitySet::GlobalCoordinate
 
using Range = R
 
using LocalDomain = typename EntitySet::LocalCoordinate
 
using Element = typename EntitySet::Element
 
using Traits = Imp::GridFunctionTraits< Range(Domain), EntitySet, DefaultDerivativeTraits, 16 >
 

Public Member Functions

 DiscreteGlobalBasisFunction (const Basis &basis, const TreePath &treePath, const V &coefficients, const NodeToRangeEntry &nodeToRangeEntry)
 
 DiscreteGlobalBasisFunction (std::shared_ptr< const Basis > basis, const TreePath &treePath, std::shared_ptr< const V > coefficients, std::shared_ptr< const NodeToRangeEntry > nodeToRangeEntry)
 
const Basisbasis () const
 
const TreePathtreePath () const
 
const V & dofs () const
 
const NodeToRangeEntrynodeToRangeEntry () const
 
Range operator() (const Domain &x) const
 
const EntitySetentitySet () const
 Get associated EntitySet. More...
 

Friends

Traits::DerivativeInterface derivative (const DiscreteGlobalBasisFunction &t)
 
LocalFunction localFunction (const DiscreteGlobalBasisFunction &t)
 

Detailed Description

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
class Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >

A grid function induced by a global basis and a coefficient vector.

This implements the grid function interface by combining a given global basis and a coefficient vector. The part of the spanned space that should be covered by the function is determined by a tree path that specifies the corresponding local ansatz tree.

This class supports mapping of subtrees to multi-component ranges, vector-valued shape functions, and implicit product spaces given by vector-valued coefficients. The mapping of these to the range type is done via the following multistage procedure:

1.Each leaf node N in the local ansatz subtree is associated to an entry RE of the range-type via the given node-to-range-entry-map.

Now let C be the coefficient block for a single basis function and V the value of this basis function at the evaluation point. Notice that both may be scalar, vector, matrix, or general container valued.

2.Each entry of C is associated with a flat index j via FlatVectorBackend. This is normally a lexicographic index. The total scalar dimension according to those flat indices is dim(C). 3.Each entry of V is associated with a flat index k via FlatVectorBackend. This is normally a lexicographic index. The total scalar dimension according to those flat indices dim(V). 4.Each entry of RE is associated with a flat index k via FlatVectorBackend. This is normally a lexicographic index. The total scalar dimension according to those flat indices dim(RE). 5.Via those flat indices we now interpret C,V, and RE as vectors and compute the diadic product (C x V). The entries of this product are mapped to the flat indices for RE lexicographically. I.e. we set

RE[j*dim(V)+k] = C[j] * V[k]

Hence the range entry RE must have dim(RE) = dim(C)*dim(V).

Template Parameters
BType of lobal basis
TPType of tree path specifying the requested subtree of ansatz functions
VType of coefficient vectors
NTREType of node-to-range-entry-map that associates each leaf node in the local ansatz subtree with an entry in the range type
RRange type of this function

Member Typedef Documentation

§ Basis

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Basis = B

§ Domain

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Domain = typename EntitySet::GlobalCoordinate

§ Element

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Element = typename EntitySet::Element

§ EntitySet

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::EntitySet = GridViewEntitySet<GridView, 0>

§ GridView

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::GridView = typename Basis::GridView

§ LocalDomain

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::LocalDomain = typename EntitySet::LocalCoordinate

§ NodeToRangeEntry

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::NodeToRangeEntry = NTRE

§ Range

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Range = R

§ SubTree

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::SubTree = typename TypeTree::ChildForTreePath<Tree, TreePath>

§ Traits

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Traits = Imp::GridFunctionTraits<Range(Domain), EntitySet, DefaultDerivativeTraits, 16>

§ Tree

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Tree = typename Basis::LocalView::Tree

§ TreePath

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::TreePath = TP

§ Vector

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
using Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::Vector = V

Constructor & Destructor Documentation

§ DiscreteGlobalBasisFunction() [1/2]

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::DiscreteGlobalBasisFunction ( const Basis basis,
const TreePath treePath,
const V &  coefficients,
const NodeToRangeEntry nodeToRangeEntry 
)
inline

§ DiscreteGlobalBasisFunction() [2/2]

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::DiscreteGlobalBasisFunction ( std::shared_ptr< const Basis basis,
const TreePath treePath,
std::shared_ptr< const V >  coefficients,
std::shared_ptr< const NodeToRangeEntry nodeToRangeEntry 
)
inline

Member Function Documentation

§ basis()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
const Basis& Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::basis ( ) const
inline

§ dofs()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
const V& Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::dofs ( ) const
inline

§ entitySet()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
const EntitySet& Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::entitySet ( ) const
inline

Get associated EntitySet.

§ nodeToRangeEntry()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
const NodeToRangeEntry& Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::nodeToRangeEntry ( ) const
inline

§ operator()()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
Range Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::operator() ( const Domain x) const
inline

§ treePath()

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
const TreePath& Dune::Functions::DiscreteGlobalBasisFunction< B, TP, V, NTRE, R >::treePath ( ) const
inline

Friends And Related Function Documentation

§ derivative

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
Traits::DerivativeInterface derivative ( const DiscreteGlobalBasisFunction< B, TP, V, NTRE, R > &  t)
friend

§ localFunction

template<typename B, typename TP, typename V, typename NTRE = DefaultNodeToRangeMap<typename std::decay<decltype(std::declval<B>().localView().tree().child(std::declval<TP>()))>::type>, typename R = typename V::value_type>
LocalFunction localFunction ( const DiscreteGlobalBasisFunction< B, TP, V, NTRE, R > &  t)
friend

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