1#ifndef QUADRATURE_SLDFESQ_H
2#define QUADRATURE_SLDFESQ_H
17 namespace SimplifiedLDFESQ
27 {
virtual double operator()(
double mu,
double eta,
double xi)
70 static constexpr double a = 0.57735026919;
110 std::array<chi_mesh::Vector3, 4>& radii_vectors_xy_tilde,
111 std::array<double,4>& sub_sub_sqr_areas);
118 std::array<chi_mesh::Vector3, 4>& radii_vectors_xy_tilde,
119 std::array<double,4>& sub_sub_sqr_areas);
123 std::array<chi_mesh::Vertex,4>& vertices_xyz);
128 const std::vector<chi_math::QuadraturePointXYZ>& legendre_qpoints,
129 const std::vector<double>& legendre_qweights);
141 void TestIntegration(
int test_case,
double ref_solution,
int RiemannN=0);
150 const double cone_size,
151 const bool dir_as_plane_normal=
false);
154 std::array<SphericalQuadrilateral,4>
171 std::array<chi_math::DynamicVector<double>,4>
rhs;
174 std::array<chi_math::DynamicVector<double>, 4>
c_coeffs;
175 std::vector<chi_math::QuadraturePointXYZ>&
lqp;
181 std::array<chi_mesh::Vector3, 4>& in_radii_vectors_xy_tilde,
190 lqp(in_legendre_quadrature.qpoints_),
191 lqw(in_legendre_quadrature.weights_)
194 for (
int i=0;i<4;++i)
196 rhs[i] = std::vector<double>(4);
197 c_coeffs[i] = std::vector<double>(4);
198 for (
int j=0;j<4;++j)
210 std::array<chi_mesh::Vector3,4> qpoints;
211 for (
int i=0; i<4; ++i)
219 for (
int i=0;i<4;++i)
220 A[i] = {1.0,qpoints[i][0],qpoints[i][1],qpoints[i][2]};
226 for (
int i=0;i<4;++i)
std::vector< std::vector< NumberFormat > > elements_
std::vector< SphericalQuadrilateral > initial_octant_SQs_
void DevelopSQLDFEValues(SphericalQuadrilateral &sq, chi_math::QuadratureGaussLegendre &legendre)
void LocallyRefine(const chi_mesh::Vector3 &ref_dir, const double cone_size, const bool dir_as_plane_normal=false)
void PrintQuadratureToFile()
static double ComputeSphericalQuadrilateralArea(std::array< chi_mesh::Vertex, 4 > &vertices_xyz)
std::vector< std::vector< SphericalQuadrilateral > > deployed_SQs_history_
void GenerateReferenceFaceVertices(const chi_mesh::Matrix3x3 &rotation_matrix, const chi_mesh::Vector3 &translation, int level)
std::array< SphericalQuadrilateral, 4 > SplitSQ(SphericalQuadrilateral &sq, chi_math::QuadratureGaussLegendre &legendre)
QuadraturePointOptimization qp_optimization_type_
void GenerateInitialRefinement(int level)
double QuadratureSSIntegral(BaseFunctor *F)
void EmpiricalQPOptimization(SphericalQuadrilateral &sq, chi_math::QuadratureGaussLegendre &legendre, chi_mesh::Vertex &sq_xy_tilde_centroid, std::array< chi_mesh::Vector3, 4 > &radii_vectors_xy_tilde, std::array< double, 4 > &sub_sub_sqr_areas)
double RiemannIntegral(BaseFunctor *F, int Ni=20000)
std::vector< SphericalQuadrilateral > deployed_SQs_
void PopulateQuadratureAbscissae()
std::string output_filename_prefix_
std::vector< chi_mesh::Vector3 > diagonal_vertices_
QuadraturePointOptimization
static std::array< double, 4 > IntegrateLDFEShapeFunctions(const SphericalQuadrilateral &sq, std::array< chi_math::DynamicVector< double >, 4 > &shape_coeffs, const std::vector< chi_math::QuadraturePointXYZ > &legendre_qpoints, const std::vector< double > &legendre_qweights)
void TestIntegration(int test_case, double ref_solution, int RiemannN=0)
void IsolatedQPOptimization(SphericalQuadrilateral &sq, chi_math::QuadratureGaussLegendre &legendre, chi_mesh::Vertex &sq_xy_tilde_centroid, std::array< chi_mesh::Vector3, 4 > &radii_vectors_xy_tilde, std::array< double, 4 > &sub_sub_sqr_areas)
static constexpr double a
Inscribed cude side length.
void GenerateDiagonalSpacings(int level)
MatDbl Inverse(const MatDbl &A)
virtual double operator()(double mu, double eta, double xi)
std::vector< double > & lqw
std::array< chi_math::DynamicVector< double >, 4 > rhs
SphericalQuadrilateral & sq
chi_math::DynamicMatrix< double > A_inv
std::array< chi_mesh::Vector3, 4 > & radii_vectors_xy_tilde
std::vector< chi_math::QuadraturePointXYZ > & lqp
chi_math::DynamicMatrix< double > A
chi_mesh::Vertex & centroid_xy_tilde
FUNCTION_WEIGHT_FROM_RHO(chi_math::SimplifiedLDFESQ::Quadrature &in_sldfesq, chi_mesh::Vertex &in_centroid_xy_tilde, std::array< chi_mesh::Vector3, 4 > &in_radii_vectors_xy_tilde, SphericalQuadrilateral &in_sq, chi_math::QuadratureGaussLegendre &in_legendre_quadrature)
std::array< chi_math::DynamicVector< double >, 4 > c_coeffs
std::array< double, 4 > operator()(const chi_math::DynamicVector< double > &rho)
std::array< chi_mesh::Vertex, 4 > vertices_xyz_prime
On cube face.
std::array< chi_mesh::Vertex, 4 > vertices_xy_tilde
On square.
chi_mesh::Vertex centroid_xyz
chi_mesh::Vector3 translation_vector
std::array< chi_mesh::Vector3, 4 > sub_sqr_points
chi_mesh::Matrix3x3 rotation_matrix
chi_mesh::Vector3 octant_modifier
std::array< double, 4 > sub_sqr_weights
std::array< chi_mesh::Vertex, 4 > vertices_xyz
On unit sphere.
Vector3 Normalized() const