Interface class to provide common input parameters, members, and methods for MOOSEObjects that use NEML2 models. More...
#include <NEML2ModelInterface.h>
Public Member Functions | |
template<typename... P> | |
NEML2ModelInterface (const InputParameters ¶ms, P &&... args) | |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Types | |
using | RJType = std::tuple< neml2::ValueMap, neml2::DerivMap > |
using | DispatcherType = neml2::WorkDispatcher< neml2::ValueMap, RJType, RJType, neml2::ValueMap, RJType > |
Protected Member Functions | |
virtual void | validateModel () const |
Validate the NEML2 material model. More... | |
neml2::Model & | model () const |
Get the NEML2 model. More... | |
const neml2::Device & | device () const |
Get the target compute device. More... | |
neml2::WorkScheduler * | scheduler () |
Get the work scheduler. More... | |
const std::unique_ptr< DispatcherType > & | dispatcher () const |
Get the work dispatcher. More... | |
Private Attributes | |
const neml2::Device | _device |
The device on which to evaluate the NEML2 model. More... | |
std::unique_ptr< neml2::Factory > | _factory |
The NEML2 factory. More... | |
std::shared_ptr< neml2::Model > | _model |
The NEML2 material model. More... | |
std::shared_ptr< neml2::WorkScheduler > | _scheduler |
The work scheduler to use. More... | |
std::unique_ptr< DispatcherType > | _dispatcher |
Work dispatcher. More... | |
const bool | _async_dispatch |
Whether to dispatch work asynchronously. More... | |
std::unordered_map< std::thread::id, std::shared_ptr< neml2::Model > > | _model_pool |
Models for each thread. More... | |
Interface class to provide common input parameters, members, and methods for MOOSEObjects that use NEML2 models.
Definition at line 32 of file NEML2ModelInterface.h.
|
protected |
Definition at line 57 of file NEML2ModelInterface.h.
|
protected |
Definition at line 55 of file NEML2ModelInterface.h.
NEML2ModelInterface< T >::NEML2ModelInterface | ( | const InputParameters & | params, |
P &&... | args | ||
) |
Definition at line 128 of file NEML2ModelInterface.h.
|
inlineprotected |
Get the target compute device.
Definition at line 53 of file NEML2ModelInterface.h.
|
inlineprotected |
Get the work dispatcher.
Definition at line 62 of file NEML2ModelInterface.h.
|
inlineprotected |
Get the NEML2 model.
Definition at line 50 of file NEML2ModelInterface.h.
|
inlineprotected |
Get the work scheduler.
Definition at line 60 of file NEML2ModelInterface.h.
|
protectedvirtual |
Validate the NEML2 material model.
Note that the developer is responsible for calling this method at the appropriate times, for example, at initialSetup().
Definition at line 209 of file NEML2ModelInterface.h.
|
static |
Definition at line 86 of file NEML2ModelInterface.h.
Referenced by NEML2ActionCommon::commonParams(), and NEML2ModelExecutor::validParams().
|
private |
Whether to dispatch work asynchronously.
Definition at line 77 of file NEML2ModelInterface.h.
|
private |
The device on which to evaluate the NEML2 model.
Definition at line 66 of file NEML2ModelInterface.h.
Referenced by NEML2ModelInterface< GeneralUserObject >::device().
|
private |
Work dispatcher.
Definition at line 75 of file NEML2ModelInterface.h.
Referenced by NEML2ModelInterface< GeneralUserObject >::dispatcher().
|
private |
The NEML2 factory.
Definition at line 68 of file NEML2ModelInterface.h.
|
private |
The NEML2 material model.
Definition at line 70 of file NEML2ModelInterface.h.
Referenced by NEML2ModelInterface< GeneralUserObject >::model().
|
private |
Models for each thread.
Definition at line 79 of file NEML2ModelInterface.h.
|
private |
The work scheduler to use.
Definition at line 73 of file NEML2ModelInterface.h.
Referenced by NEML2ModelInterface< GeneralUserObject >::scheduler().