Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Dune::Fufem::Forms::ShapeFunctionCache< Node, CT, Dummy > Class Template Reference

A hierarchic cache for storing shape function evaluations for a tree. More...

Detailed Description

template<class Node, class CT = double, class Dummy = void>
class Dune::Fufem::Forms::ShapeFunctionCache< Node, CT, Dummy >

A hierarchic cache for storing shape function evaluations for a tree.

This caches evaluations for a whole local ansatz tree in the sense of dune-functions and a single quadrature rule. The cache is implemented as nested container. Given quadrature rule and tree, a ShapeFunctionCache can be created using either

auto cache = ShapeFunctionCache<Tree>(rule, tree);
A hierarchic cache for storing shape function evaluations for a tree.
Definition shapefunctioncache.hh:107

or

auto cache = ShapeFunctionCache<Tree>(rule);
cache.setTree(tree);

Now, using a treePath to some node in the tree, the index k of a quadrature point and the index j of a shape function, the cached value can be obtained using

const auto& values = cache[treePath].getValues()[k][j];
const auto& jacobian = cache[treePath].getJacobians()[k][j];
const auto& globalJacobian = cache[treePath].getGlobalJacobians()[k][j];
auto jacobian(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the jacobian of an operator.
Definition userfunctions.hh:1063

The hierarchic cache forms a tree, where each node allows access to direct children using cache[index] or to descendents using cache[treePath]. Cached values are only implemented for leaf nodes so far. Notice that the associated ansatz tree and quadrature rule are stored by reference. While construction of the ShapeFunctionCache works with an unbound tree, the tree has to be bound, when requesting cached values.


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