The driver for a transient initial-value problem.
|
| TransientDriver (const OptionSet &options) |
| Construct a new TransientDriver object.
|
|
void | diagnose (std::vector< Diagnosis > &) const override |
| Check for common problems.
|
|
bool | run () override |
| Let the driver run, return true upon successful completion, and return false otherwise.
|
|
const Model & | model () const |
|
virtual std::string | save_as_path () const |
| The destination file/path to save the results.
|
|
virtual torch::nn::ModuleDict | result () const |
| The results (input and output) from all time steps.
|
|
| Driver (const OptionSet &options) |
| Construct a new Driver object.
|
|
| NEML2Object ()=delete |
|
| NEML2Object (NEML2Object &&)=delete |
|
| NEML2Object (const NEML2Object &)=delete |
|
NEML2Object & | operator= (const NEML2Object &)=delete |
|
NEML2Object & | operator= (NEML2Object &&)=delete |
|
virtual | ~NEML2Object ()=default |
|
| NEML2Object (const OptionSet &options) |
| Construct a new NEML2Object object.
|
|
const OptionSet & | input_options () const |
|
virtual void | setup () |
| Setup this object.
|
|
const std::string & | name () const |
| A readonly reference to the object's name.
|
|
const std::string & | type () const |
| A readonly reference to the object's type.
|
|
const std::string & | path () const |
| A readonly reference to the object's path.
|
|
const std::string & | doc () const |
| A readonly reference to the object's docstring.
|
|
template<typename T = NEML2Object> |
const T * | host () const |
| Get a readonly pointer to the host.
|
|
template<typename T = NEML2Object> |
T * | host () |
| Get a writable pointer to the host.
|
|
| DiagnosticsInterface ()=delete |
|
| DiagnosticsInterface (NEML2Object *object) |
|
| DiagnosticsInterface (DiagnosticsInterface &&)=delete |
|
| DiagnosticsInterface (const DiagnosticsInterface &)=delete |
|
DiagnosticsInterface & | operator= (const DiagnosticsInterface &)=delete |
|
DiagnosticsInterface & | operator= (DiagnosticsInterface &&)=delete |
|
virtual | ~DiagnosticsInterface ()=default |
|
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 |
|
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
-
diagnoses | A vector of exceptions of type Diagnosis for each of the detected problem. |
Reimplemented from Driver.