- inputThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Path to the NEML2 input file containing the NEML2 model(s).)
C++ Type:DataFileName
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Path to the NEML2 input file containing the NEML2 model(s).)
NEML2Action
The NEML2
library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Set up the NEML2 material model)
This page is developer-facing. Users please refer to the NEML2 syntax documentation.
Overview
This is the primary action responsible for constructing objects for transferring data back and forth between MOOSE and NEML2, as well as for executing the NEML2 model.
Four types of objects are constructed by this action:
Gatherer: Object responsible for gathering MOOSE data.
Retriever: Object responsible for retrieving NEML2 data and assigning it back to MOOSE data structures.
Index generator: Object responsible for generating the element-to-batch-index map.
Executor: Object responsible for sending data gathered by gatherers to NEML2, execute the NEML2 model, and have the outputs ready for retrieval by retrievers.
Currently supported objects are summarized below.
Type | MOOSE object(s) |
---|---|
Gatherer | MOOSEMaterialPropertyToNEML2 |
MOOSEVariableToNEML2 | |
MOOSPostprocessorToNEML2 | |
Retriever | NEML2ToMOOSEMaterialProperty |
Index generator | NEML2BatchIndexGenerator |
Executor | NEML2ModelExecutor |
Multiple gatherers and retrievers may be created by this action, but each instance of the action creates one and only one index generator and executor. Each step performed by this action is explained in one of the following sections, in the order of execution.
Applying common parameters
Recall that input file parameters in the common area under the [NEML2]
block defined by the NEML2ActionCommon are shared by all sub-blocks. The first step is to retrieve the common parameters and apply them to this sub-block. This happens in the constructor of the action. Note that parameters defined in the sub-block overrides the parameters defined in the common area.
Creating the NEML2 model
By the time this action "acts", the NEML2 input file must have already been parsed and loaded by NEML2ActionCommon. Therefore, the NEML2 model associated with this action can be directly created using the name given by "model".
NEML2 model introspection
If "verbose" is set to true
, a high-level summary of the NEML2 model is print to the console, including model name, evaluation device, as well as a table summarizing the model's variables, parameters, and buffers.
NEML2 model allows introspection, i.e., variable and parameter names, tensor types, and storage sizes can be inferred after the model is loaded. Five maps are set up upon introspection of the NEML2 model:
A map between MOOSE data structures and NEML2 input variables.
A map between MOOSE data structures and NEML2 model parameters.
A map between MOOSE data structures and NEML2 output variables.
A map between MOOSE data structures and NEML2 output derivatives.
A map between MOOSE data structures and NEML2 parameter derivatives.
These maps are used later to create objects for transferring data between MOOSE and NEML2.
Creating MOOSEToNEML2 gatherers
This step involves the creation of MOOSEToNEML2
gatherers for NEML2 input variables and model parameters. The first two maps mentioned in the previous section are used. The maps are looped through to create objects one-by-one.
Note that the correct type of object is selected/created relying on NEML2 model introspection. For example, if a NEML2 input variable is of type SR2
, we can infer that the corresponding MOOSE data structure should be SymmetricRankTwoTensor
. According to the user-specified "moose_input_types", we can deduce where the MOOSE data comes from. (Though in this case MATERIAL
is the only viable option, as a SymmetricRankTwoTensor
cannot come from a MOOSE variable nor a MOOSE postprocessor).
Creating the NEML2 index generator and model executor
Next, a NEML2BatchIndexGenerator and a NEML2ModelExecutor excutor are created. The list of "gatherers" and "param_gatherers" are automatically filled out by this action.
Creating NEML2ToMOOSE retrievers
The last step is creating the NEML2ToMOOSE
retrievers to retrieve NEML2 model outputs (and their derivatives) back to MOOSE. This step is similar to creating MOOSEToNEML2 gatherers.
Input Parameters
- cli_argsAdditional command line arguments to use when parsing the NEML2 input file.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Additional command line arguments to use when parsing the NEML2 input file.
- devicecpuDevice on which to evaluate the NEML2 model. The string supplied must follow the following schema: (cpu|cuda)[:
] where cpu or cuda specifies the device type, and : optionally specifies a device index. For example, device='cpu' sets the target compute device to be CPU, and device='cuda:1' sets the target compute device to be CUDA with device ID 1. Default:cpu
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:Device on which to evaluate the NEML2 model. The string supplied must follow the following schema: (cpu|cuda)[:
] where cpu or cuda specifies the device type, and : optionally specifies a device index. For example, device='cpu' sets the target compute device to be CPU, and device='cuda:1' sets the target compute device to be CUDA with device ID 1. - execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Unit:(no unit assumed)
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- export_output_targetsThe export targets corresponding to each MOOSE material property specified in export_outputs.
C++ Type:std::vector<std::vector<OutputName>>
Unit:(no unit assumed)
Controllable:No
Description:The export targets corresponding to each MOOSE material property specified in export_outputs.
- export_outputsList of MOOSE material properties to export which correspond to NEML2 output variables or output derivatives. Each material property's export targets can be specified by export_output_targets. The default export target is 'none'.
C++ Type:std::vector<MaterialPropertyName>
Unit:(no unit assumed)
Controllable:No
Description:List of MOOSE material properties to export which correspond to NEML2 output variables or output derivatives. Each material property's export targets can be specified by export_output_targets. The default export target is 'none'.
- initialize_output_valuesList of MOOSE material properties whose initial values (evaluated at the 0th time step) will be used to initialize stateful properties. See the description of initialize_outputs for more details.
C++ Type:std::vector<MaterialPropertyName>
Unit:(no unit assumed)
Controllable:No
Description:List of MOOSE material properties whose initial values (evaluated at the 0th time step) will be used to initialize stateful properties. See the description of initialize_outputs for more details.
- initialize_outputsList of MOOSE material properties to be initialized. Each these properties must correspond to a stateful NEML2 variable (which appears on both the input old state sub-axis and the output state sub-axis). These MOOSE material properties will be initialized with the values of properties specified in the initialize_output_values list.
C++ Type:std::vector<MaterialPropertyName>
Unit:(no unit assumed)
Controllable:No
Description:List of MOOSE material properties to be initialized. Each these properties must correspond to a stateful NEML2 variable (which appears on both the input old state sub-axis and the output state sub-axis). These MOOSE material properties will be initialized with the values of properties specified in the initialize_output_values list.
- modelName of the NEML2 model, i.e., the string inside the brackets [] in the NEML2 input file that corresponds to the model you want to use.
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:Name of the NEML2 model, i.e., the string inside the brackets [] in the NEML2 input file that corresponds to the model you want to use.
- moose_derivative_typesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 variable derivatives)
C++ Type:MultiMooseEnum
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 variable derivatives)
- moose_derivativesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the derivative of the material model.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the derivative of the material model.)
- moose_input_typesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Type of each MOOSE data to be used as NEML2 input variable)
C++ Type:MultiMooseEnum
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Type of each MOOSE data to be used as NEML2 input variable)
- moose_inputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data to be used as inputs of the material model.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data to be used as inputs of the material model.)
- moose_output_typesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 output variables)
C++ Type:MultiMooseEnum
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 output variables)
- moose_outputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the output of the material model.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the output of the material model.)
- moose_parameter_derivative_typesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 parameter derivatives)
C++ Type:MultiMooseEnum
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: MOOSE types used to hold the NEML2 parameter derivatives)
- moose_parameter_derivativesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the derivative of the material model w.r.t. model parameters.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data used to hold the derivative of the material model w.r.t. model parameters.)
- moose_parameter_typesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Type of each MOOSE data to be used as NEML2 model parameter)
C++ Type:MultiMooseEnum
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Type of each MOOSE data to be used as NEML2 model parameter)
- moose_parametersThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data to be used as parameters of the material model.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE data to be used as parameters of the material model.)
- neml2_derivativesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of pairs of NEML2 variables to take derivatives (i.e., first in the pair w.r.t. the second in the pair).)
C++ Type:std::vector<std::vector<std::string>>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of pairs of NEML2 variables to take derivatives (i.e., first in the pair w.r.t. the second in the pair).)
- neml2_inputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 input variables corresponding to each MOOSE data.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 input variables corresponding to each MOOSE data.)
- neml2_outputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 output variables corresponding to each MOOSE data.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 output variables corresponding to each MOOSE data.)
- neml2_parameter_derivativesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of pairs of NEML2 variables to take derivatives (i.e., first in the pair w.r.t. the second in the pair).)
C++ Type:std::vector<std::vector<std::string>>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of pairs of NEML2 variables to take derivatives (i.e., first in the pair w.r.t. the second in the pair).)
- neml2_parametersThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 model parameters corresponding to each MOOSE data.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 model parameters corresponding to each MOOSE data.)
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- skip_inputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip error checking when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip error checking when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)
- skip_variablesThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
- verboseTrueThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Whether to print additional information about the NEML2 model at the beginning of the simulation)
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Whether to print additional information about the NEML2 model at the beginning of the simulation)
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Unit:(no unit assumed)
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
These input parameters correspond to the sub-blocks under the [NEML2]
block. The usage of the [NEML2]
block is explained in details in the NEML2 syntax documentation.