NEML2 1.4.0
Loading...
Searching...
No Matches
DiagnosticsInterface Class Referenceabstract

Interface for object making diagnostics about common setup errors. More...

Detailed Description

Interface for object making diagnostics about common setup errors.

#include <DiagnosticsInterface.h>

Inheritance diagram for DiagnosticsInterface:

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
 

Constructor & Destructor Documentation

◆ DiagnosticsInterface()

Member Function Documentation

◆ diagnose()

virtual void diagnose ( std::vector< Diagnosis > & diagnoses) const
pure virtual

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.

Parameters
diagnosesA 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.

◆ diagnostic_assert()

template<typename... Args>
void diagnostic_assert ( std::vector< Diagnosis > & diagnoses,
bool assertion,
Args &&... args ) const

◆ diagnostic_assert_force()

void diagnostic_assert_force ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_assert_old_force()

void diagnostic_assert_old_force ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_assert_old_state()

void diagnostic_assert_old_state ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_assert_residual()

void diagnostic_assert_residual ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_assert_state()

void diagnostic_assert_state ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_check_input_variable()

void diagnostic_check_input_variable ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const

◆ diagnostic_check_output_variable()

void diagnostic_check_output_variable ( std::vector< Diagnosis > & diagnoses,
const VariableBase & v ) const