49 const neml2::Tensor &
getOutput(
const neml2::VariableName & output_name)
const;
53 const neml2::VariableName & input_name)
const;
57 const std::string & parameter_name)
const;
virtual void addGatheredVariable(const UserObjectName &, const neml2::VariableName &)
Register a NEML2 input variable gathered by a gatherer.
bool outputReady() const
check if the output is fully computed and ready to be fetched
std::vector< const MOOSEToNEML2 * > _gatherers
MOOSE data gathering user objects.
void execute() override
Execute method.
neml2::DerivMap _retrieved_derivatives
set of derivatives that were retrieved (by other objects)
Interface class to provide common input parameters, members, and methods for MOOSEObjects that use NE...
virtual bool solve()
Perform the material update.
bool _error
Whether an error was encountered.
std::set< neml2::VariableName > _gathered_variable_names
neml2::ValueMap _out
The output variables of the material model.
virtual void extractOutputs()
Extract output derivatives with respect to input variables and model parameters.
std::set< std::string > _gathered_parameter_names
void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
const NEML2BatchIndexGenerator & _batch_index_generator
The NEML2BatchIndexGenerator used to generate the element-to-batch-index map.
const neml2::Tensor & getOutputDerivative(const neml2::VariableName &output_name, const neml2::VariableName &input_name) const
Get a reference(!) to the requested output derivative view.
std::string _error_message
Error message.
std::set< neml2::VariableName > _skip_vars
std::map< neml2::VariableName, std::map< std::string, neml2::Tensor > > _retrieved_parameter_derivatives
set of parameter derivatives that were retrieved (by other objects)
virtual void fillInputs()
Fill input variables and model parameters using the gatherers.
void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void checkExecutionStage() const final
Prevent output and derivative retrieval after construction.
virtual void applyPredictor()
Apply the predictor to set current trial state.
static InputParameters actionParams()
Parameters that can be specified under the NEML2Action common area.
const neml2::Tensor & getOutput(const neml2::VariableName &output_name) const
Get a reference(!) to the requested output view.
std::map< std::string, neml2::Tensor > _model_params
The model parameters to update (gathered from MOOSE)
NEML2ModelExecutor executes a NEML2 model.
bool _output_ready
flag that indicates if output data has been fully computed
neml2::DerivMap _dout_din
The derivative of the output variables w.r.t. the input variables.
virtual void addGatheredParameter(const UserObjectName &, const std::string &)
Register a NEML2 model parameter gathered by a gatherer.
void meshChanged() override
Called on this object when the mesh changes.
static InputParameters validParams()
const neml2::Tensor & getOutputParameterDerivative(const neml2::VariableName &output_name, const std::string ¶meter_name) const
Get a reference(!) to the requested output parameter derivative view.
Common interface for inserting gathered MOOSE data into the NEML2 material model. ...
void finalize() override
Finalize.
virtual void expandInputs()
Expand tensor shapes if necessary to conformal sizes.
std::size_t getBatchIndex(dof_id_type elem_id) const
Get the batch index for the given element ID.
neml2::ValueMap _in
The input variables of the material model.
neml2::ValueMap _retrieved_outputs
set of output variables that were retrieved (by other objects)
NEML2ModelExecutor(const InputParameters ¶ms)
NEML2BatchIndexGenerator iterates over the mesh and generates a map from element ID to batch index wh...