diff --git a/include/actions/MFEMObjectAction.h b/include/actions/MFEMObjectAction.h new file mode 100644 index 00000000..2c098182 --- /dev/null +++ b/include/actions/MFEMObjectAction.h @@ -0,0 +1,23 @@ +#pragma once + +#include "MFEMProblem.h" + +// MOOSE includes +#include "MooseObjectAction.h" + +/* + * This class adds a getMFEMProblem method. + */ +class MFEMObjectAction : public MooseObjectAction +{ +public: + static InputParameters validParams(); + + MFEMObjectAction(const InputParameters & parameters); + + /// Returns a reference to the MFEMProblem instance. + MFEMProblem & getMFEMProblem() const { return _mfem_problem; } + +private: + MFEMProblem & _mfem_problem; +}; \ No newline at end of file diff --git a/src/actions/MFEMObjectAction.C b/src/actions/MFEMObjectAction.C new file mode 100644 index 00000000..4c851b28 --- /dev/null +++ b/src/actions/MFEMObjectAction.C @@ -0,0 +1,12 @@ +#include "MFEMObjectAction.h" + +InputParameters +MFEMObjectAction::validParams() +{ + return MooseObjectAction::validParams(); +} + +MFEMObjectAction::MFEMObjectAction(const InputParameters & parameters) + : MooseObjectAction(parameters), _mfem_problem(static_cast(*_problem)) +{ +}