https://mooseframework.inl.gov
MFEMAuxKernel.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 MFEM_ENABLED
11 
12 #include "MFEMAuxKernel.h"
13 #include "MFEMProblem.h"
14 
17 {
19  params.registerBase("AuxKernel");
20  params.addClassDescription("Base class for MFEMGeneralUserObjects that update auxiliary "
21  "variables outside of the main solve step.");
22  params.addRequiredParam<AuxVariableName>("variable",
23  "The name of the variable that this object applies to");
24  return params;
25 }
26 
28  : MFEMGeneralUserObject(parameters),
29  _result_var_name(getParam<AuxVariableName>("variable")),
30  _result_var(*getMFEMProblem().getProblemData().gridfunctions.Get(_result_var_name))
31 {
32  _result_var = 0.0;
33 }
34 
35 #endif
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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...
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
mfem::ParGridFunction & _result_var
Reference to result gridfunction.
Definition: MFEMAuxKernel.h:36
static InputParameters validParams()
Definition: MFEMAuxKernel.C:16
MFEMAuxKernel(const InputParameters &parameters)
Definition: MFEMAuxKernel.C:27
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...