3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_GRIDFUNCTIONSPACE_HH
4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_GRIDFUNCTIONSPACE_HH
13 #include <dune/common/deprecated.hh>
14 #include <dune/common/exceptions.hh>
15 #include <dune/common/stdstreams.hh>
16 #include <dune/common/typetraits.hh>
17 #include <dune/common/shared_ptr.hh>
19 #include <dune/geometry/referenceelements.hh>
20 #include <dune/geometry/type.hh>
22 #include <dune/localfunctions/common/interfaceswitch.hh>
23 #include <dune/localfunctions/common/localkey.hh>
25 #include <dune/common/version.hh>
26 #include <dune/typetree/typetree.hh>
29 #if DUNE_VERSION_LT_REV(DUNE_TYPETREE,2,7,1)
32 template<std::size_t... i>
33 using StaticTreePath = TreePath<i...>;
43 #define _DUNE_PDELAB_SUPPRESS_ISTL_HH_WARNING
45 #undef _DUNE_PDELAB_SUPPRESS_ISTL_HH_WARNING
85 struct _lazy_extract_gridview
90 using type =
typename T::GridView;
95 template<
typename GV_or_ES>
96 using GridView =
typename std::conditional<
98 impl::_lazy_extract_gridview,
100 >::type::template evaluate<GV_or_ES>::type;
104 template<
typename GV_or_ES>
105 using EntitySet =
typename std::conditional<
108 AllEntitySet<GV_or_ES>
123 template<
typename G,
typename L,
typename C,
typename B,
typename O>
181 template<
typename ES,
typename FEM,
typename CE=
NoConstraints,
184 :
public TypeTree::LeafNode
186 GridFunctionSpace<ES,FEM,CE,B,O>,
187 GridFunctionSpaceTraits<ES,FEM,CE,B,O>
193 typedef TypeTree::TransformTree<GridFunctionSpace,gfs_to_ordering<GridFunctionSpace> > ordering_transformation;
195 template<
typename,
typename>
208 typedef typename ES::Traits::template Codim<0>::Entity
Element;
218 typedef typename ordering_transformation::Type
Ordering;
226 typedef typename std::conditional<
245 #if DUNE_PDELAB_WARN_ON_GRIDVIEW_BASED_GFS
246 DUNE_DEPRECATED_MSG(
"GridFunctionSpaces now internally use an EntitySet instead of a GridView, please replace the template parameter and the first constructor parameter by an EntitySet").
249 , pfem(stackobject_to_shared_ptr(fem))
250 , _pce(stackobject_to_shared_ptr(ce))
257 #if DUNE_PDELAB_WARN_ON_GRIDVIEW_BASED_GFS
258 DUNE_DEPRECATED_MSG(
"GridFunctionSpaces now internally use an EntitySet instead of a GridView, please replace the template parameter and the first constructor parameter by an EntitySet").
269 #if DUNE_PDELAB_WARN_ON_GRIDVIEW_BASED_GFS
270 DUNE_DEPRECATED_MSG(
"GridFunctionSpaces now internally use an EntitySet instead of a GridView, please replace the template parameter and the first constructor parameter by an EntitySet").
273 , pfem(stackobject_to_shared_ptr(fem))
274 , _pce(std::make_shared<CE>())
281 #if DUNE_PDELAB_WARN_ON_GRIDVIEW_BASED_GFS
282 DUNE_DEPRECATED_MSG(
"GridFunctionSpaces now internally use an EntitySet instead of a GridView, please replace the template parameter and the first constructor parameter by an EntitySet").
286 , _pce(std::make_shared<CE>())
312 const CE &ce,
const B &
backend = B(),
314 :
BaseT(
backend, ordering_tag), pfem(stackobject_to_shared_ptr(fem)),
315 _pce(stackobject_to_shared_ptr(ce)) {
331 const std::shared_ptr<const FEM> &fem,
332 const std::shared_ptr<const CE> &ce,
360 , pfem(stackobject_to_shared_ptr(fem))
361 , _pce(std::make_shared<CE>())
377 const std::shared_ptr<const FEM> &fem,
382 , _pce(std::make_shared<CE>())
419 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
435 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
451 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
467 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
481 void create_ordering()
const
483 _ordering = std::make_shared<Ordering>(ordering_transformation::transform(*
this));
486 std::shared_ptr<FEM const> pfem;
487 std::shared_ptr<CE const> _pce;
489 mutable std::shared_ptr<Ordering> _ordering;
ordering_transformation::Type Ordering
Definition: gridfunctionspace.hh:218
GridFunctionSpace(const typename Traits::GridView &gridview, const std::shared_ptr< const FEM > &fem, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
constructor
Definition: gridfunctionspace.hh:280
GridFunctionSpace(typename Traits::EntitySet entitySet, const FEM &fem, const CE &ce, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
Construct a new Grid Function Space object.
Definition: gridfunctionspace.hh:311
static const bool isComposite
True if this grid function space is composed of others.
Definition: gridfunctionspace.hh:127
GridFunctionSpace(const typename Traits::GridView &gridview, const FEM &fem, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
constructor
Definition: gridfunctionspace.hh:268
LeafGridFunctionSpaceTag ImplementationTag
Definition: gridfunctionspace.hh:216
O SizeTag
Definition: gridfunctionspace.hh:212
ES::Traits::template Codim< 0 >::Entity Element
Definition: gridfunctionspace.hh:208
Traits::Backend & backend()
Definition: gridfunctionspacebase.hh:281
O OrderingTag
Definition: gridfunctionspace.hh:214
GridFunctionSpaceTraits< ES, FEM, CE, B, O > Traits
export Traits class
Definition: gridfunctionspace.hh:200
L FiniteElementMap
finite element map
Definition: gridfunctionspace.hh:149
GridFunctionSpace(const typename Traits::GridView &gridview, const std::shared_ptr< const FEM > &fem, const std::shared_ptr< const CE > &ce, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
constructor
Definition: gridfunctionspace.hh:256
std::shared_ptr< const FEM > finiteElementMapStorage() const
get finite element map
Definition: gridfunctionspace.hh:394
O OrderingTag
tag describing the ordering.
Definition: gridfunctionspace.hh:164
void setEntitySet(typename Traits::EntitySet entity_set)
Set the Entity Set object to this grid function space.
Definition: gridfunctionspacebase.hh:327
B::size_type SizeType
short cut for size type exported by Backend
Definition: gridfunctionspace.hh:143
std::shared_ptr< Ordering > orderingStorage()
Direct access to the storage of the DOF ordering.
Definition: gridfunctionspace.hh:462
L FiniteElementMapType
finite element map
Definition: gridfunctionspace.hh:146
const FEM & finiteElementMap() const
get finite element map
Definition: gridfunctionspace.hh:388
const Ordering & ordering() const
Direct access to the DOF ordering.
Definition: gridfunctionspace.hh:414
ES::Traits::template Codim< 0 >::Iterator ElementIterator
Definition: gridfunctionspace.hh:209
std::shared_ptr< const CE > constraintsStorage() const
return storage of constraints engine
Definition: gridfunctionspace.hh:406
GridFunctionSpace(typename Traits::EntitySet entitySet, const std::shared_ptr< const FEM > &fem, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
Definition: gridfunctionspace.hh:376
std::conditional< std::is_same< CE, NoConstraints >::value, EmptyTransformation, ConstraintsTransformation< typename Ordering::Traits::DOFIndex, typename Ordering::Traits::ContainerIndex, E > >::type Type
define Type as the Type of a container of E's
Definition: gridfunctionspace.hh:233
void update(bool force=false)
Update the indexing information of the GridFunctionSpace.
Definition: gridfunctionspacebase.hh:259
const Traits::ConstraintsType & constraints() const
return constraints engine
Definition: gridfunctionspace.hh:400
impl::GridView< G > GridView
the grid view where grid function is defined upon
Definition: gridfunctionspace.hh:130
const Traits::EntitySet & entitySet() const
get entity set
Definition: gridfunctionspacebase.hh:298
L::Traits::FiniteElementType FiniteElementType
finite element
Definition: gridfunctionspace.hh:152
Ordering & ordering()
Direct access to the DOF ordering.
Definition: gridfunctionspace.hh:430
GridFunctionSpace(typename Traits::EntitySet entitySet, const std::shared_ptr< const FEM > &fem, const std::shared_ptr< const CE > &ce, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
Definition: gridfunctionspace.hh:330
GridFunctionSpace(const typename Traits::GridView &gridview, const FEM &fem, const CE &ce, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
constructor
Definition: gridfunctionspace.hh:244
impl::EntitySet< G > EntitySet
the entity set of this function space.
Definition: gridfunctionspace.hh:133
L::Traits::FiniteElementType FiniteElement
Definition: gridfunctionspace.hh:154
bool isRootSpace() const
Definition: gridfunctionspacebase.hh:342
B Backend
Definition: gridfunctionspace.hh:140
B BackendType
vector backend
Definition: gridfunctionspace.hh:138
GridFunctionSpace(typename Traits::EntitySet entitySet, const FEM &fem, const B &backend=B(), const OrderingTag &ordering_tag=OrderingTag())
Definition: gridfunctionspace.hh:355
C ConstraintsType
type representing constraints
Definition: gridfunctionspace.hh:157
GridView GridViewType
Definition: gridfunctionspace.hh:135
std::shared_ptr< const Ordering > orderingStorage() const
Direct access to the storage of the DOF ordering.
Definition: gridfunctionspace.hh:446
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Definition: istl/descriptors.hh:48
Definition: exceptions.hh:36
Mixin base class for specifying output hints to I/O routines like VTK.
Definition: function.hh:126
a class holding transformation for constrained spaces
Definition: constraintstransformation.hh:20
Definition: constraintstransformation.hh:112
Definition: noconstraints.hh:20
Definition: datahandleprovider.hh:189
collect types exported by a leaf grid function space
Definition: gridfunctionspace.hh:125
A grid function space.
Definition: gridfunctionspace.hh:191
extract type for storing constraints
Definition: gridfunctionspace.hh:223
Definition: gridfunctionspacebase.hh:190
Definition: gridfunctionspace/tags.hh:32
Tag indicating a standard ordering for a leaf GridfunctionSpace.
Definition: gridfunctionspace/tags.hh:185
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139