DUNE PDELab (2.7)

localfunctionspace.hh
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_LOCALFUNCTIONSPACE_HH
4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_LOCALFUNCTIONSPACE_HH
5 
6 #include<vector>
7 
10 
11 #include <dune/geometry/referenceelements.hh>
12 
13 #include <dune/localfunctions/common/interfaceswitch.hh>
14 #include <dune/localfunctions/common/localkey.hh>
15 
16 #include <dune/typetree/typetree.hh>
17 
18 #include <dune/pdelab/gridfunctionspace/tags.hh>
20 
21 namespace Dune {
22  namespace PDELab {
23 
27 
28  //=======================================
29  // local function space base: metaprograms
30  //=======================================
31 
32  namespace {
33 
34  // the bogus template parameter is necessary to make GCC honor the friend declaration
35  // in the LocalFunctionSpace (probably a GCC bug)
36  template<typename = int>
37  struct PropagateGlobalStorageVisitor
38  : public TypeTree::TreeVisitor
39  , public TypeTree::DynamicTraversal
40  {
41 
42  template<typename LFS, typename Child, typename TreePath, typename ChildIndex>
43  void beforeChild(const LFS& lfs, Child& child, TreePath treePath, ChildIndex childIndex) const
44  {
45  child._dof_indices = lfs._dof_indices;
46  }
47  };
48 
49  // This visitor is not used in standard PDELab code, but is necessary for MultiDomain
50  // It is defined here due to the necessary friend declarations in the local function spaces.
51  // for template parameter see above
52  template<typename = int>
53  struct ClearSizeVisitor
54  : public TypeTree::TreeVisitor
55  , public TypeTree::DynamicTraversal
56  {
57 
58  template<typename Node, typename TreePath>
59  void pre(Node& node, TreePath treePath)
60  {
61  leaf(node,treePath);
62  }
63 
64  template<typename Node, typename TreePath>
65  void leaf(Node& node, TreePath treePath)
66  {
67  node.offset = offset;
68  node.n = 0;
69  }
70 
71  ClearSizeVisitor(std::size_t offset_)
72  : offset(offset_)
73  {}
74 
75  const std::size_t offset;
76 
77  };
78 
79 
80  template<typename Entity, bool fast>
81  struct ComputeSizeVisitor
82  : public TypeTree::TreeVisitor
83  , public TypeTree::DynamicTraversal
84  {
85 
86  template<typename Node, typename TreePath>
87  void pre(Node& node, TreePath treePath)
88  {
89  node.offset = offset;
90  }
91 
92  template<typename Node, typename TreePath>
93  void post(Node& node, TreePath treePath)
94  {
95  node.n = offset - node.offset;
96  }
97 
98  template<typename Node, typename TreePath>
99  void leaf(Node& node, TreePath treePath)
100  {
101  node.offset = offset;
102  if (fast)
103  {
104  node.pfe = nullptr;
105  node.n = node.pgfs->finiteElementMap().maxLocalSize();
106  Node::FESwitch::setStore(node.pfe, node.pgfs->finiteElementMap().find(e));
107  }
108  else
109  {
110  Node::FESwitch::setStore(node.pfe, node.pgfs->finiteElementMap().find(e));
111  node.n = Node::FESwitch::basis(*node.pfe).size();
112  }
113  offset += node.n;
114  }
115 
116  ComputeSizeVisitor(const Entity& entity, std::size_t offset_ = 0)
117  : e(entity)
118  , offset(offset_)
119  {}
120 
121  const Entity& e;
122  std::size_t offset;
123 
124  };
125 
126 
127  template<typename Entity, bool fast>
128  struct FillIndicesVisitor
129  : public TypeTree::TreeVisitor
130  , public TypeTree::DynamicTraversal
131  {
132 
133  template<typename Node, typename TreePath>
134  void leaf(Node& node, TreePath treePath)
135  {
136  // setup DOFIndices for this finite element
137  node.dofIndices(e,node._dof_indices->begin()+node.offset,node._dof_indices->begin()+node.offset+node.n,std::integral_constant<bool,fast>{});
138  }
139 
140  template<typename Node, typename Child, typename TreePath, typename ChildIndex>
141  void afterChild(const Node& node, const Child& child, TreePath treePath, ChildIndex childIndex)
142  {
143  // Just skip the entire function space structure handling in fast mode
144  // This **really** breaks any attempt at using the DOFIndex for anything other
145  // than as input to the FastDGGridOperator machine.
146  // You have been warned!
147  if (not fast)
148  for (std::size_t i = 0; i<child.n; ++i)
149  {
150  // update tree path for the DOFIndices of the child
151  (*node._dof_indices)[child.offset+i].treeIndex().push_back(childIndex);
152  }
153  }
154 
155  FillIndicesVisitor(const Entity& entity)
156  : e(entity)
157  {}
158 
159  const Entity& e;
160  };
161 
162  } // end empty namespace
163 
164  //=======================================
165  // local function space base: base class
166  //=======================================
167 
169  template<typename GFS, typename DI>
171  {
174 
176  typedef GFS GridFunctionSpace;
177 
179  typedef typename GFS::Traits::SizeType SizeType;
180 
182  typedef typename std::vector<SizeType> IndexContainer;
183 
185  typedef DI DOFIndex;
186 
188  typedef typename std::vector<DI> DOFIndexContainer;
189 
190  };
191 
192  template <typename GFS, typename DOFIndex>
193  class LocalFunctionSpaceBaseNode
194  {
195  typedef typename GFS::Traits::Backend B;
196 
197  template<typename>
198  friend struct PropagateGlobalStorageVisitor;
199 
200  template<typename,bool>
201  friend struct ComputeSizeVisitor;
202 
203  template<typename,bool>
204  friend struct FillIndicesVisitor;
205 
206  template<typename LFS, typename C, typename Tag, bool>
207  friend class LFSIndexCacheBase;
208 
209  public:
211 
213  LocalFunctionSpaceBaseNode (std::shared_ptr<const GFS> gfs)
214  : pgfs(gfs)
215  , _dof_index_storage()
216  , _dof_indices(&_dof_index_storage)
217  , n(0)
218  {}
219 
221  typename Traits::IndexContainer::size_type size () const
222  {
223  return n;
224  }
225 
226  std::size_t subSpaceDepth() const
227  {
228  return 0;
229  }
230 
232  typename Traits::IndexContainer::size_type maxSize () const
233  {
234  // _dof_indices is always as large as the max local size of the root GFS
235  return _dof_indices->size();
236  }
237 
239 
245  typename Traits::IndexContainer::size_type localVectorSize () const
246  {
247  return _dof_indices->size();
248  }
249 
251  typename Traits::IndexContainer::size_type localIndex (typename Traits::IndexContainer::size_type index) const
252  {
253  return offset+index;
254  }
255 
257 
264  const typename Traits::DOFIndex& dofIndex(typename Traits::IndexContainer::size_type index) const
265  {
266  return (*_dof_indices)[offset + index];
267  }
268 
270  void debug () const
271  {
272  std::cout << n << " indices = (";
273  for (typename Traits::IndexContainer::size_type k=0; k<n; k++)
274  std::cout << (*_dof_indices)[localIndex(k)] << " ";
275  std::cout << ")" << std::endl;
276  }
277 
279  const GFS& gridFunctionSpace() const
280  {
281  return *pgfs;
282  }
283 
284  public:
285  template<typename NodeType>
286  void setup(NodeType& node)
287  {
288  _dof_index_storage.resize(gridFunctionSpace().ordering().maxLocalSize());
289  TypeTree::applyToTree(node,PropagateGlobalStorageVisitor<>());
290  }
291 
292  std::shared_ptr<GFS const> pgfs;
293  typename Traits::DOFIndexContainer _dof_index_storage;
294  typename Traits::DOFIndexContainer* _dof_indices;
295  typename Traits::IndexContainer::size_type n;
296  typename Traits::IndexContainer::size_type offset;
297  };
298 
300  template<typename GFS, typename DOFIndex>
302  {
304  typedef typename GFS::Traits::GridViewType GridViewType;
305 
307  typedef typename GFS::Traits::GridViewType GridView;
308 
309  using EntitySet = typename GFS::Traits::EntitySet;
310 
312  using Element = typename EntitySet::Element;
313  };
314 
315  template <typename GFS, typename DOFIndex>
316  class GridViewLocalFunctionSpaceBaseNode :
317  public LocalFunctionSpaceBaseNode<GFS,DOFIndex>
318  {
319  typedef typename GFS::Traits::Backend B;
320  typedef LocalFunctionSpaceBaseNode<GFS,DOFIndex> BaseT;
321 
322  public:
324 
326  GridViewLocalFunctionSpaceBaseNode (std::shared_ptr<const GFS> gfs)
327  : BaseT(gfs)
328  {}
329 
330  protected:
332 
344  template<typename NodeType, bool fast = false>
345  void bind (NodeType& node, const typename Traits::Element& e, std::integral_constant<bool,fast> = std::integral_constant<bool,fast>{});
346  };
347 
348  template <typename GFS, typename DOFIndex>
349  template <typename NodeType, bool fast>
350  void GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex>::bind (NodeType& node,
352  std::integral_constant<bool,fast>)
353  {
355  assert(&node == this);
356 
357  // compute sizes
358  ComputeSizeVisitor<Element,fast> csv(e);
359  TypeTree::applyToTree(node,csv);
360 
361 
362  // initialize iterators and fill indices
363  FillIndicesVisitor<Element,fast> fiv(e);
364  TypeTree::applyToTree(node,fiv);
365  }
366 
367  //=======================================
368  // local function space base: power implementation
369  //=======================================
370 
372  template<typename GFS, typename DOFIndex, typename N>
374  {
376  typedef N NodeType;
377  };
378 
379  // local function space for a power grid function space
380  template<typename GFS, typename DOFIndex, typename ChildLFS, std::size_t k>
381  class PowerLocalFunctionSpaceNode :
382  public GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex>,
383  public TypeTree::PowerNode<ChildLFS,k>
384  {
385  typedef GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex> BaseT;
386  typedef TypeTree::PowerNode<ChildLFS,k> TreeNode;
387 
388  template<typename>
389  friend struct PropagateGlobalStorageVisitor;
390 
391  template<typename>
392  friend struct ClearSizeVisitor;
393 
394  template<typename,bool>
395  friend struct ComputeSizeVisitor;
396 
397  template<typename,bool>
398  friend struct FillIndicesVisitor;
399 
400  public:
402 
404 
406  template<typename Transformation>
407  PowerLocalFunctionSpaceNode (std::shared_ptr<const GFS> gfs,
408  const Transformation& t,
409  const std::array<std::shared_ptr<ChildLFS>,k>& children)
410  : BaseT(gfs)
411  , TreeNode(children)
412  {}
413 
414  template<typename Transformation>
415  PowerLocalFunctionSpaceNode (const GFS& gfs,
416  const Transformation& t,
417  const std::array<std::shared_ptr<ChildLFS>,k>& children)
418  : BaseT(stackobject_to_shared_ptr(gfs))
419  , TreeNode(children)
420  {}
421 
423  template<bool fast = false>
424  void bind (const typename Traits::Element& e, std::integral_constant<bool,fast> fast_ = std::integral_constant<bool,fast>{})
425  {
426  // call method on base class, this avoid the barton neckman trick
427  BaseT::bind(*this,e,fast_);
428  }
429 
430  };
431 
432 
433  // transformation template, we need a custom template in order to inject the DOFIndex type into the LocalFunctionSpace
434  template<typename SourceNode, typename Transformation>
435  struct power_gfs_to_lfs_template
436  {
437  template<typename TC>
438  struct result
439  {
440  typedef PowerLocalFunctionSpaceNode<SourceNode,typename Transformation::DOFIndex,TC,TypeTree::StaticDegree<SourceNode>::value> type;
441  };
442  };
443 
444  // register PowerGFS -> LocalFunctionSpace transformation
445  template<typename PowerGridFunctionSpace, typename Params>
446  TypeTree::TemplatizedGenericPowerNodeTransformation<
447  PowerGridFunctionSpace,
448  gfs_to_lfs<Params>,
449  power_gfs_to_lfs_template<PowerGridFunctionSpace,gfs_to_lfs<Params> >::template result
450  >
451  registerNodeTransformation(PowerGridFunctionSpace* pgfs, gfs_to_lfs<Params>* t, PowerGridFunctionSpaceTag* tag);
452 
453 
454  //=======================================
455  // local function space base: composite implementation
456  //=======================================
457 
458  // local function space for a power grid function space
459  template<typename GFS, typename DOFIndex, typename... Children>
460  class CompositeLocalFunctionSpaceNode
461  : public GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex>
462  , public TypeTree::CompositeNode<Children...>
463  {
464  typedef GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex> BaseT;
465  typedef TypeTree::CompositeNode<Children...> NodeType;
466 
467  template<typename>
468  friend struct PropagateGlobalStorageVisitor;
469 
470  template<typename>
471  friend struct ClearSizeVisitor;
472 
473  template<typename,bool>
474  friend struct ComputeSizeVisitor;
475 
476  template<typename,bool>
477  friend struct FillIndicesVisitor;
478 
479  public:
480  typedef PowerCompositeLocalFunctionSpaceTraits<GFS,DOFIndex,CompositeLocalFunctionSpaceNode> Traits;
481 
482  typedef CompositeLocalFunctionSpaceTag ImplementationTag;
483 
484  template<typename Transformation>
485  CompositeLocalFunctionSpaceNode (std::shared_ptr<const GFS> gfs,
486  const Transformation& t,
487  std::shared_ptr<Children>... children)
488  : BaseT(gfs)
489  , NodeType(children...)
490  {}
491 
492  template<typename Transformation>
493  CompositeLocalFunctionSpaceNode (const GFS& gfs,
494  const Transformation& t,
495  std::shared_ptr<Children>... children)
496  : BaseT(stackobject_to_shared_ptr(gfs))
497  , NodeType(children...)
498  {}
499 
501  template<bool fast = false>
502  void bind (const typename Traits::Element& e, std::integral_constant<bool,fast> fast_ = std::integral_constant<bool,fast>{})
503  {
504  // call method on base class, this avoid the barton neckman trick
505  BaseT::bind(*this,e,fast_);
506  }
507 
508  };
509 
510  // transformation template, we need a custom template in order to inject the MultiIndex type into the LocalFunctionSpace
511  template<typename SourceNode, typename Transformation>
512  struct composite_gfs_to_lfs_template
513  {
514  template<typename... TC>
515  struct result
516  {
517  typedef CompositeLocalFunctionSpaceNode<SourceNode,typename Transformation::DOFIndex,TC...> type;
518  };
519  };
520 
521  // register CompositeGFS -> LocalFunctionSpace transformation (variadic version)
522  template<typename CompositeGridFunctionSpace, typename Params>
523  TypeTree::TemplatizedGenericCompositeNodeTransformation<
524  CompositeGridFunctionSpace,
525  gfs_to_lfs<Params>,
526  composite_gfs_to_lfs_template<CompositeGridFunctionSpace,gfs_to_lfs<Params> >::template result
527  >
528  registerNodeTransformation(CompositeGridFunctionSpace* cgfs, gfs_to_lfs<Params>* t, CompositeGridFunctionSpaceTag* tag);
529 
530 
531  //=======================================
532  // local function space base: single component implementation
533  //=======================================
534 
536  template<typename GFS, typename DOFIndex, typename N>
538  {
540  typedef typename GFS::Traits::FiniteElementType FiniteElementType;
541 
542  typedef typename GFS::Traits::FiniteElementType FiniteElement;
543 
545  typedef typename GFS::Traits::ConstraintsType ConstraintsType;
546 
547  typedef typename GFS::Traits::ConstraintsType Constraints;
548 
549  };
550 
552  template<typename GFS, typename DOFIndex>
554  : public GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex>
555  , public TypeTree::LeafNode
556  {
557  typedef GridViewLocalFunctionSpaceBaseNode<GFS,DOFIndex> BaseT;
558 
559  template<typename>
560  friend struct PropagateGlobalStorageVisitor;
561 
562  template<typename>
563  friend struct ClearSizeVisitor;
564 
565  template<typename,bool>
566  friend struct ComputeSizeVisitor;
567 
568  template<typename,bool>
569  friend struct FillIndicesVisitor;
570 
571  public:
573 
575 
576  private:
579  > FESwitch;
580 
581  public:
582 
584  template<typename Transformation>
585  LeafLocalFunctionSpaceNode (std::shared_ptr<const GFS> gfs, const Transformation& t)
586  : BaseT(gfs)
587  {
588  }
589 
590  template<typename Transformation>
591  LeafLocalFunctionSpaceNode (const GFS& gfs, const Transformation& t)
592  : BaseT(stackobject_to_shared_ptr(gfs))
593  {
594  }
595 
597  const typename Traits::FiniteElementType& finiteElement () const
598  {
599  assert(pfe);
600  return *pfe;
601  }
602 
604  const typename Traits::ConstraintsType& constraints () const
605  {
606  return this->pgfs->constraints();
607  }
608 
610  template<typename Entity, typename DOFIndexIterator, bool fast>
611  void dofIndices(const Entity& e, DOFIndexIterator it, DOFIndexIterator endit, std::integral_constant<bool,fast>)
612  {
613  if (fast)
614  {
615  auto gt = e.type();
616  auto index = this->gridFunctionSpace().entitySet().indexSet().index(e);
617  GFS::Ordering::Traits::DOFIndexAccessor::store(*it,gt,index,0);
618  ++it;
619  }
620  else
621  {
622  // get layout of entity
623  const typename FESwitch::Coefficients &coeffs =
625 
626  using EntitySet = typename GFS::Traits::EntitySet;
627  auto es = this->gridFunctionSpace().entitySet();
628 
630 
631  for (std::size_t i = 0; i < std::size_t(coeffs.size()); ++i, ++it)
632  {
633  // get geometry type of subentity
634  auto gt = refEl.type(coeffs.localKey(i).subEntity(),
635  coeffs.localKey(i).codim());
636 
637  // evaluate consecutive index of subentity
638  auto index = es.indexSet().subIndex(e,
639  coeffs.localKey(i).subEntity(),
640  coeffs.localKey(i).codim());
641 
642  // store data
643  GFS::Ordering::Traits::DOFIndexAccessor::store(*it,gt,index,coeffs.localKey(i).index());
644 
645  // make sure we don't write past the end of the iterator range
646  assert(it != endit);
647  }
648  }
649  }
650 
651 
652  template<typename GC, typename LC>
653  void insert_constraints (const LC& lc, GC& gc) const
654  {
655  // LC and GC are maps of maps
656  typedef typename LC::const_iterator local_col_iterator;
657  typedef typename LC::value_type::second_type::const_iterator local_row_iterator;
658  typedef typename GC::iterator global_col_iterator;
659  typedef typename GC::value_type::second_type global_row_type;
660 
661  for (local_col_iterator cit=lc.begin(); cit!=lc.end(); ++cit)
662  {
663 
664  // look up entry in global map, if not found, insert an empty one.
665  global_col_iterator gcit = gc.insert(std::make_pair(std::ref(this->dofIndex(cit->first)),global_row_type())).first;
666 
667  // copy row to global container with transformed indices
668  for (local_row_iterator rit=(cit->second).begin(); rit!=(cit->second).end(); ++rit)
669  gcit->second[this->dofIndex(rit->first)] = rit->second;
670  }
671  }
672 
674  template<bool fast = false>
675  void bind (const typename Traits::Element& e, std::integral_constant<bool,fast> fast_ = std::integral_constant<bool,fast>{})
676  {
677  // call method on base class, this avoid the barton neckman trick
678  BaseT::bind(*this,e,fast_);
679  }
680 
681  // private:
682  typename FESwitch::Store pfe;
683  };
684 
685  // Register LeafGFS -> LocalFunctionSpace transformation
686  template<typename GridFunctionSpace, typename Params>
687  TypeTree::GenericLeafNodeTransformation<
688  GridFunctionSpace,
689  gfs_to_lfs<Params>,
690  LeafLocalFunctionSpaceNode<GridFunctionSpace,typename gfs_to_lfs<Params>::DOFIndex>
691  >
692  registerNodeTransformation(GridFunctionSpace* gfs, gfs_to_lfs<Params>* t, LeafGridFunctionSpaceTag* tag);
693 
694  //=======================================
695  // local function facade
696  //=======================================
697 
698  template <typename GFS, typename TAG=AnySpaceTag>
699  class LocalFunctionSpace;
700 
714  template <typename GFS, typename TAG>
716  public TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::Type
717  {
718  typedef typename TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::Type BaseT;
719  typedef typename BaseT::Traits::IndexContainer::size_type I;
720  typedef typename BaseT::Traits::IndexContainer::size_type LocalIndex;
721 
722  template<typename>
723  friend struct PropagateGlobalStorageVisitor;
724 
725  template<typename>
726  friend struct ClearSizeVisitor;
727 
728  template<typename>
729  friend struct ComputeSizeVisitor;
730 
731  template<typename>
732  friend struct FillIndicesVisitor;
733 
734  public:
735  typedef typename BaseT::Traits Traits;
736 
737  LocalFunctionSpace(const GFS & gfs)
738  : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform(gfs))
739  {
740  this->setup(*this);
741  }
742 
744  : BaseT(lfs)
745  {
746  // We need to reset the DOFIndex storage pointers in the new LFS tree,
747  // as they are still pointing to the _dof_index_storage of the
748  // old tree.
749  this->_dof_indices = &(this->_dof_index_storage);
750  this->setup(*this);
751  }
752 
753  LocalIndex localIndex (typename Traits::IndexContainer::size_type index) const
754  {
755  return LocalIndex(BaseT::localIndex(index));
756  }
757 
758  private:
759  // we don't support getChild yet, so let's hide it!
760  template<int i>
761  void getChild () const;
762  template<int i>
763  void child () const;
764  };
765 
766  // specialization for AnySpaceTag
767  // WARNING: If you modify this class, make sure to also fix the specialization in
768  // subspacelocalfunctionspace.hh!
769  template <typename GFS>
770  class LocalFunctionSpace<GFS, AnySpaceTag> :
771  public TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::Type
772  {
773  typedef typename TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::Type BaseT;
774 
775  template<typename>
776  friend struct PropagateGlobalStorageVisitor;
777 
778  template<typename>
779  friend struct ClearSizeVisitor;
780 
781  template<typename,bool>
782  friend struct ComputeSizeVisitor;
783 
784  template<typename,bool>
785  friend struct FillIndicesVisitor;
786 
787  public:
788 
789  LocalFunctionSpace(const GFS & gfs)
790  : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform(gfs))
791  {
792  this->_dof_indices = &(this->_dof_index_storage);
793  this->setup(*this);
794  }
795 
796  LocalFunctionSpace(std::shared_ptr<const GFS> pgfs)
797  : BaseT(*TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform_storage(pgfs))
798  {
799  this->_dof_indices = &(this->_dof_index_storage);
800  this->setup(*this);
801  }
802 
803  LocalFunctionSpace(const LocalFunctionSpace & lfs)
804  : BaseT(lfs)
805  {
806  // We need to reset the DOFIndex storage pointers in the new LFS tree,
807  // as they are still pointing to the _dof_index_storage of the
808  // old tree.
809  this->_dof_indices = &(this->_dof_index_storage);
810  this->setup(*this);
811  }
812 
813  };
814 
816  } // namespace PDELab
817 } // namespace Dune
818 
819 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_LOCALFUNCTIONSPACE_HH
Wrapper class for entities.
Definition: entity.hh:64
single component local function space
Definition: localfunctionspace.hh:556
void dofIndices(const Entity &e, DOFIndexIterator it, DOFIndexIterator endit, std::integral_constant< bool, fast >)
Calculates the multiindices associated with the given entity.
Definition: localfunctionspace.hh:611
LeafLocalFunctionSpaceNode(std::shared_ptr< const GFS > gfs, const Transformation &t)
initialize with grid function space
Definition: localfunctionspace.hh:585
const Traits::ConstraintsType & constraints() const
get constraints engine
Definition: localfunctionspace.hh:604
void bind(const typename Traits::Element &e, std::integral_constant< bool, fast > fast_=std::integral_constant< bool, fast >{})
bind local function space to entity
Definition: localfunctionspace.hh:675
const Traits::FiniteElementType & finiteElement() const
get finite element
Definition: localfunctionspace.hh:597
Create a local function space from a global function space.
Definition: localfunctionspace.hh:717
Base class for leaf nodes in a dune-typetree.
Definition: leafnode.hh:25
Collect k instances of type T within a dune-typetree.
Definition: powernode.hh:50
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:156
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition: nodeinterface.hh:66
void registerNodeTransformation(SourceNode *, Transformation *, Tag *)
Register transformation descriptor to transform SourceNode with Transformation.
constexpr HybridTreePath< T... > treePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition: treepath.hh:188
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition: traversal.hh:213
typename impl::_Child< Node, indices... >::type Child
Template alias for the type of a child node given by a list of child indices.
Definition: childextraction.hh:276
ImplementationDefined child(Node &&node, Indices... indices)
Extracts the child of a node given by a sequence of compile-time and run-time indices.
Definition: childextraction.hh:179
Dune namespace.
Definition: alignedallocator.hh:14
shared_ptr< T > stackobject_to_shared_ptr(T &t)
Create a shared_ptr for a stack-allocated object.
Definition: shared_ptr.hh:75
This file implements the class shared_ptr (a reference counting pointer), for those systems that don'...
Standard Dune debug streams.
Switch for uniform treatment of finite element with either the local or the global interface.
Definition: interfaceswitch.hh:27
FiniteElement::Traits::Coefficients Coefficients
export the type of the coefficients
Definition: interfaceswitch.hh:33
std::shared_ptr< const FiniteElement > Store
Type for storing finite elements.
Definition: interfaceswitch.hh:68
static const Coefficients & coefficients(const FiniteElement &fe)
access coefficients
Definition: interfaceswitch.hh:42
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition: referenceelements.hh:196
Definition: localfunctionspacetags.hh:40
traits for local function space on a gridview
Definition: localfunctionspace.hh:302
GFS::Traits::GridViewType GridViewType
Type of the grid view that the underlying grid function space is defined on.
Definition: localfunctionspace.hh:304
GFS::Traits::GridViewType GridView
Type of the grid view that the underlying grid function space is defined on.
Definition: localfunctionspace.hh:307
typename EntitySet::Element Element
Type of codim 0 entity in the grid.
Definition: localfunctionspace.hh:312
Tag denoting a LeafLocalFunctionSpace.
Definition: tags.hh:200
traits for single component local function space
Definition: localfunctionspace.hh:538
GFS::Traits::ConstraintsType ConstraintsType
Type of constraints engine.
Definition: localfunctionspace.hh:545
GFS::Traits::FiniteElementType FiniteElementType
Type of local finite element.
Definition: localfunctionspace.hh:540
traits mapping global function space information to local function space
Definition: localfunctionspace.hh:171
GFS GridFunctionSpace
Type of the underlying grid function space.
Definition: localfunctionspace.hh:176
std::vector< SizeType > IndexContainer
Type of container to store indices.
Definition: localfunctionspace.hh:182
GFS::Traits::SizeType SizeType
Type to store indices from Backend.
Definition: localfunctionspace.hh:179
GFS GridFunctionSpaceType
Type of the underlying grid function space.
Definition: localfunctionspace.hh:173
DI DOFIndex
Type of MultiIndex associated with this LocalFunctionSpace.
Definition: localfunctionspace.hh:185
std::vector< DI > DOFIndexContainer
Type of container to store multiindices.
Definition: localfunctionspace.hh:188
traits for multi component local function space
Definition: localfunctionspace.hh:374
N NodeType
type of local function space node
Definition: localfunctionspace.hh:376
Tag denoting a PowerLocalFunctionSpace.
Definition: tags.hh:194
Transform a TypeTree.
Definition: transformation.hh:93
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)