https://mooseframework.inl.gov
MFEMGeneralUserObject.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 "MFEMGeneralUserObject.h"
13 #include "MFEMProblem.h"
14 
16 
19 {
21  params.addClassDescription("Base class for custom GeneralUserObjects to add to MFEM problems.");
22  return params;
23 }
24 
26  : GeneralUserObject(parameters), _mfem_problem(static_cast<MFEMProblem &>(_fe_problem))
27 {
28 }
29 
30 mfem::Coefficient &
31 MFEMGeneralUserObject::getScalarCoefficientByName(const MFEMScalarCoefficientName & name)
32 {
34 }
35 
36 mfem::VectorCoefficient &
37 MFEMGeneralUserObject::getVectorCoefficientByName(const MFEMVectorCoefficientName & name)
38 {
40 }
41 
42 mfem::MatrixCoefficient &
43 MFEMGeneralUserObject::getMatrixCoefficientByName(const MFEMMatrixCoefficientName & name)
44 {
46 }
47 
48 mfem::Coefficient &
50 {
51  return getScalarCoefficientByName(getParam<MFEMScalarCoefficientName>(name));
52 }
53 
54 mfem::VectorCoefficient &
56 {
57  return getVectorCoefficientByName(getParam<MFEMVectorCoefficientName>(name));
58 }
59 
60 mfem::MatrixCoefficient &
62 {
63  return getMatrixCoefficientByName(getParam<MFEMMatrixCoefficientName>(name));
64 }
65 
66 #endif
static InputParameters validParams()
mfem::VectorCoefficient & getVectorCoefficientByName(const MFEMVectorCoefficientName &name)
static InputParameters validParams()
mfem::MatrixCoefficient & getMatrixCoefficient(const std::string &name)
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
Return a vector coefficient with the given name or, if that doesn&#39;t exists, try interpreting the name...
mfem::Coefficient & getScalarCoefficientByName(const MFEMScalarCoefficientName &name)
Returns references to coefficients stored in the MFEMProblem PropertiesManager.
mfem::Coefficient & getScalarCoefficient(const std::string &name)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
mfem::MatrixCoefficient & getMatrixCoefficient(const std::string &name)
Return scalar coefficient with the given name.
This class adds a getMFEMProblem method.
registerMooseObject("MooseApp", MFEMGeneralUserObject)
mfem::MatrixCoefficient & getMatrixCoefficientByName(const MFEMMatrixCoefficientName &name)
Moose::MFEM::CoefficientManager & getCoefficients()
Method to get the PropertyManager object for storing material properties and converting them to MFEM ...
Definition: MFEMProblem.h:184
mfem::Coefficient & getScalarCoefficient(const std::string &name)
Return a scalar coefficient with the given name or, if that doesn&#39;t exists, try interpreting the name...
MFEMProblem & getMFEMProblem()
Returns a reference to the MFEMProblem instance.
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...
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
MFEMGeneralUserObject(const InputParameters &parameters)