13 #include "neml2/models/Model.h" 30 virtual void act()
override;
52 const neml2::VariableName
name;
53 const neml2::TensorType
type;
59 const neml2::TensorType
type;
142 template <
typename EnumType,
typename T1,
typename T2>
144 std::tuple<std::vector<EnumType>, std::vector<T1>, std::vector<T2>>
146 const std::string & moose_name_opt,
147 const std::string & neml2_name_opt)
const 149 const auto moose_types = getParam<MultiMooseEnum>(moose_type_opt).getSetValueIDs<EnumType>();
150 const auto moose_names = getParam<std::vector<T1>>(moose_name_opt);
151 const auto neml2_names = getParam<std::vector<T2>>(neml2_name_opt);
153 if (moose_types.size() != moose_names.size())
154 paramError(moose_name_opt, moose_name_opt,
" must have the same length as ", moose_type_opt);
155 if (moose_names.size() != neml2_names.size())
156 paramError(moose_name_opt, moose_name_opt,
" must have the same length as ", neml2_name_opt);
158 return {moose_types, moose_names, neml2_names};
std::vector< DerivativeMapping > _derivs
MOOSE-NEML2 derivative mappings.
std::map< MaterialPropertyName, std::vector< OutputName > > _export_output_targets
Material property additional outputs.
Action to set up NEML2 objects.
const neml2::VariableName name
Input parameters common to all block-restricted NEML2Actions.
const neml2::TensorType type
const struct NEML2Action::DerivativeMapping::NEML2Derivative neml2
void setupParameterDerivativeMappings(const neml2::Model &)
Set up MOOSE-NEML2 parameter derivative mappings.
std::tuple< std::vector< EnumType >, std::vector< T1 >, std::vector< T2 > > getInputParameterMapping(const std::string &moose_type_opt, const std::string &moose_name_opt, const std::string &neml2_name_opt) const
Get parameter lists for mapping between MOOSE and NEML2 quantities.
const std::vector< SubdomainName > _block
Blocks this sub-block action applies to.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
const UserObjectName _executor_name
Name of the NEML2Executor user object.
std::map< MaterialPropertyName, MaterialPropertyName > _initialize_output_values
Material property initial conditions.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
std::vector< ParameterDerivativeMapping > _param_derivs
MOOSE-NEML2 parameter derivative mappings.
void setupParameterMappings(const neml2::Model &)
Set up MOOSE-NEML2 model parameter mappings.
const NEML2ActionCommon & getCommonAction() const
NEML2Action(const InputParameters &)
void printSummary(const neml2::Model &) const
Print a summary of the NEML2 model.
const neml2::TensorType type
const struct NEML2Action::ParameterDerivativeMapping::NEML2Derivative neml2
void setupInputMappings(const neml2::Model &)
Set up MOOSE-NEML2 input variable mappings.
void setupDerivativeMappings(const neml2::Model &)
Set up MOOSE-NEML2 derivative mappings.
static InputParameters validParams()
void setupOutputMappings(const neml2::Model &)
Set up MOOSE-NEML2 output variable mappings.
const UserObjectName _idx_generator_name
Name of the NEML2BatchIndexGenerator user object.
std::size_t getLongestMOOSEName() const
Get the maximum length of all MOOSE names (for printing purposes)
std::vector< VariableMapping > _outputs
MOOSE-NEML2 output variable mappings.
std::vector< ParameterMapping > _params
MOOSE-NEML2 model parameter mappings.
std::vector< VariableMapping > _inputs
MOOSE-NEML2 input variable mappings.