1 #ifndef DUNE_FEM_SPACE_LAGRANGE_SPACE_HH 2 #define DUNE_FEM_SPACE_LAGRANGE_SPACE_HH 8 #include <dune/common/deprecated.hh> 9 #include <dune/common/exceptions.hh> 10 #include <dune/common/nullptr.hh> 13 #include <dune/geometry/type.hh> 47 template<
class FunctionSpace,
class Gr
idPart,
int polOrder,
template<
class >
class Storage = CachingStorage >
48 class LagrangeDiscreteFunctionSpace;
55 template<
class FunctionSpace,
class Gr
idPart,
unsigned int polOrder,
template<
class >
class Storage >
71 typedef typename GridPartType::template Codim< codimension >::EntityType EntityType;
72 static const int dimLocal = GridPartType::dimension;
82 static ScalarShapeFunctionSetType *
createObject (
const GeometryType &type )
87 static void deleteObject ( ScalarShapeFunctionSetType *
object ) {
delete object; }
96 template<
class DiscreteFunction,
class Operation = Dune::Fem::DFCommunicationOperation::Add >
132 template<
class FunctionSpace,
class Gr
idPart,
int polOrder,
template<
class >
class Storage >
136 static_assert( (polOrder > 0),
"LagrangeDiscreteFunctionSpace only defined for polOrder > 0" );
176 static const InterfaceType defaultInterface = GridPart::indexSetInterfaceType;
177 static const CommunicationDirection defaultDirection = ForwardCommunication;
184 using BaseType::order;
187 const InterfaceType commInterface = defaultInterface,
188 const CommunicationDirection commDirection = defaultDirection )
189 : BaseType( gridPart, commInterface, commDirection ),
190 blockMapper_( nullptr ),
191 lagrangePointSetContainer_( gridPart )
193 const IndexSetType &indexSet = gridPart.indexSet();
196 const std::vector< GeometryType > &geometryTypes = allGeometryTypes.
geomTypes( 0 );
197 for(
unsigned int i = 0; i < geometryTypes.size(); ++i )
199 const GeometryType &type = geometryTypes[ i ];
200 scalarShapeFunctionSets_.template insert< SingletonProviderType >( type );
203 MapperSingletonKeyType key( gridPart, lagrangePointSetContainer_.compiledLocalKeys( polynomialOrder ),
polynomialOrder );
204 blockMapper_ = &BlockMapperProviderType::getObject( key );
205 assert( blockMapper_ );
210 BlockMapperProviderType::removeObject( *blockMapper_ );
232 bool continuous (
const IntersectionType &intersection )
const 234 return intersection.conforming();
246 assert( blockMapper_ );
247 return *blockMapper_;
260 return InterpolationType( lagrangePointSet( entity ), basisFunctionSet( entity ) );
268 template<
class LocalFunction,
class LocalDofVector >
272 const EntityType &entity = localFunction.
entity();
273 const auto interpolation = this->interpolation( entity );
274 interpolation( localFunction, localDofVector );
286 return shapeFunctionSet( entity.type() );
310 template<
class EntityType >
313 return lagrangePointSet( entity.type() );
327 return lagrangePointSetContainer_.compiledLocalKey( type, polynomialOrder );
334 ThisType &operator= (
const ThisType & );
336 BlockMapperType *blockMapper_;
337 ScalarShapeFunctionSetStorageType scalarShapeFunctionSets_;
338 LagrangePointSetContainerType lagrangePointSetContainer_;
345 #endif // #ifndef DUNE_FEM_SPACE_LAGRANGE_SPACE_HH Definition: selectcaching.hh:28
BaseType::GridType GridType
Definition: discretefunctionspace.hh:610
LagrangeLocalInterpolation< GridPartType, polynomialOrder, BasisFunctionSetType > InterpolationType
Definition: lagrange/space.hh:159
LagrangeDiscreteFunctionSpace< FunctionSpace, GridPart, polOrder, Storage > DiscreteFunctionSpaceType
Definition: lagrange/space.hh:58
static const int polynomialOrder
Definition: lagrange/space.hh:63
bool continuous(const IntersectionType &intersection) const
returns true if the space contains only globally continuous functions
Definition: lagrange/space.hh:232
IndexSetDofMapper< GridPartType > BlockMapperType
Definition: lagrange/space.hh:66
BaseType::IndexSetType IndexSetType
Definition: lagrange/space.hh:149
Lagrange discrete function space.
Definition: cornerstorage.hh:23
BaseType::EntityType EntityType
Definition: discretefunctionspace.hh:613
LagrangeShapeFunctionSet< ShapeFunctionSpaceType, polynomialOrder > LagrangeShapeFunctionSetType
Definition: lagrange/space.hh:77
BaseType::EntityType EntityType
Definition: lagrange/space.hh:150
A vector valued function space.
Definition: functionspace.hh:16
Dune::Fem::DefaultCommunicationHandler< DiscreteFunction, Operation > Type
Definition: lagrange/space.hh:100
ShapeFunctionSetProxy< ScalarShapeFunctionSetType > ScalarShapeFunctionSetProxyType
Definition: lagrange/space.hh:91
Default communication handler for discrete functions.
Definition: defaultcommhandler.hh:23
InterpolationType interpolation(const EntityType &entity) const
return local interpolation for given entity
Definition: lagrange/space.hh:258
Singleton list for key/object pairs.
Definition: singletonlist.hh:49
Definition: shapefunctionset/vectorial.hh:428
BaseType::IndexSetType IndexSetType
Definition: discretefunctionspace.hh:611
DFSpaceIdentifier
enumerator for identification of spaces
Definition: discretefunctionspace.hh:88
static void deleteObject(ScalarShapeFunctionSetType *object)
Definition: lagrange/space.hh:87
static const int localBlockSize
Definition: lagrange/space.hh:65
BaseType::BasisFunctionSetType BasisFunctionSetType
Definition: lagrange/space.hh:154
Dune::Fem::DefaultBasisFunctionSet< EntityType, ShapeFunctionSetType > BasisFunctionSetType
Definition: lagrange/space.hh:94
LagrangeDiscreteFunctionSpace(GridPartType &gridPart, const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
Definition: lagrange/space.hh:186
dimension of range vector space
Definition: functionspaceinterface.hh:47
BaseType::BlockMapperType BlockMapperType
Definition: lagrange/space.hh:156
ShapeFunctionSetType shapeFunctionSet(const EntityType &entity) const
return shape function set for given entity
Definition: lagrange/space.hh:284
BaseType::Traits::ShapeFunctionSetType ShapeFunctionSetType
Definition: lagrange/space.hh:153
void interpolate(const LocalFunction &localFunction, LocalDofVector &localDofVector) const
interpolate a function locally
Definition: lagrange/space.hh:270
BaseType::IntersectionType IntersectionType
Definition: lagrange/space.hh:151
interface for local functions
Definition: localfunction.hh:41
const LagrangePointSetType & lagrangePointSet(const GeometryType &type) const
provide access to the Lagrange point set for a geometry type
Definition: lagrange/space.hh:325
LagrangePointSet< GridPartType, polynomialOrder > LagrangePointSetType
Definition: lagrange/space.hh:158
Definition: shapefunctionset/proxy.hh:35
int order() const
get global order of space
Definition: lagrange/space.hh:238
Definition: lagrange/interpolation.hh:20
Definition: coordinate.hh:4
BaseType::Traits Traits
Definition: lagrange/space.hh:142
~LagrangeDiscreteFunctionSpace()
Definition: lagrange/space.hh:208
Definition: lagrange/space.hh:80
GridPart GridPartType
Definition: lagrange/space.hh:61
BaseType::GridType GridType
Definition: lagrange/space.hh:148
const EntityType & entity() const
obtain the entity, this local function lives on
Definition: localfunction.hh:285
BaseType::GridPartType GridPartType
Definition: discretefunctionspace.hh:609
BaseType::GridPartType GridPartType
Definition: lagrange/space.hh:147
ShapeFunctionSetType shapeFunctionSet(const GeometryType &type) const
return shape unique function set for geometry type
Definition: lagrange/space.hh:296
Provides a proxy class for pointers to a shape function set.
default implementation uses method geomTypes of given index set. Used in DiscreteFunctionSpaces.
Definition: allgeomtypes.hh:89
Definition: storage.hh:18
Lagrange shape function set.
Definition: lagrange/shapefunctionset.hh:166
SelectCachingShapeFunctionSet< LagrangeShapeFunctionSetType, Storage > ScalarShapeFunctionSetType
Definition: lagrange/space.hh:78
FunctionSpace FunctionSpaceType
Definition: lagrange/space.hh:60
DFSpaceIdentifier type() const
return type identifier of discrete function space
Definition: lagrange/space.hh:214
This is the class with default implementations for discrete function. The methods not marked with hav...
Definition: discretefunctionspace.hh:595
ScalarShapeFunctionSetFactory ScalarShapeFunctionSetFactoryType
Definition: lagrange/space.hh:89
VectorialShapeFunctionSet< ScalarShapeFunctionSetProxyType, typename FunctionSpaceType::RangeType > ShapeFunctionSetType
Definition: lagrange/space.hh:92
Definition: indexsetdofmapper.hh:743
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: lagrange/space.hh:226
GridPartType::IntersectionType IntersectionType
type of the intersections
Definition: discretefunctionspace.hh:202
BlockMapperType & blockMapper() const
get a reference to the block mapper
Definition: lagrange/space.hh:244
BaseType::FunctionSpaceType FunctionSpaceType
Definition: lagrange/space.hh:145
const BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
get basis function set for given entity
Definition: lagrange/space.hh:220
static ScalarShapeFunctionSetType * createObject(const GeometryType &type)
Definition: lagrange/space.hh:82
const std::vector< GeometryType > & geomTypes(unsigned int codim) const
returns vector with geometry tpyes this index set has indices for
Definition: allgeomtypes.hh:145
Definition: lagrange/space.hh:56
id for Lagrange Space
Definition: discretefunctionspace.hh:95
const LagrangePointSetType & lagrangePointSet(const EntityType &entity) const
provide access to the Lagrange point set for an entity
Definition: lagrange/space.hh:311
Operation OperationType
Definition: lagrange/space.hh:102
static const int codimension
Definition: lagrange/space.hh:68
convert functions space to space with new dim domain
Definition: functionspace.hh:242
Definition: storage.hh:70
Definition: lagrangepoints.hh:461
implementation of a basis function set for given entity
Definition: default.hh:46
Definition: lagrange/space.hh:97