1 #ifndef DUNE_FEM_CACHINGPOINTLIST_HH
2 #define DUNE_FEM_CACHINGPOINTLIST_HH
5 #include <dune/common/math.hh>
43 DUNE_THROW( NotImplemented,
44 "CachingInterface :: cachingPoint must be overloaded!" );
73 template<
class Gr
idPartImp,
int codim,
class IntegrationTraits >
79 template<
class Gr
idPartImp,
class IntegrationTraits >
89 static const int codimension = Base::codimension;
103 using Base::localPoint;
109 :
Base( geometry, order )
125 return localPoint( i );
131 return quadraturePoint;
138 template<
typename Gr
idPartImp,
class IntegrationTraits >
151 static const int dimension = Base::dimension;
152 static const int codimension = Base::codimension;
182 using Base::localFaceIndex;
186 using Base::elementGeometry;
203 int order,
const typename Base :: Side side )
204 :
Base( getPointList( intersection, order, side ) ),
205 mapper_(
CacheProviderType::getMapper( quadImp(), elementGeometry(), localFaceIndex(), getTwist( gridPart, intersection, side ) ) ),
206 points_(
PointProviderType::getPoints( quadImp().ipList().id(), elementGeometry() ) )
222 return points_[ cachingPoint( i ) ];
228 assert( quadraturePoint < (
size_t)nop() );
229 return mapper_[ quadraturePoint ];
236 assert( i < (
size_t)nop() );
238 assert( mapper_[ i ] >= 0 );
239 int faceIndex = localFaceIndex();
240 int point = mapper_[ i ] - faceIndex * mapper_.size();
241 assert( point < nop() );
249 const typename Base :: Side side )
254 return Base( TwistUtilityType::elementGeometry( intersection,
true ),
255 intersection.indexInInside(), order );
257 case Base :: OUTSIDE:
258 return Base( TwistUtilityType::elementGeometry( intersection,
false ),
259 intersection.indexInOutside(), order );
262 DUNE_THROW( InvalidStateException,
"ElementIntegrationPointList: side must either be INSIDE or OUTSIDE." );
268 const typename Base :: Side side )
273 return TwistUtilityType::twistInSelf( gridPart.grid(), intersection );
275 case Base :: OUTSIDE:
276 return TwistUtilityType::twistInNeighbor( gridPart.grid(), intersection );
279 DUNE_THROW( InvalidStateException,
"ElementIntegrationPointList: side must either be INSIDE or OUTSIDE." );
284 const MapperType &mapper_;
285 const PointVectorType &points_;
Definition: bindguard.hh:11
Definition: cacheprovider.hh:136
std::vector< size_t > MapperType
Definition: pointmapper.hh:58
std::vector< PointType > PointVectorType
Definition: pointmapper.hh:57
Definition: pointprovider.hh:23
interface a cachable quadrature has to implement
Definition: cachingpointlist.hh:23
CachingInterface()
Definition: cachingpointlist.hh:26
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:41
integration point list supporting base function caching
Definition: cachingpointlist.hh:74
constructor
Definition: cachingpointlist.hh:83
QuadraturePointWrapper< This > QuadraturePointWrapperType
the type of the quadrature point
Definition: cachingpointlist.hh:95
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:129
Base::GridPartType GridPartType
Definition: cachingpointlist.hh:88
CachingPointList(const GeometryType &geometry, int order)
constructor
Definition: cachingpointlist.hh:108
Base::CoordinateType CoordinateType
The type of the coordinates in the codim-0 reference element.
Definition: cachingpointlist.hh:92
IteratorType end() const noexcept
Definition: cachingpointlist.hh:120
IteratorType begin() const noexcept
Definition: cachingpointlist.hh:119
const CoordinateType & point(const size_t i) const
obtain coordinates of i-th integration point
Definition: cachingpointlist.hh:123
QuadraturePointIterator< This > IteratorType
type of iterator
Definition: cachingpointlist.hh:97
constructor
Definition: cachingpointlist.hh:142
Base getPointList(const IntersectionType &intersection, const int order, const typename Base ::Side side)
Definition: cachingpointlist.hh:247
const CoordinateType & point(const size_t i) const
obtain coordinates of i-th integration point
Definition: cachingpointlist.hh:220
IteratorType begin() const noexcept
Definition: cachingpointlist.hh:215
PointProvider< RealType, dimension, codimension > PointProviderType
Definition: cachingpointlist.hh:180
QuadraturePointIterator< This > IteratorType
type of iterator
Definition: cachingpointlist.hh:163
GridPartImp GridPartType
type of the grid partition
Definition: cachingpointlist.hh:148
Base::CoordinateType CoordinateType
Type of coordinates in codim-0 reference element.
Definition: cachingpointlist.hh:155
IteratorType end() const noexcept
Definition: cachingpointlist.hh:216
Base::RealType RealType
Definition: cachingpointlist.hh:150
ElementIntegrationPointList< GridPartType, codimension, IntegrationTraits > NonConformingQuadratureType
type of quadrature used for non-conforming intersections
Definition: cachingpointlist.hh:167
IntersectionIteratorType IntersectionIterator
Definition: cachingpointlist.hh:172
QuadraturePointWrapper< This > QuadraturePointWrapperType
Definition: cachingpointlist.hh:161
CacheProvider< GridPartType, codimension > CacheProviderType
Definition: cachingpointlist.hh:179
IntersectionIteratorType::Intersection IntersectionType
Definition: cachingpointlist.hh:159
CachingPointList(const GridPartType &gridPart, const IntersectionType &intersection, int order, const typename Base ::Side side)
constructor
Definition: cachingpointlist.hh:201
int getTwist(const GridPartType &gridPart, const IntersectionType &intersection, const typename Base ::Side side)
Definition: cachingpointlist.hh:266
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:226
CachingTraits< RealType, dimension >::MapperType MapperType
Definition: cachingpointlist.hh:176
CachingTraits< RealType, dimension >::PointVectorType PointVectorType
Definition: cachingpointlist.hh:177
size_t localCachingPoint(const size_t i) const
Definition: cachingpointlist.hh:234
GridPartType::IntersectionIteratorType IntersectionIteratorType
Type of the intersection iterator.
Definition: cachingpointlist.hh:158
GridPartType::TwistUtilityType TwistUtilityType
Definition: cachingpointlist.hh:171
integration point list on the codim-0 reference element
Definition: elementpointlist.hh:49
ElementPointListBase.
Definition: elementpointlistbase.hh:155
IntegrationTraits::CoordinateType CoordinateType
Definition: elementpointlistbase.hh:177
GridPartType::ctype RealType
coordinate type
Definition: elementpointlistbase.hh:169
Definition: elementpointlistbase.hh:21
GridPartImp GridPartType
type of the grid partition
Definition: elementpointlistbase.hh:26
IntegrationTraits::CoordinateType CoordinateType
Definition: elementpointlistbase.hh:43
wrapper for a (Quadrature,int) pair
Definition: quadrature/quadrature.hh:41
iterator over quadrature points
Definition: quadrature/quadrature.hh:108