1 #ifndef DUNE_FEM_FEMQUADRATURES_INLINE_HH 2 #define DUNE_FEM_FEMQUADRATURES_INLINE_HH 12 #define SimplexPointsAdapter ParDGSimplexPointsAdapter 15 template <
class ct,
int dim>
18 order_((order <= 0) ? 1 : order)
23 SimplexPointsAdapter<dim> points(order);
27 for (
int i = 0; i < points.numPoints(); ++i) {
32 template <
class ct,
int dim>
35 order_((order <= 0) ? 1 : order)
52 if (m==0) DUNE_THROW(NotImplemented,
"order " <<
order_ <<
" not implemented");
56 int n = gp.
power(m,dim);
57 for (
int i = 0; i < n; i++) {
61 for (
int k=0; k<dim; ++k) {
69 for (
int k = 0; k < dim; k++)
71 local[k] = gp.
point(m,x[k]);
72 weight *= gp.
weight(m,x[k]);
84 order_((order <= 0) ? 1 : order)
93 CoordinateType local( 0 );
103 order_((order <= 0) ? 1 : order)
119 if (m==0) DUNE_THROW(NotImplemented,
"order not implemented");
123 int n = gp.
power(m,1);
124 for (
int i = 0; i < n; ++i)
126 CoordinateType local( ct( 0 ) );
128 local[0] = gp.
point(m, i);
138 order_((order <= 0) ? 1 : order)
143 SimplexPointsAdapter<2> points(order);
145 order_ = points.order();
147 for (
int i = 0; i < points.numPoints(); ++i) {
155 order_((order <= 0) ? 1 : order)
169 if (gp.
order(i)>=order_) {
175 if (m==0) DUNE_THROW(NotImplemented,
"order not implemented");
176 order_ = gp.
order(m);
179 int n = gp.
power(m,dim);
180 for (
int i = 0; i < n; i++) {
184 for (
int k=0; k<dim; ++k) {
191 CoordinateType local;
192 for (
int k = 0; k < dim; k++)
194 local[k] = gp.
point(m,x[k]);
195 weight *= gp.
weight(m,x[k]);
206 order_((order <= 0) ? 1 : order)
211 SimplexPointsAdapter<3> points(order);
213 order_ = points.order();
215 for (
int i = 0; i < points.numPoints(); ++i) {
223 order_((order <= 0) ? 1 : order)
236 if (gp.
order(i)>=order_) {
242 if (m==0) DUNE_THROW(NotImplemented,
"order not implemented");
243 order_ = gp.
order(m);
246 int n = gp.
power(m,dim);
247 for (
int i = 0; i < n; i++) {
251 for (
int k=0; k<dim; ++k) {
258 CoordinateType local;
259 for (
int k = 0; k < dim; k++)
261 local[k] = gp.
point(m,x[k]);
262 weight *= gp.
weight(m,x[k]);
273 order_((order <= 0) ? 1 : order)
275 SimplexPointsAdapter<2> simplexPoints(order);
276 int simplexOrder = simplexPoints.order();
282 if (gp.
order(i)>=order_) {
287 if (m==0) DUNE_THROW(NotImplemented,
"order not implemented");
289 int gaussOrder = gp.
order(m);
290 int minOrder = ((simplexOrder < gaussOrder) ? simplexOrder : gaussOrder);
293 int numSimplexPoints = simplexPoints.numPoints();
294 int numGaussPoints = gp.
power(m,1);
296 FieldVector<ct, 3> local;
297 double weight, simplexWeight;
299 for (
int i = 0; i < numSimplexPoints; ++i) {
300 local[0] = simplexPoints.point(i)[0];
301 local[1] = simplexPoints.point(i)[1];
302 simplexWeight = simplexPoints.weight(i);
303 for (
int j = 0; j < numGaussPoints; ++j) {
304 local[2] = gp.
point(m,j);
305 weight = simplexWeight;
315 order_((order <= 0) ? 1 : order)
321 if (points.
order(i) >= order_) {
327 if (m==0) DUNE_THROW(NotImplemented,
"order not implemented");
328 order_ = points.
order(m);
331 for (
int i = 0; i < points.
numPoints(m); ++i) {
340 #endif // #ifndef DUNE_FEM_FEMQUADRATURES_INLINE_HH static int maxOrder(const int dim)
Definition: femquadratures.hh:25
CubeQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:33
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:337
LineQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:101
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:520
void addQuadraturePoint(const CoordinateType &point, const FieldType weight)
Adds a point-weight pair to the quadrature.
Definition: quadratureimp.hh:261
int order_
Definition: femquadratures.hh:135
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:460
PyramidQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:313
double weight(int m, int i) const
Access to the ith weight of quadrature rule m.
Definition: pyramidpoints.hh:35
int power(int y, int d) const
a simple power method
Definition: gausspoints.hh:98
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:89
const FieldType & weight(size_t i) const
obtain weight of i-th integration point
Definition: quadratureimp.hh:242
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:398
QuadrilateralQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:153
int order_
Definition: femquadratures.hh:67
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:155
BaseType::CoordinateType CoordinateType
type of local coordinates
Definition: femquadratures.hh:132
SimplexQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:16
double point(int m, int i) const
obtain the i-th point of the m-th quadratre
Definition: gausspoints.hh:59
PrismQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:271
TetraQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:204
int numPoints(int m) const
Number of points in the quadrature rule m.
Definition: pyramidpoints.hh:47
static const GaussPts & instance()
obtain the singleton object
Definition: gausspoints.hh:46
Definition: coordinate.hh:4
BaseType::CoordinateType CoordinateType
type of local coordinates
Definition: femquadratures.hh:314
Definition: pyramidpoints.hh:18
one-dimensional Gauss points and their weights
Definition: gausspoints.hh:22
const FieldVector< double, 3 > & point(int m, int i) const
Access to the ith point of quadrature rule m.
Definition: pyramidpoints.hh:29
int order(int m) const
obtain the order of the m-th quadratre
Definition: gausspoints.hh:84
BaseType::CoordinateType CoordinateType
type of local coordinates
Definition: femquadratures.hh:191
int order(int m) const
Actual order of quadrature rule m.
Definition: pyramidpoints.hh:41
TriangleQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:136
int order_
Definition: femquadratures.hh:194
double weight(int m, int i) const
obtain the i-th weight of the m-th quadratre
Definition: gausspoints.hh:72
Generic implementation of a Dune quadrature.
Definition: quadratureimp.hh:178
virtual int order() const
Definition: femquadratures.hh:214
BaseType::CoordinateType CoordinateType
type of local coordinates
Definition: femquadratures.hh:437
static const PyramidPoints & instance()
Access to the singleton object.
Definition: pyramidpoints.hh:23
virtual int order() const
obtain order of the integration point list
Definition: femquadratures.hh:275
Definition: pyramidpoints.hh:15
Definition: gausspoints.hh:26
HexaQuadrature(const GeometryType &geometry, int order, size_t id)
constructor filling the list of points and weights
Definition: femquadratures_inline.hh:221
Definition: gausspoints.hh:29