https://mooseframework.inl.gov
NEML2PreKernel.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #ifdef NEML2_ENABLED
11 
12 // MOOSE includes
13 #include "NEML2PreKernel.h"
14 
17 {
19  params += MOOSEToNEML2::validParams();
20 
21  ExecFlagEnum & exec_enum = params.set<ExecFlagEnum>("execute_on", true);
22  exec_enum = {EXEC_INITIAL, EXEC_LINEAR};
23  params.suppressParameter<ExecFlagEnum>("execute_on");
24 
25  return params;
26 }
27 
29  : NEML2Kernel(parameters), MOOSEToNEML2(parameters)
30 {
31  if (name() != NEML2Name())
32  paramError("to_neml2", "NEML2PreKernel name must match to_neml2.");
33 }
34 
35 #endif
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:467
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
Definition: NEML2Kernel.C:16
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn&#39;t required or valid in the derived class...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
static InputParameters validParams()
Common interface for inserting gathered MOOSE data into the NEML2 material model. ...
Definition: MOOSEToNEML2.h:28
const std::string & NEML2Name() const
Name of the NEML2 variable/parameter.
Definition: MOOSEToNEML2.h:37
static InputParameters validParams()
Definition: MOOSEToNEML2.C:13
NEML2PreKernel(const InputParameters &parameters)
NEML2Kernel is a conceptual extension of MOOSE kernel that operates on NEML2 tensors.
Definition: NEML2Kernel.h:33
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:30