27#include "neml2/base/NEML2Object.h"
32class DiagnosticsInterface;
75 template <
typename...
Args>
94template <
typename...
Args>
103 std::ostringstream
oss;
104 internal::stream_all(
oss,
110 std::forward<Args>(
args)...);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:54
Exception type reserved for diagnostics, so as to not conceptually clash with other exceptions.
Definition DiagnosticsInterface.h:37
Interface for object making diagnostics about common setup errors.
Definition DiagnosticsInterface.h:47
void diagnostic_check_input_variable(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:106
void diagnostic_assert(std::vector< Diagnosis > &diagnoses, bool assertion, Args &&... args) const
Definition DiagnosticsInterface.h:96
DiagnosticsInterface(DiagnosticsInterface &&)=delete
void diagnostic_check_output_variable(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:130
DiagnosticsInterface & operator=(const DiagnosticsInterface &)=delete
DiagnosticsInterface(const DiagnosticsInterface &)=delete
void diagnostic_assert_old_state(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:59
void diagnostic_assert_residual(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:93
void diagnostic_assert_force(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:72
void diagnostic_assert_old_force(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:80
void diagnostic_assert_state(std::vector< Diagnosis > &diagnoses, const VariableBase &v) const
Definition DiagnosticsInterface.cxx:51
DiagnosticsInterface()=delete
virtual void diagnose(std::vector< Diagnosis > &diagnoses) const =0
Check for common problems.
DiagnosticsInterface & operator=(DiagnosticsInterface &&)=delete
virtual ~DiagnosticsInterface()=default
The base class of all "manufacturable" objects in the NEML2 library.
Definition NEML2Object.h:38
const std::string & name() const
A readonly reference to the object's name.
Definition NEML2Object.h:70
const std::string & type() const
A readonly reference to the object's type.
Definition NEML2Object.h:72
Base class of variable.
Definition Variable.h:47
Definition CrossRef.cxx:31
void diagnose(const DiagnosticsInterface &patient)
Raise diagnostics as exception, if any.
Definition DiagnosticsInterface.cxx:31