https://mooseframework.inl.gov
MFEMGeneralUserObject.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 "GeneralUserObject.h"
15 #include "libmesh/ignore_warnings.h"
16 #include <mfem.hpp>
17 #include "libmesh/restore_warnings.h"
18 
19 // Forwards declaration.
20 class MFEMProblem;
21 
26 {
27 public:
29 
31 
34  const MFEMProblem & getMFEMProblem() const { return _mfem_problem; }
35 
37  mfem::Coefficient & getScalarCoefficientByName(const MFEMScalarCoefficientName & name);
38  mfem::VectorCoefficient & getVectorCoefficientByName(const MFEMVectorCoefficientName & name);
39  mfem::MatrixCoefficient & getMatrixCoefficientByName(const MFEMMatrixCoefficientName & name);
40  mfem::Coefficient & getScalarCoefficient(const std::string & name);
41  mfem::VectorCoefficient & getVectorCoefficient(const std::string & name);
42  mfem::MatrixCoefficient & getMatrixCoefficient(const std::string & name);
43 
44  void execute() override {}
45 
46  void initialize() override {}
47 
48  void finalize() override {}
49 
50 private:
52 };
53 
54 #endif
static InputParameters validParams()
mfem::VectorCoefficient & getVectorCoefficientByName(const MFEMVectorCoefficientName &name)
mfem::MatrixCoefficient & getMatrixCoefficient(const std::string &name)
void finalize() override
Finalize.
mfem::Coefficient & getScalarCoefficientByName(const MFEMScalarCoefficientName &name)
Returns references to coefficients stored in the MFEMProblem PropertiesManager.
mfem::Coefficient & getScalarCoefficient(const std::string &name)
void execute() override
Execute method.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
This class adds a getMFEMProblem method.
mfem::MatrixCoefficient & getMatrixCoefficientByName(const MFEMMatrixCoefficientName &name)
MFEMProblem & getMFEMProblem()
Returns a reference to the MFEMProblem instance.
const InputParameters & parameters() const
Get the parameters of the object.
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
MFEMGeneralUserObject(const InputParameters &parameters)
const MFEMProblem & getMFEMProblem() const