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;
101 using Base::localPoint;
106 : Base( geometry, order )
111 const QuadraturePointWrapperType operator[] (
const size_t i )
const 113 return QuadraturePointWrapperType( *
this, i );
117 const CoordinateType &
point (
const size_t i )
const 119 return localPoint( i );
125 return quadraturePoint;
132 template<
typename Gr
idPartImp,
class IntegrationTraits >
145 static const int dimension = Base::dimension;
146 static const int codimension = Base::codimension;
174 using Base::localFaceIndex;
178 using Base::elementGeometry;
194 const IntersectionType &intersection,
196 : Base( getPointList( gridPart, intersection, order, side ) ),
197 mapper_( CacheProviderType::getMapper( quadImp(), elementGeometry(), localFaceIndex(), twist_ ) ),
198 points_( PointProviderType::getPoints( quadImp().ipList().id(), elementGeometry() ) )
202 const QuadraturePointWrapperType operator[] (
const size_t i )
const 204 return QuadraturePointWrapperType( *
this, i );
209 const CoordinateType &
point (
const size_t i )
const 217 assert( quadraturePoint < (
size_t)nop() );
218 return mapper_[ quadraturePoint ];
225 assert( i < (
size_t)nop() );
227 assert( mapper_[ i ] >= 0 );
228 int faceIndex = localFaceIndex();
229 int point = mapper_[ i ] - faceIndex * mapper_.size();
230 assert( point < nop() );
237 const IntersectionType &intersection,
244 twist_ = TwistUtilityType::twistInSelf( gridPart.grid(), intersection );
245 return Base( TwistUtilityType::elementGeometry( intersection,
true ),
246 intersection.indexInInside(), order );
248 case Base :: OUTSIDE:
249 twist_ = TwistUtilityType::twistInNeighbor( gridPart.grid(), intersection );
250 return Base( TwistUtilityType::elementGeometry( intersection,
false ),
251 intersection.indexInOutside(), order );
254 DUNE_THROW( InvalidStateException,
"ElementIntegrationPointList: side must either be INSIDE or OUTSIDE." );
260 const MapperType &mapper_;
261 const PointVectorType &points_;
268 #endif // #ifndef DUNE_FEM_CACHINGPOINTLIST_HH Definition: elementpointlistbase.hh:20
CachingTraits< RealType, dimension >::PointVectorType PointVectorType
Definition: cachingpointlist.hh:169
Base getPointList(const GridPartType &gridPart, const IntersectionType &intersection, const int order, const typename Base::Side side)
Definition: cachingpointlist.hh:236
std::vector< size_t > MapperType
Definition: pointmapper.hh:58
Side
inside and outside flags
Definition: elementpointlistbase.hh:163
integration point list supporting base function caching
Definition: cachingpointlist.hh:74
CachingPointList(const GeometryType &geometry, int order)
constructor
Definition: cachingpointlist.hh:105
GridPartType::IntersectionIteratorType IntersectionIteratorType
Type of the intersection iterator.
Definition: cachingpointlist.hh:152
GridPartType::TwistUtilityType TwistUtilityType
Definition: cachingpointlist.hh:163
GridPartImp GridPartType
type of the grid partition
Definition: cachingpointlist.hh:142
wrapper for a (Quadrature,int) pair
Definition: quadrature.hh:40
ElementPointListBase.
Definition: elementpointlistbase.hh:16
CacheProvider< GridPartType, codimension > CacheProviderType
Definition: cachingpointlist.hh:171
ElementIntegrationPointList< GridPartType, codimension, IntegrationTraits > NonConformingQuadratureType
type of quadrature used for non-conforming intersections
Definition: cachingpointlist.hh:159
QuadraturePointWrapper< This > QuadraturePointWrapperType
Definition: cachingpointlist.hh:155
GridPartImp GridPartType
type of the grid partition
Definition: elementpointlistbase.hh:26
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:41
QuadraturePointWrapper< This > QuadraturePointWrapperType
the type of the quadrature point
Definition: cachingpointlist.hh:95
IntegrationTraits::CoordinateType CoordinateType
Definition: elementpointlistbase.hh:177
Definition: coordinate.hh:4
constructor
Definition: cachingpointlist.hh:133
CachingTraits< RealType, dimension >::MapperType MapperType
Definition: cachingpointlist.hh:168
Base::CoordinateType CoordinateType
Type of coordinates in codim-0 reference element.
Definition: cachingpointlist.hh:149
Definition: cacheprovider.hh:136
integration point list on the codim-0 reference element
Definition: elementpointlist.hh:49
Base::CoordinateType CoordinateType
The type of the coordinates in the codim-0 reference element.
Definition: cachingpointlist.hh:92
GridPartType::ctype RealType
coordinate type
Definition: elementpointlistbase.hh:169
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:123
IntersectionIteratorType IntersectionIterator
Definition: cachingpointlist.hh:164
PointProvider< RealType, dimension, codimension > PointProviderType
Definition: cachingpointlist.hh:172
interface a cachable quadrature has to implement
Definition: cachingpointlist.hh:22
CachingInterface()
Definition: cachingpointlist.hh:26
IntersectionIteratorType::Intersection IntersectionType
Definition: cachingpointlist.hh:153
std::vector< PointType > PointVectorType
Definition: pointmapper.hh:57
const CoordinateType & point(const size_t i) const
obtain coordinates of i-th integration point
Definition: cachingpointlist.hh:117
Definition: pointprovider.hh:21
size_t localCachingPoint(const size_t i) const
Definition: cachingpointlist.hh:223
size_t cachingPoint(const size_t quadraturePoint) const
map quadrature points to caching points
Definition: cachingpointlist.hh:215
const CoordinateType & point(const size_t i) const
obtain coordinates of i-th integration point
Definition: cachingpointlist.hh:209
CachingPointList(const GridPartType &gridPart, const IntersectionType &intersection, int order, const typename Base::Side side)
constructor
Definition: cachingpointlist.hh:193
constructor
Definition: cachingpointlist.hh:80
Base::GridPartType GridPartType
Definition: cachingpointlist.hh:88
IntegrationTraits::CoordinateType CoordinateType
Definition: elementpointlistbase.hh:43
Base::RealType RealType
Definition: cachingpointlist.hh:144