Skip to content

Commit

Permalink
Adds MFEMObjectAction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Palmer committed Jun 21, 2024
1 parent a09e68b commit 9fd03f1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions include/actions/MFEMObjectAction.h
Original file line number Diff line number Diff line change
@@ -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;
};
12 changes: 12 additions & 0 deletions src/actions/MFEMObjectAction.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "MFEMObjectAction.h"

InputParameters
MFEMObjectAction::validParams()
{
return MooseObjectAction::validParams();
}

MFEMObjectAction::MFEMObjectAction(const InputParameters & parameters)
: MooseObjectAction(parameters), _mfem_problem(static_cast<MFEMProblem &>(*_problem))
{
}

0 comments on commit 9fd03f1

Please sign in to comment.