dune-pdelab  2.5-dev
localfunctionhelper.hh
Go to the documentation of this file.
1 //-*- tab-width: 4; c-basic-offset: 2; indent-tabs-mode: nil -*-
2 #ifndef DUNE_PDELAB_FUNCTION_LOCALFUNCTIONHELPER_HH
3 #define DUNE_PDELAB_FUNCTION_LOCALFUNCTIONHELPER_HH
4 
6 #include <dune/typetree/visitor.hh>
7 
8 namespace Dune {
9 namespace PDELab {
10 
11 namespace Imp
12 {
13 
14  template<typename Entity>
16  : public TypeTree::TreeVisitor, public TypeTree::DynamicTraversal
17  {
18  PowerCompositeBindVisitor(const Entity & e) : e_(e) {}
19  template<typename LeafNode, typename TreePath>
20  void leaf(LeafNode& node, TreePath treePath) const
21  {
22  node.bind(e_);
23  }
24  const Entity & e_;
25  };
26 
28  : public TypeTree::TreeVisitor, public TypeTree::DynamicTraversal
29  {
30  template<typename LeafNode, typename TreePath>
31  void leaf(LeafNode& node, TreePath treePath) const
32  {
33  node.unbind();
34  }
35  };
36 
37  template<typename F>
39  : public TypeTree::LeafNode
40  , public F
41  {
42  public:
45  F(f)
46  {}
47  };
48 
49 } // end namespace Imp
50 } // end namespace PDELab
51 } // end namespace Dune
52 
53 #endif // DUNE_PDELAB_FUNCTION_LOCALFUNCTIONHELPER_HH
const Entity & e
Definition: localfunctionspace.hh:111
LocalFunctionLeafNodeWrapper(const F &f)
Definition: localfunctionhelper.hh:44
PowerCompositeBindVisitor(const Entity &e)
Definition: localfunctionhelper.hh:18
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
Definition: localfunctionhelper.hh:15
const Entity & e_
Definition: localfunctionhelper.hh:24
Definition: localfunctionhelper.hh:38
DifferentiableFunctionLocalViewTag ImplementationTag
Definition: localfunctionhelper.hh:43
Definition: localfunctionhelper.hh:27
void leaf(LeafNode &node, TreePath treePath) const
Definition: localfunctionhelper.hh:20
void leaf(LeafNode &node, TreePath treePath) const
Definition: localfunctionhelper.hh:31