https://mooseframework.inl.gov
MFEMObject.h
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 #pragma once
13 
14 #include "MooseObject.h"
15 #include "FunctionInterface.h"
16 #include "PostprocessorInterface.h"
18 #include "ReporterInterface.h"
19 
20 class MFEMProblem;
21 
25 class MFEMObject : public MooseObject,
26  protected FunctionInterface,
27  protected PostprocessorInterface,
29  protected ReporterInterface
30 {
31 public:
36 
41 
49  const MFEMProblem & getMFEMProblem() const { return _mfem_problem; }
50 
54  mfem::Coefficient & getScalarCoefficientByName(const MFEMScalarCoefficientName & name);
58  mfem::VectorCoefficient & getVectorCoefficientByName(const MFEMVectorCoefficientName & name);
62  mfem::MatrixCoefficient & getMatrixCoefficientByName(const MFEMMatrixCoefficientName & name);
66  mfem::Coefficient & getScalarCoefficient(const std::string & name);
70  mfem::VectorCoefficient & getVectorCoefficient(const std::string & name);
74  mfem::MatrixCoefficient & getMatrixCoefficient(const std::string & name);
75 
76 private:
79 };
80 
81 #endif
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition: MFEMObject.h:25
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Definition: MFEMObject.h:45
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
Retrieve a vector MFEM coefficient using the value of an input parameter.
Definition: MFEMObject.C:64
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
mfem::VectorCoefficient & getVectorCoefficientByName(const MFEMVectorCoefficientName &name)
Retrieve a vector MFEM coefficient by its declared name.
Definition: MFEMObject.C:46
MFEMProblem & _mfem_problem
Owning MFEM problem for this object.
Definition: MFEMObject.h:78
mfem::MatrixCoefficient & getMatrixCoefficientByName(const MFEMMatrixCoefficientName &name)
Retrieve a matrix MFEM coefficient by its declared name.
Definition: MFEMObject.C:52
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
Interface to allow object to consume Reporter values.
const MFEMProblem & getMFEMProblem() const
Return the owning MFEM problem.
Definition: MFEMObject.h:49
mfem::MatrixCoefficient & getMatrixCoefficient(const std::string &name)
Retrieve a matrix MFEM coefficient using the value of an input parameter.
Definition: MFEMObject.C:70
static InputParameters validParams()
Declare the common parameters required by MFEM MooseObject-backed classes.
Definition: MFEMObject.C:17
mfem::Coefficient & getScalarCoefficient(const std::string &name)
Retrieve a scalar MFEM coefficient using the value of an input parameter.
Definition: MFEMObject.C:58
mfem::Coefficient & getScalarCoefficientByName(const MFEMScalarCoefficientName &name)
Retrieve a scalar MFEM coefficient by its declared name.
Definition: MFEMObject.C:40
Interface for objects that need to use functions.
Interface class for classes which interact with Postprocessors.
MFEMObject(const InputParameters &parameters)
Construct an MFEM object backed directly by MooseObject.
Definition: MFEMObject.C:28