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 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 
22 /*
23  * This class adds a getMFEMProblem method.
24  */
26 {
27 public:
29 
31 
34  const MFEMProblem & getMFEMProblem() const { return _mfem_problem; }
35 
37  mfem::Coefficient & getScalarCoefficient(const std::string & name);
38  mfem::VectorCoefficient & getVectorCoefficient(const std::string & name);
39  mfem::MatrixCoefficient & getMatrixCoefficient(const std::string & name);
40 
41  void execute() override {}
42 
43  void initialize() override {}
44 
45  void finalize() override {}
46 
47 private:
49 };
50 
51 #endif
static InputParameters validParams()
mfem::MatrixCoefficient & getMatrixCoefficient(const std::string &name)
void finalize() override
Finalize.
mfem::Coefficient & getScalarCoefficient(const std::string &name)
Returns references to coefficients stored in the MFEMProblem PropertiesManager.
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
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