https://mooseframework.inl.gov
MFEMNLCurlCurlKernel.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 
12 #include "MFEMNLCurlCurlKernel.h"
13 #include "MFEMProblem.h"
14 #include "NLCurlCurlIntegrator.h"
15 
17 
20 {
22  params.addClassDescription(
23  "Adds the domain integrator to an MFEM problem for the nonlinear form "
24  "$(k(|\\vec \\nabla \\times \\vec u|) \\vec \\nabla \\times \\vec u, \\vec \\nabla \\times "
25  "\\vec v)_\\Omega$ "
26  "arising from the weak form of the non-linear operator "
27  "$\\vec \\nabla \\times (k(|\\vec \\nabla \\times \\vec u|) \\vec \\nabla \\times \\vec "
28  "u)$.");
29  params.addParam<MFEMScalarCoefficientName>(
30  "k_coefficient",
31  "1.",
32  "Name of the nonlinear coefficient $k(|\\vec\\nabla \\times \\vec u|)$.");
33  params.addParam<MFEMScalarCoefficientName>(
34  "curlu_dk_dcurlu_coefficient",
35  "0.",
36  "Name of the coefficient representing "
37  "$|\\vec \\nabla \\times \\vec u| \\partial k(|\\nabla "
38  "\\times \\vec u|)/\\partial |\\nabla \\times \\vec u|$");
39  params.addParam<mfem::real_t>(
40  "curlu_zero_tol",
41  1e-32,
42  "Tolerance used for normalizing the curl vector when forming the Jacobian.");
43  return params;
44 }
45 
47  : MFEMKernel(parameters),
48  _k_coef(getScalarCoefficient("k_coefficient")),
49  _curlu_dk_dcurlu_coef(getScalarCoefficient("curlu_dk_dcurlu_coefficient")),
50  _curlu_vec_coef(getVectorCoefficientByName(getTrialVariableName() + "_curl")),
51  _curlu_zero_tol(getParam<mfem::real_t>("curlu_zero_tol"))
52 {
53 }
54 
55 mfem::NonlinearFormIntegrator *
57 {
60 }
61 
62 #endif
mfem::Coefficient & _curlu_dk_dcurlu_coef
mfem::Coefficient & _k_coef
registerMooseObject("MooseApp", MFEMNLCurlCurlKernel)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
mfem::VectorCoefficient & _curlu_vec_coef
virtual mfem::NonlinearFormIntegrator * createNLIntegrator() override
MFEMNLCurlCurlKernel(const InputParameters &parameters)
static InputParameters validParams()
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...
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...
Class to construct an MFEM integrator to apply to the equation system.
Definition: MFEMKernel.h:21
static InputParameters validParams()
Definition: MFEMKernel.C:19