|
NEML2 2.0.0
|
The Driver drives the execution of a NEML2 Model. More...
#include <Driver.h>

Public Member Functions | |
| Driver (const OptionSet &options) | |
| Construct a new Driver object. | |
| void | diagnose () const override |
| Check for common problems. | |
| virtual bool | run ()=0 |
Let the driver run, return true upon successful completion, and return false otherwise. | |
Public Member Functions inherited from NEML2Object | |
| NEML2Object ()=delete | |
| NEML2Object (NEML2Object &&)=delete | |
| NEML2Object (const NEML2Object &)=delete | |
| NEML2Object & | operator= (NEML2Object &&)=delete |
| NEML2Object & | operator= (const 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. | |
| Factory * | factory () const |
| Get the factory that created this object. | |
| const Settings & | settings () const |
| Settings. | |
| 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. | |
| template<typename T > | |
| const T & | resolve_tensor (const std::string &name) |
| Resolve a TensorName to a Tensor. | |
| template<class T > | |
| std::shared_ptr< T > | get_object (const std::string §ion, const std::string &name) |
| template<class T = Solver> | |
| std::shared_ptr< T > | get_solver (const std::string &name) |
| Get a solver from the factory. | |
| template<class T = Data> | |
| std::shared_ptr< T > | get_data (const std::string &name) |
| Get a data from the factory. | |
| template<class T = Model> | |
| std::shared_ptr< T > | get_model (const std::string &name) |
| Get a model from the factory. | |
| template<class T = Driver> | |
| std::shared_ptr< T > | get_driver (const std::string &name) |
| Get a driver from the factory. | |
| template<class T = WorkScheduler> | |
| std::shared_ptr< T > | get_scheduler (const std::string &name) |
| Get a scheduler from the factory. | |
Public Member Functions inherited from DiagnosticsInterface | |
| DiagnosticsInterface ()=delete | |
| DiagnosticsInterface (NEML2Object *object) | |
| DiagnosticsInterface (DiagnosticsInterface &&)=delete | |
| DiagnosticsInterface (const DiagnosticsInterface &)=delete | |
| DiagnosticsInterface & | operator= (const DiagnosticsInterface &)=delete |
| DiagnosticsInterface & | operator= (DiagnosticsInterface &&)=delete |
| virtual | ~DiagnosticsInterface ()=default |
| const NEML2Object & | object () const |
| Get the object. | |
Static Public Member Functions | |
| static OptionSet | expected_options () |
Static Public Member Functions inherited from NEML2Object | |
| static OptionSet | expected_options () |
Protected Attributes | |
| bool | _verbose |
| Whether to print out additional (debugging) information during the execution. | |
Construct a new Driver object.
| options | The options extracted from the input file |
|
inlineoverridevirtual |
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.
Implements DiagnosticsInterface.
Reimplemented in LDISolidMechanicsDriver, ModelDriver, SolidMechanicsDriver, and TransientDriver.
|
static |
|
pure virtual |
Let the driver run, return true upon successful completion, and return false otherwise.
Implemented in TransientDriver.
|
protected |
Whether to print out additional (debugging) information during the execution.