https://mooseframework.inl.gov
NEML2Kernel.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 "NEML2Kernel.h"
14 
17 {
19 
20  params.addRequiredParam<UserObjectName>(
21  "assembly", "The NEML2Assembly object to use to provide assembly information");
22  params.addRequiredParam<UserObjectName>(
23  "fe", "The NEML2FEInterpolation object to use to couple variables");
24 
25  return params;
26 }
27 
29  : GeneralUserObject(parameters),
30  _neml2_assembly(_fe_problem.getUserObject<NEML2Assembly>("assembly", /*tid=*/0)),
31  _fe(_fe_problem.getUserObject<NEML2FEInterpolation>("fe", /*tid=*/0))
32 {
33 }
34 
35 void
37 {
38  TIME_SECTION("execute", 1, "NEML2 kernel execution");
39 
40  forward();
41 }
42 
43 #endif
This user object serves as the "interface" for interpolating MOOSE variable values and gradients from...
void execute() override
Execute method.
Definition: NEML2Kernel.C:36
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
Definition: NEML2Kernel.C:16
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
NEML2Kernel(const InputParameters &parameters)
Definition: NEML2Kernel.C:28
This user object caches assembly information from MOOSE.
Definition: NEML2Assembly.h:20
virtual void forward()=0
The forward operator of this kernel.