Chi-Tech
quadrature_wedge.cc
Go to the documentation of this file.
1#include "quadrature_wedge.h"
2
5
6namespace chi_math
7{
8
10{
11 QuadratureGaussLegendre legendre(order);
12 legendre.SetRange({-1.0, 1.0});
13 QuadratureTriangle triangle(order);
14
15 const size_t NL = legendre.qpoints_.size();
16 const size_t NT = triangle.qpoints_.size();
17
18 qpoints_.resize(NL * NT);
19 weights_.resize(NL * NT);
20
21 size_t q = 0;
22 for (size_t i=0; i<NL; ++i)
23 for (size_t j=0; j<NT; ++j)
24 {
25 qpoints_[q](0) = triangle.qpoints_[j][0];
26 qpoints_[q](1) = triangle.qpoints_[j][1];
27 qpoints_[q](2) = legendre.qpoints_[i][0];
28
29 weights_[q] = legendre.weights_[i] * triangle.weights_[j];
30
31 ++q;
32 }
33
34}
35
36} // namespace chi_math
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
QuadratureWedge(QuadratureOrder order)
QuadratureOrder
Definition: quadrature.h:12