Chi-Tech
quadrature_hexahedron.cc
Go to the documentation of this file.
2
4
5//###################################################################
6/**Initialzes a set of points for a quadrature integration over
7 * the volume of a hexahedron.*/
9 Quadrature(order)
10{
11 QuadratureGaussLegendre legendre(order);
12
13 legendre.SetRange({-1.0,1.0});
14
15 size_t N = legendre.qpoints_.size();
16
17 qpoints_.resize(N * N * N);
18 weights_.resize(N * N * N);
19
20 unsigned int q=0;
21
22 for (unsigned int k=0; k<N; k++)
23 for (unsigned int j=0; j<N; j++)
24 for (unsigned int i=0; i<N; i++)
25 {
26 qpoints_[q](0) = legendre.qpoints_[i](0);
27 qpoints_[q](1) = legendre.qpoints_[j](0);
28 qpoints_[q](2) = legendre.qpoints_[k](0);
29
30 weights_[q] = legendre.weights_[i] *
31 legendre.weights_[j] *
32 legendre.weights_[k];
33
34 q++;
35 }
36}
QuadratureHexahedron(QuadratureOrder order)
void SetRange(const std::pair< double, double > &in_range)
Definition: quadrature.cc:91
std::vector< chi_math::QuadraturePointXYZ > qpoints_
Definition: quadrature.h:37
std::vector< double > weights_
Definition: quadrature.h:38
QuadratureOrder
Definition: quadrature.h:12