3#include <dune/common/exceptions.hh>
4#include <dune/geometry/quadraturerules.hh>
5#include <dune/geometry/type.hh>
7#include <amdis/Output.hpp>
8#include <amdis/common/Order.hpp>
9#include <amdis/functions/Order.hpp>
13 template <
class Geometry,
class RN,
class CN>
14 int getQuadratureDegree(Geometry
const& geometry,
int derivOrder,
int coeffDegree,
15 RN
const& rowNode, CN
const& colNode)
17 test_exit(coeffDegree >= 0,
18 "Polynomial degree of coefficients cannot be determined. "
19 "Please provide a quadrature order manually.");
21 int psiDegree = order(rowNode);
22 int phiDegree = order(colNode);
24 int degree = psiDegree + phiDegree + coeffDegree;
25 if (geometry.type().isSimplex())
27 if (geometry.affine())
33 template <
class Geometry,
class Node>
34 int getQuadratureDegree(Geometry
const& geometry,
int derivOrder,
int coeffDegree,
37 test_exit(coeffDegree >= 0,
38 "Polynomial degree of coefficients cannot be determined. "
39 "Please provide a quadrature order manually.");
41 int psiDegree = order(node);
42 int degree = psiDegree + coeffDegree;
44 if (geometry.type().isSimplex())
46 if (geometry.affine())
52 template <
class Geometry,
class... Nodes>
53 auto const& getQuadratureRule(Geometry
const& geometry,
int derivOrder,
54 int coeffDegree, Nodes
const&... nodes)
56 int degree = getQuadratureDegree(geometry, derivOrder, coeffDegree, nodes...);
58 = Dune::QuadratureRules<typename Geometry::ctype, Geometry::mydimension>;
59 return QuadRules::rule(geometry.type(), degree);