1#ifndef DUNE_FEM_SPACE_LAGRANGE_SPACE_HH
2#define DUNE_FEM_SPACE_LAGRANGE_SPACE_HH
8#include <dune/common/exceptions.hh>
11#include <dune/geometry/type.hh>
48 template<
class FunctionSpace,
class Gr
idPart,
int maxPolOrder,
class Storage = CachingStorage >
49 class LagrangeDiscreteFunctionSpace;
56 template<
class FunctionSpace,
class Gr
idPart,
int maxPolOrder,
class Storage >
69 std::conditional_t< Dune::Capabilities::isCartesian< typename GridPart::GridType >::v,
78 typedef typename GridPartType::template Codim< codimension >::EntityType EntityType;
79 static const int dimLocal = GridPartType::dimension;
80 typedef typename FunctionSpaceType::ScalarFunctionSpaceType ScalarFunctionSpaceType;
92 template<
class DiscreteFunction,
class Operation = Dune::Fem::DFCommunicationOperation::Add >
128 template<
class FunctionSpace,
class Gr
idPart,
int maxPolOrder,
class Storage >
141 static_assert( (
maxPolynomialOrder > 0),
"LagrangeDiscreteFunctionSpace only defined for polOrder > 0" );
176 static const InterfaceType defaultInterface = GridPart::indexSetInterfaceType;
177 static const CommunicationDirection defaultDirection = ForwardCommunication;
180 template <
int pOrd >
188 typedef typename Traits :: LagrangeShapeFunctionSetType LagrangeShapeFunctionSetType;
196 const int polynomialOrder,
197 const GeometryType &
type )
199 if( polynomialOrder == pOrd )
202 scalarShapeFunctionSets.template insert< SingletonProviderType >(
type );
216 const InterfaceType commInterface,
217 const CommunicationDirection commDirection )
223 const InterfaceType commInterface = defaultInterface,
224 const CommunicationDirection commDirection = defaultDirection )
234 const std::vector< GeometryType > &geometryTypes = allGeometryTypes.
geomTypes( 0 );
237 for(
unsigned int i = 0; i < geometryTypes.size(); ++i )
269 return intersection.conforming();
343 std::unique_ptr< BlockMapperType, typename BlockMapperProviderType::Deleter>
blockMapper_;
Provides a proxy class for pointers to a shape function set.
DFSpaceIdentifier
enumerator for identification of spaces
Definition: discretefunctionspace.hh:94
@ LagrangeSpace_id
id for Lagrange Space
Definition: discretefunctionspace.hh:101
Definition: bindguard.hh:11
typename Impl::GridFunctionSpace< GridPart, T >::Type GridFunctionSpace
Definition: functionspace.hh:317
static DUNE_PRIVATE void apply(Args &&... args)
Definition: forloop.hh:23
Lagrange discrete function space.
Definition: lagrange/space.hh:131
BaseType::Traits::ShapeFunctionSetType ShapeFunctionSetType
Definition: lagrange/space.hh:151
ScalarShapeFunctionSetStorageType scalarShapeFunctionSets_
Definition: lagrange/space.hh:344
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: lagrange/space.hh:261
BaseType::FunctionSpaceType FunctionSpaceType
Definition: lagrange/space.hh:143
const BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
get basis function set for given entity
Definition: lagrange/space.hh:255
ShapeFunctionSetType shapeFunctionSet(const EntityType &entity) const
return shape function set for given entity
Definition: lagrange/space.hh:322
LagrangePointSetContainerType lagrangePointSetContainer_
Definition: lagrange/space.hh:345
ShapeFunctionSetType shapeFunctionSet(const GeometryType &type) const
return shape unique function set for geometry type
Definition: lagrange/space.hh:334
BlockMapperType & blockMapper() const
get a reference to the block mapper
Definition: lagrange/space.hh:279
int order() const
get global order of space
Definition: lagrange/space.hh:273
bool continuous(const IntersectionType &intersection) const
returns true if the space contains only globally continuous functions
Definition: lagrange/space.hh:267
BaseType::IntersectionType IntersectionType
Definition: lagrange/space.hh:149
BaseType::BlockMapperType BlockMapperType
Definition: lagrange/space.hh:154
BaseType::BasisFunctionSetType BasisFunctionSetType
Definition: lagrange/space.hh:152
BaseType::Traits Traits
Definition: lagrange/space.hh:137
ThisType & operator=(const ThisType &)=delete
LocalInterpolationWrapper< ThisType > InterpolationType
Definition: lagrange/space.hh:160
DFSpaceIdentifier type() const
return type identifier of discrete function space
Definition: lagrange/space.hh:249
static const int maxPolynomialOrder
Definition: lagrange/space.hh:138
InterpolationType interpolation() const
return interpolation object
Definition: lagrange/space.hh:291
LocalInterpolationType localInterpolation(const EntityType &entity) const
return local interpolation for given entity
Definition: lagrange/space.hh:310
const int polynomialOrder_
Definition: lagrange/space.hh:346
LocalInterpolationType interpolation(const EntityType &entity) const
return local interpolation for given entity
Definition: lagrange/space.hh:301
BaseType::GridType GridType
Definition: lagrange/space.hh:146
BaseType::IndexSetType IndexSetType
Definition: lagrange/space.hh:147
BaseType::GridPartType GridPartType
Definition: lagrange/space.hh:145
std::unique_ptr< BlockMapperType, typename BlockMapperProviderType::Deleter > blockMapper_
Definition: lagrange/space.hh:343
LagrangeDiscreteFunctionSpace(GridPartType &gridPart, const int polOrder=minPolynomialOrder, const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
Definition: lagrange/space.hh:221
LagrangePointSet< GridPartType, maxPolynomialOrder > LagrangePointSetType
Definition: lagrange/space.hh:156
LagrangeDiscreteFunctionSpace(const ThisType &)=delete
LocalInterpolationType InterpolationImplType
Definition: lagrange/space.hh:158
BaseType::EntityType EntityType
Definition: lagrange/space.hh:148
LagrangeDiscreteFunctionSpace(GridPartType &gridPart, const InterfaceType commInterface, const CommunicationDirection commDirection)
Definition: lagrange/space.hh:215
LagrangeLocalInterpolation< GridPartType, maxPolynomialOrder, BasisFunctionSetType > LocalInterpolationType
Definition: lagrange/space.hh:157
static const int minPolynomialOrder
Definition: lagrange/space.hh:139
Definition: space/basisfunctionset/default.hh:52
default implementation uses method geomTypes of given index set. Used in DiscreteFunctionSpaces.
Definition: allgeomtypes.hh:99
const std ::vector< GeometryType > & geomTypes(unsigned int codim) const
returns vector with geometry tpyes this index set has indices for
Definition: allgeomtypes.hh:171
const CompiledLocalKeyType & compiledLocalKey(const GeometryType &type, const int order) const
provide access to the compiled local keys for a geometry type and polynomial order
Definition: basesetlocalkeystorage.hh:299
const LocalKeyStorageType & compiledLocalKeys(const int order) const
provide access to all compiled local keys for a given polynomial order
Definition: basesetlocalkeystorage.hh:285
Default communication handler for discrete functions.
Definition: defaultcommhandler.hh:29
Traits::FunctionSpaceType FunctionSpaceType
type of function space
Definition: discretefunctionspace.hh:193
Traits::BasisFunctionSetType BasisFunctionSetType
type of basis function set of this space
Definition: discretefunctionspace.hh:200
GridPartType::IntersectionType IntersectionType
type of the intersections
Definition: discretefunctionspace.hh:225
int order() const
get global order of space
Definition: discretefunctionspace.hh:345
This is the class with default implementations for discrete function. The methods not marked with hav...
Definition: discretefunctionspace.hh:628
BaseType::EntityType EntityType
Definition: discretefunctionspace.hh:644
BaseType::BlockMapperType BlockMapperType
Definition: discretefunctionspace.hh:660
BaseType::GridPartType GridPartType
Definition: discretefunctionspace.hh:640
BaseType::IndexSetType IndexSetType
Definition: discretefunctionspace.hh:642
const IndexSetType & indexSet() const
Get a reference to the associated index set.
Definition: discretefunctionspace.hh:751
GridPartType & gridPart() const
Definition: discretefunctionspace.hh:745
BaseType::GridType GridType
Definition: discretefunctionspace.hh:641
convert functions space to space with new dim domain
Definition: functionspace.hh:246
Definition: common/localinterpolation.hh:74
Definition: dofmappercode.hh:58
Definition: lagrange/interpolation.hh:21
Definition: lagrangepoints.hh:685
Lagrange shape function set.
Definition: lagrange/shapefunctionset.hh:169
Definition: lagrange/space.hh:58
IndexSetDofMapper< GridPartType, std::conditional_t< Dune::Capabilities::isCartesian< typename GridPart::GridType >::v, DefaultLocalDofMapping< GridPart >, LagrangeLocalDofMapping< GridPart > > > BlockMapperType
Definition: lagrange/space.hh:71
static const int codimension
Definition: lagrange/space.hh:75
Dune::Fem::DefaultBasisFunctionSet< EntityType, ShapeFunctionSetType > BasisFunctionSetType
Definition: lagrange/space.hh:90
ShapeFunctionSetProxy< ScalarShapeFunctionSetType > ScalarShapeFunctionSetProxyType
Definition: lagrange/space.hh:87
GridFunctionSpace< GridPartType, FunctionSpace > FunctionSpaceType
Definition: lagrange/space.hh:66
Hybrid::IndexRange< int, FunctionSpaceType::dimRange > LocalBlockIndices
Definition: lagrange/space.hh:73
LagrangeDiscreteFunctionSpace< FunctionSpace, GridPart, maxPolOrder, Storage > DiscreteFunctionSpaceType
Definition: lagrange/space.hh:59
LagrangeShapeFunctionSet< ShapeFunctionSpaceType, maxPolynomialOrder > LagrangeShapeFunctionSetType
Definition: lagrange/space.hh:84
VectorialShapeFunctionSet< ScalarShapeFunctionSetProxyType, typename FunctionSpaceType::RangeType > ShapeFunctionSetType
Definition: lagrange/space.hh:88
SelectCachingShapeFunctionSet< LagrangeShapeFunctionSetType, Storage > ScalarShapeFunctionSetType
Definition: lagrange/space.hh:85
static const int minPolynomialOrder
Definition: lagrange/space.hh:63
static const int maxPolynomialOrder
Definition: lagrange/space.hh:62
GridPart GridPartType
Definition: lagrange/space.hh:65
Definition: lagrange/space.hh:94
Operation OperationType
Definition: lagrange/space.hh:98
Dune::Fem::DefaultCommunicationHandler< DiscreteFunction, Operation > Type
Definition: lagrange/space.hh:96
Definition: lagrange/space.hh:184
static void deleteObject(ScalarShapeFunctionSetType *object)
Definition: lagrange/space.hh:192
static ScalarShapeFunctionSetType * createObject(const GeometryType &type)
Definition: lagrange/space.hh:186
Definition: storage.hh:19
Definition: storage.hh:72
Definition: indexsetdofmapper.hh:32
Definition: indexsetdofmapper.hh:719
Definition: selectcaching.hh:26
Definition: shapefunctionset/vectorial.hh:447
Singleton list for key/object pairs.
Definition: singletonlist.hh:53
static auto getObject(const KeyType &key, Args &&... args) -> std::enable_if_t< std::is_same< decltype(FactoryType::createObject(key, std::forward< Args >(args)...)), ObjectType * >::value, ObjectType & >
Definition: singletonlist.hh:94
Interface for shape function sets.