https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMNLDiffusionKernel.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 MOOSE_MFEM_ENABLED
11
13#include "MFEMProblem.h"
15
17
20{
22 params.addClassDescription("Adds the domain integrator to an MFEM problem for the nonlinear form "
23 "$(k(u) \\vec\\nabla u, \\vec\\nabla v)_\\Omega$ "
24 "arising from the weak form of the non-linear operator "
25 "$- \\vec\\nabla \\cdot (k(u) \\vec\\nabla u)$.");
26 params.addParam<MFEMScalarCoefficientName>(
27 "k_coefficient", "1.", "Name of property for nonlinear diffusivity coefficient k(u).");
28 params.addParam<MFEMScalarCoefficientName>(
29 "dk_du_coefficient",
30 "0.",
31 "Name of property partial derivative of diffusivity coefficient k(u) with respect to the "
32 "trial variable u.");
33 return params;
34}
35
37 : MFEMKernel(parameters),
38 _k_coef(getScalarCoefficient("k_coefficient")),
39 _dk_du_coef(getScalarCoefficient("dk_du_coefficient")),
40 _trial_var(*getMFEMProblem().getGridFunction(getTrialVariableName()))
41{
42}
43
44mfem::NonlinearFormIntegrator *
49
50#endif
registerMooseObject("MooseApp", MFEMNLDiffusionKernel)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Class to construct an MFEM integrator to apply to the equation system.
Definition MFEMKernel.h:22
static InputParameters validParams()
Definition MFEMKernel.C:19
static InputParameters validParams()
virtual mfem::NonlinearFormIntegrator * createNLIntegrator() override
mfem::Coefficient & _k_coef
mfem::Coefficient & _dk_du_coef
MFEMNLDiffusionKernel(const InputParameters &parameters)
mfem::ParGridFunction & _trial_var