NEML2 1.4.0
|
Interface for object making diagnostics about common setup errors. More...
Interface for object making diagnostics about common setup errors.
#include <DiagnosticsInterface.h>
Public Member Functions | |
DiagnosticsInterface (NEML2Object *object) | |
virtual void | diagnose (std::vector< Diagnosis > &diagnoses) const =0 |
Check for common problems. | |
template<typename... Args> | |
void | diagnostic_assert (std::vector< Diagnosis > &diagnoses, bool assertion, Args &&... args) const |
void | diagnostic_assert_state (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_assert_old_state (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_assert_force (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_assert_old_force (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_assert_residual (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_check_input_variable (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
void | diagnostic_check_output_variable (std::vector< Diagnosis > &diagnoses, const VariableBase &v) const |
DiagnosticsInterface | ( | NEML2Object * | object | ) |
Check for common problems.
This method serves as the entry point for diagnosing common problems in object setup. The idea behind this method is that while some errors could be detected at construction time, i.e., when the object's constructor is called, it doesn't hinder other objects' creation. We therefore would like to defer the detection of errors until after all objects have been created, collect all errors at once, and present the user with a complete understanding of all errors encountered.
Note, however, if an error could interfere with other objects' creation, it should be raised right away inside the constructor, instead of inside this method.
diagnoses | A vector of exceptions of type Diagnosis for each of the detected problem. |
Implemented in Driver, LargeDeformationIncrementalSolidMechanicsDriver, SolidMechanicsDriver, TransientDriver, Model, BackwardEulerTimeIntegration< T >, ForwardEulerTimeIntegration< T >, ImplicitUpdate, VariableRate< T >, WR2ExplicitExponentialTimeIntegration, and WR2ImplicitExponentialTimeIntegration.
void diagnostic_assert | ( | std::vector< Diagnosis > & | diagnoses, |
bool | assertion, | ||
Args &&... | args ) const |
void diagnostic_assert_force | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_assert_old_force | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_assert_old_state | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_assert_residual | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_assert_state | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_check_input_variable | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |
void diagnostic_check_output_variable | ( | std::vector< Diagnosis > & | diagnoses, |
const VariableBase & | v ) const |