3 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
5 : ref_element_m(ref_element) {}
7 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
9 return this->degree_m + 1;
12 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
14 return this->degree_m;
17 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
22 Vector<
T, std::remove_reference_t<
decltype(*this)>::numElementNodes> tensor_prod_w;
25 for (
unsigned i = 0; i < std::remove_reference_t<
decltype(*this)>::numElementNodes; ++i) {
26 tensor_prod_w[i] = 1.0;
27 for (
unsigned d = 0; d < ElementType::dim; ++d) {
28 tensor_prod_w[i] *= w[nd_index[d]];
34 for (
unsigned d = 0; d < ElementType::dim; ++d) {
35 if (++nd_index[d] < NumNodes1D)
44 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
53 for (
unsigned i = 0; i < std::remove_reference_t<
decltype(*this)>::numElementNodes; ++i) {
54 for (
unsigned d = 0; d < ElementType::dim; ++d) {
55 tensor_prod_q[i][d] = q[nd_index[d]];
61 for (
unsigned d = 0; d < ElementType::dim; ++d) {
62 if (++nd_index[d] < NumNodes1D)
71 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
73 const T& a,
const T& b)
const {
77 return (this->integration_nodes_m - this->a_m) / (this->b_m - this->a_m) * (b - a) + a;
80 template <
typename T,
unsigned NumNodes1D,
typename ElementType>
84 return this->weights_m * (b - a) / (this->b_m - this->a_m);
Implementations for FFT constructor/destructor and transforms.
This is the base class for all quadrature rules.
Vector< T, NumNodes1D > getWeights1D(const T &a, const T &b) const
Get the quadrature weights for one dimension.
Vector< Vector< T, dim >, numElementNodes > getIntegrationNodesForRefElement() const
Get the integration (quadrature) nodes for the reference element.
size_t getDegree() const
Returns the degree of exactness of the quadrature rule.
Vector< T, NumNodes1D > getIntegrationNodes1D(const T &a, const T &b) const
Get the quadrature nodes for one dimension.
size_t getOrder() const
Returns the order of the quadrature rule.
Quadrature(const ElementType &ref_element)
Construct a new Quadrature object.
Vector< T, numElementNodes > getWeightsForRefElement() const
Get the quadrature weights for the reference element.