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