LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Defines the Geometry::test_utils module and provides a number of test functions to check geometry objects. More...
Functions | |
void | checkChildGeometry (const lf::geometry::Geometry &geom, const lf::geometry::RefinementPattern &ref_pat, const std::function< lf::quad::QuadRule(lf::base::RefEl)> &qr_provider) |
Checks that the mapping geom.ChildGeometry() is the same as geom composed with the mapping imposed by ref_pat. | |
void | checkChildGeometryVolume (const lf::geometry::Geometry &geom, const lf::refinement::RefPat &refPat, const lf::base::sub_idx_t &anchor=lf::refinement::idx_nil) |
Checks if the total volume is conserved after call to ChildGeometry() | |
void | checkIntegrationElement (const lf::geometry::Geometry &geom, const Eigen::MatrixXd &eval_points) |
Checks if IntegrationElement() is implemented correctly under the assumption that Jacobian() is correct. | |
void | checkJacobian (const lf::geometry::Geometry &geom, const Eigen::MatrixXd &eval_points, const double &tolerance) |
Checks if Jacobian() is implemented correctly by comparing it to the symmetric difference quotient approximation. | |
void | checkJacobianInverseGramian (const lf::geometry::Geometry &geom, const Eigen::MatrixXd &eval_points) |
Checks if JacobianInverseGramian() is implemented correctly assuming that Jacobian() is correct. | |
void | checkSubGeometry (const lf::geometry::Geometry &geom, const std::function< lf::quad::QuadRule(lf::base::RefEl)> &qrProvider) |
Checks that geometry objects obtained through SubGeometry() map the same points on the reference elements to the same global points. | |
Defines the Geometry::test_utils module and provides a number of test functions to check geometry objects.
void lf::geometry::test_utils::checkChildGeometry | ( | const lf::geometry::Geometry & | geom, |
const lf::geometry::RefinementPattern & | ref_pat, | ||
const std::function< lf::quad::QuadRule(lf::base::RefEl)> & | qr_provider ) |
Checks that the mapping geom.ChildGeometry() is the same as geom composed with the mapping imposed by ref_pat.
geom | The geometry object whose ChildGeometry() method should be checked |
ref_pat | The refinement pattern that is used for the test |
qr_provider | Provides the quadrature rules whose points are used to check whether the two mappings agree |
Definition at line 15 of file check_child_geometry.cc.
References lf::geometry::Geometry::ChildGeometry(), lf::geometry::RefinementPattern::ChildPolygons(), lf::geometry::Geometry::DimGlobal(), lf::geometry::Geometry::DimLocal(), lf::geometry::Geometry::Global(), lf::base::RefEl::kPoint(), lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::geometry::RefinementPattern::LatticeConst(), lf::geometry::RefinementPattern::NumChildren(), lf::geometry::RefinementPattern::RefEl(), and lf::geometry::Geometry::RefEl().
void lf::geometry::test_utils::checkChildGeometryVolume | ( | const lf::geometry::Geometry & | geom, |
const lf::refinement::RefPat & | refPat, | ||
const lf::base::sub_idx_t & | anchor = lf::refinement::idx_nil ) |
Checks if the total volume is conserved after call to ChildGeometry()
geom | geometry object to be evaluated |
refPat | refinement pattern for child generation |
anchor | local number of anchor element for refinement pattern |
Definition at line 80 of file check_child_geometry.cc.
References lf::geometry::Geometry::ChildGeometry(), lf::geometry::Geometry::IntegrationElement(), lf::quad::make_QuadRule(), lf::geometry::Geometry::RefEl(), and lf::refinement::rp_nil.
void lf::geometry::test_utils::checkIntegrationElement | ( | const lf::geometry::Geometry & | geom, |
const Eigen::MatrixXd & | eval_points ) |
Checks if IntegrationElement() is implemented correctly under the assumption that Jacobian() is correct.
geom | geometry object to be evaluated |
eval_points | points at which Jacobian should be checked |
Definition at line 17 of file check_integration_element.cc.
References lf::geometry::Geometry::DimGlobal(), lf::geometry::Geometry::DimLocal(), lf::geometry::Geometry::IntegrationElement(), and lf::geometry::Geometry::Jacobian().
void lf::geometry::test_utils::checkJacobian | ( | const lf::geometry::Geometry & | geom, |
const Eigen::MatrixXd & | eval_points, | ||
const double & | tolerance ) |
Checks if Jacobian() is implemented correctly by comparing it to the symmetric difference quotient approximation.
geom | geometry object to be evaluated |
eval_points | points at which Jacobian should be checked |
tolerance | tolerance for floating point equality check |
Definition at line 15 of file check_jacobian.cc.
References lf::geometry::Geometry::DimGlobal(), lf::geometry::Geometry::DimLocal(), lf::geometry::Geometry::Global(), and lf::geometry::Geometry::Jacobian().
void lf::geometry::test_utils::checkJacobianInverseGramian | ( | const lf::geometry::Geometry & | geom, |
const Eigen::MatrixXd & | eval_points ) |
Checks if JacobianInverseGramian() is implemented correctly assuming that Jacobian() is correct.
geom | geometry object to be evaluated |
eval_points | points ar which JacobianInverseGramian should be checked |
Definition at line 17 of file check_jacobian_inverse_gramian.cc.
References lf::geometry::Geometry::DimGlobal(), lf::geometry::Geometry::DimLocal(), lf::geometry::Geometry::Jacobian(), and lf::geometry::Geometry::JacobianInverseGramian().
void lf::geometry::test_utils::checkSubGeometry | ( | const lf::geometry::Geometry & | geom, |
const std::function< lf::quad::QuadRule(lf::base::RefEl)> & | qrProvider ) |
Checks that geometry objects obtained through SubGeometry() map the same points on the reference elements to the same global points.
geom | geometry object to be evaluated |
qrProvider | function returning a QuadRule object associated with the given RefEl |
Definition at line 17 of file check_sub_geometry.cc.
References lf::geometry::Geometry::DimLocal(), lf::geometry::Geometry::Global(), lf::base::RefEl::kPoint(), lf::base::RefEl::NodeCoords(), lf::geometry::Geometry::RefEl(), and lf::geometry::Geometry::SubGeometry().