12#ifndef MFEM_TEMPLATE_INTEGRATION_RULES
13#define MFEM_TEMPLATE_INTEGRATION_RULES
24template <Geometry::Type G,
int Q,
int Order,
typename real_t>
45 for (
int j = 0; j <
qpts; j++)
59 template <AssignOp::Type Op,
typename qpt_layout_t,
typename qpt_data_t>
61 qpt_data_t &qpt_data)
const
63 MFEM_STATIC_ASSERT(qpt_layout_t::rank > 1,
"invalid rank");
64 MFEM_STATIC_ASSERT(qpt_layout_t::dim_1 ==
qpts,
"invalid size");
65 for (
int j = 0; j <
qpts; j++)
71 template <
typename qpt_data_t>
78template <
int Dim,
int Q,
typename real_t>
81template <
int Q,
typename real_t>
89 template <AssignOp::Type Op,
typename qpt_layout_t,
typename qpt_data_t>
91 qpt_data_t &qpt_data)
const
93 MFEM_STATIC_ASSERT(qpt_layout_t::rank > 1,
"invalid rank");
94 MFEM_STATIC_ASSERT(qpt_layout_t::dim_1 == Q,
"invalid size");
95 for (
int j = 0; j < Q; j++)
101 template <
typename qpt_data_t>
108template <
int Q,
typename real_t>
116 template <AssignOp::Type Op,
typename qpt_layout_t,
typename qpt_data_t>
118 qpt_data_t &qpt_data)
const
120 MFEM_STATIC_ASSERT(qpt_layout_t::rank > 1,
"invalid rank");
121 MFEM_STATIC_ASSERT(qpt_layout_t::dim_1 == Q*Q,
"invalid size");
123 for (
int j2 = 0; j2 < Q; j2++)
125 for (
int j1 = 0; j1 < Q; j1++)
129 weights_1d.
data[j1]*weights_1d.
data[j2]);
134 template <
typename qpt_data_t>
141template <
int Q,
typename real_t>
149 template <AssignOp::Type Op,
typename qpt_layout_t,
typename qpt_data_t>
151 qpt_data_t &qpt_data)
const
153 MFEM_STATIC_ASSERT(qpt_layout_t::rank > 1,
"invalid rank");
154 MFEM_STATIC_ASSERT(qpt_layout_t::dim_1 == Q*Q*Q,
"invalid size");
155 MFEM_FLOPS_ADD(2*Q*Q*Q);
156 for (
int j3 = 0; j3 < Q; j3++)
158 for (
int j2 = 0; j2 < Q; j2++)
160 for (
int j1 = 0; j1 < Q; j1++)
165 weights_1d.
data[j1]*weights_1d.
data[j2]*weights_1d.
data[j3]);
171 template <
typename qpt_data_t>
178template <
int Dim,
int Q,
int Order,
typename real_t>
186 static const int dim = Dim;
188 static const int qpts = (Dim == 1) ? Q : ((Dim == 2) ? (Q*Q) : (Q*Q*Q));
202template <
int Dim,
int Q,
typename real_t>
214 using base_class::weights_1d;
221 for (
int j = 0; j <
qpts_1d; j++)
237template <Geometry::Type G,
int Order,
typename real_t = real_t>
240template <
int Order,
typename real_t>
244template <
int Order,
typename real_t>
248template <
int Order,
typename real_t>
256template <
typename real_t>
259template <
typename real_t>
262template <
typename real_t>
265template <
typename real_t>
268template <
typename real_t>
271template <
typename real_t>
274template <
typename real_t>
277template <
typename real_t>
285template <
typename real_t>
288template <
typename real_t>
291template <
typename real_t>
294template <
typename real_t>
297template <
typename real_t>
300template <
typename real_t>
303template <
typename real_t>
306template <
typename real_t>
TProductIntegrationRule< Dim, Q, 2 *Q-1, real_t > base_class
static const IntegrationRule & Get1DIntRule()
static const IntegrationRule & GetIntRule()
void AssignWeights(const qpt_layout_t &qpt_layout, qpt_data_t &qpt_data) const
static const IntegrationRule & GetIntRule()
void ApplyWeights(qpt_data_t &qpt_data) const
static const bool tensor_prod
TVector< qpts, real_t > weights
static const Geometry::Type geom
Class for an integration rule - an Array of IntegrationPoint.
int GetNPoints() const
Returns the number of the points in the integration rule.
IntegrationPoint & IntPoint(int i)
Returns a reference to the i-th integration point.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
void ApplyWeights(qpt_data_t &qpt_data) const
void AssignWeights(const qpt_layout_t &qpt_layout, qpt_data_t &qpt_data) const
TVector< Q, real_t > weights_1d
void AssignWeights(const qpt_layout_t &qpt_layout, qpt_data_t &qpt_data) const
void ApplyWeights(qpt_data_t &qpt_data) const
TVector< Q, real_t > weights_1d
void AssignWeights(const qpt_layout_t &qpt_layout, qpt_data_t &qpt_data) const
void ApplyWeights(qpt_data_t &qpt_data) const
TVector< Q, real_t > weights_1d
static const bool tensor_prod
static const Geometry::Type geom
void TAssign(const A_layout_t &A_layout, A_data_t &A_data, const scalar_t value)
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
static int ind(int i1, int i2)
static int ind(int i1, int i2, int i3)
data_t data[aligned_size >0?aligned_size:1]