https://mooseframework.inl.gov
EquationSystemProblemOperator.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 #include "ProblemOperator.h"
15 
16 namespace Moose::MFEM
17 {
20 {
21 public:
23  : ProblemOperator(problem), _equation_system(problem.eqn_system)
24  {
25  }
26 
27  void SetGridFunctions() override;
28  void Init(mfem::BlockVector & X) override;
29  virtual void Solve(mfem::Vector & X) override;
30 
31  [[nodiscard]] Moose::MFEM::EquationSystem * GetEquationSystem() const override
32  {
33  if (!_equation_system)
34  {
35  MFEM_ABORT("No equation system has been added to ProblemOperator.");
36  }
37 
38  return _equation_system.get();
39  }
40 
41 private:
42  std::shared_ptr<Moose::MFEM::EquationSystem> _equation_system{nullptr};
43 };
44 
45 } // namespace Moose::MFEM
46 
47 #endif
virtual void Solve(mfem::Vector &X) override
Base problem data struct.
Steady-state problem operator with no equation system.
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system
Moose::MFEM::EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.
Steady-state problem operator with an equation system.