23#ifndef MOFEM_TESTING_INTERFACE_HPP
24#define MOFEM_TESTING_INTERFACE_HPP
45 const std::string &check_name)
const = 0;
80 const std::string &
name, TS ts,
84 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &)>;
106 const std::string &finite_element,
107 const std::array<double, 3> &field_eval_coords,
109 bool *point_found =
nullptr);
114 const std::string &finite_element,
115 const std::array<double, 3> &field_eval_coords,
117 bool *point_found =
nullptr) = 0;
126 template <TestType TYPE>
129 Sev error_severity = Sev::error,
130 Sev success_severity = Sev::inform)
const;
147 template <TestType TYPE>
150 Sev error_severity = Sev::error,
151 Sev success_severity = Sev::inform)
const;
157 Sev error_severity = Sev::error,
158 Sev success_severity = Sev::inform)
const = 0;
175 const std::string &check_name)
const = 0;
179 const std::string &check_name)
const = 0;
183 const std::string &check_name)
const = 0;
189 const std::string &check_name)
const = 0;
264 const std::string &
name,
270 const std::string &problem,
const std::string &finite_element,
272 double distance,
bool *point_found);
276 const std::string &problem,
const std::string &finite_element,
278 double distance,
bool *point_found);
282 const std::string &check_name, PetscReal error, PetscReal
scale,
287 const std::string &check_name, PetscReal error, PetscReal
scale,
292 const std::string &check_name, PetscReal error, PetscReal
scale,
297 const std::string &check_name, PetscReal error, PetscReal
scale,
302 const std::string &check_name, PetscReal actual, PetscReal expected,
307 const std::string &check_name, PetscReal actual, PetscReal expected,
312 const std::string &check_name, PetscReal actual, PetscReal expected,
317 const std::string &check_name, PetscReal actual, PetscReal expected,
SeverityLevel
Severity levels.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
TestingInterface * createInterface< TestingInterface >(const Core &core)
virtual bool checkTest(int number) const =0
virtual MoFEMErrorCode addFieldEvaluator(int dimension, const std::string &problem, const std::string &finite_element, const std::array< double, 3 > &field_eval_coords, FieldEvaluatorHook hook, double distance=1e-12, bool *point_found=nullptr)=0
std::function< MoFEMErrorCode()> TestHook
virtual MoFEMErrorCode runTest(int number) const =0
~TestingInterface() override=default
virtual MoFEMErrorCode checkSolver(Tao tao, const std::string &check_name) const =0
virtual MoFEMErrorCode checkSolver(TS ts, PetscReal expected_time, Tolerance tolerance, const std::string &check_name) const =0
virtual MoFEMErrorCode addTest(int number, const std::string &name, TestHook hook)=0
virtual MoFEMErrorCode addTSMonitor(TS ts, TSCheck check)=0
virtual MoFEMErrorCode runTests() const =0
virtual MoFEMErrorCode checkError(TestType type, const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity=Sev::error, Sev success_severity=Sev::inform) const =0
virtual bool checkTest(const std::string &name) const =0
virtual MoFEMErrorCode checkSolver(TS ts, const std::string &check_name) const =0
MoFEMErrorCode checkValue(const std::string &check_name, PetscReal actual, PetscReal expected, Tolerance tolerance, Sev error_severity=Sev::error, Sev success_severity=Sev::inform) const
std::function< MoFEMErrorCode(TS, PetscInt, PetscReal, Vec)> TSCheck
virtual MoFEMErrorCode getOptions(const std::string &prefix="") const =0
virtual MoFEMErrorCode runTestCommandLine(const std::string &prefix="") const =0
virtual MoFEMErrorCode addTestCommandLine(const std::string &prefix, int number, const std::string &name, TestHook hook)=0
virtual MoFEMErrorCode checkSolver(SNES snes, const std::string &check_name) const =0
virtual MoFEMErrorCode runTest(const std::string &name) const =0
MoFEMErrorCode checkError(const std::string &check_name, PetscReal error, PetscReal scale, Tolerance tolerance, Sev error_severity=Sev::error, Sev success_severity=Sev::inform) const
virtual MoFEMErrorCode checkSolver(KSP ksp, const std::string &check_name) const =0
std::function< MoFEMErrorCode(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &)> FieldEvaluatorHook
MoFEMErrorCode addFieldEvaluator(const std::string &problem, const std::string &finite_element, const std::array< double, 3 > &field_eval_coords, FieldEvaluatorHook hook, double distance=1e-12, bool *point_found=nullptr)
virtual MoFEMErrorCode addTSMonitor(const std::string &prefix, int number, const std::string &name, TS ts, TSCheck check)=0
base class for all interface classes