![]() |
v0.16.3 |
Collective numerical comparisons for tutorials and atom tests. More...
Go to the source code of this file.
Classes | |
| struct | MoFEM::TestingInterface |
| struct | MoFEM::TestingInterface::Tolerance |
Namespaces | |
| namespace | MoFEM |
| implementation of Data Operators for Forces and Sources | |
Enumerations | |
| enum class | MoFEM::TestType { MoFEM::SCALAR , MoFEM::POINTWISE , MoFEM::DERIVATIVE , MoFEM::SOLVER } |
Functions | |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkError< TestType::SCALAR > (const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkError< TestType::POINTWISE > (const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkError< TestType::DERIVATIVE > (const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkError< TestType::SOLVER > (const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkValue< TestType::SCALAR > (const std::string &check_name, PetscReal actual, PetscReal expected, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkValue< TestType::POINTWISE > (const std::string &check_name, PetscReal actual, PetscReal expected, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkValue< TestType::DERIVATIVE > (const std::string &check_name, PetscReal actual, PetscReal expected, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| MoFEMErrorCode | MoFEM::TestingInterface::checkValue< TestType::SOLVER > (const std::string &check_name, PetscReal actual, PetscReal expected, Tolerance tolerance, Sev error_severity, Sev success_severity) const |
| template<> | |
| TestingInterface * | MoFEM::createInterface< TestingInterface > (const MoFEM::Core &core) |
Collective numerical comparisons for tutorials and atom tests.
Tutorials supply the measured quantities and independent references. Field evaluation, physical norms and derivative assembly remain with the existing operators, FieldEvaluatorInterface and OperatorsTester. In particular, a coefficient-vector norm is not interchangeable with a physical field norm.
Numerical comparisons and solver checks are collective on the Core communicator, in the same order on every rank. A failure on any rank fails the check on all ranks. Field evaluation is local, as documented below. Tolerances are explicit; non-finite measurements or invalid tolerances fail. Results use the TEST_INTERFACE logging channel with the TestingInterface tag.
addTest/runTest/runTests provide an optional registry so a tutorial's solving code need not branch on which test is requested: register what to check, then let a single option (e.g. "-test_nb N") choose what actually runs. addTestCommandLine is the preferred way to populate it: list every candidate test unconditionally, each guarded by its own addTestCommandLine call, then run whatever was actually selected with one runTests() call.
Definition in file TestingInterface.hpp.