Chi-Tech
quadrature_quadrilateral.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 quadrilateral.*/
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);
18 weights_.resize(N * N);
19
20 unsigned int q=0;
21
22 for (unsigned int j=0; j<N; j++)
23 for (unsigned int i=0; i<N; i++)
24 {
25 qpoints_[q](0) = legendre.qpoints_[i](0);
26 qpoints_[q](1) = legendre.qpoints_[j](0);
27
28 weights_[q] = legendre.weights_[i] *
29 legendre.weights_[j];
30
31 q++;
32 }
33}
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
QuadratureQuadrilateral(QuadratureOrder order)
QuadratureOrder
Definition: quadrature.h:12