Line data Source code
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 "ProblemOperatorBase.h" 15 : 16 : namespace Moose::MFEM 17 : { 18 : /** 19 : * Interface required for MFEM executioners to add and get ProblemOperators: 20 : * - MFEMTransient 21 : * - MFEMSteady 22 : */ 23 : class ProblemOperatorInterface 24 : { 25 : public: 26 1361 : ProblemOperatorInterface() = default; 27 1361 : virtual ~ProblemOperatorInterface() = default; 28 : 29 : /// Returns a pointer to the operator's equation system. 30 4083 : virtual std::vector<std::shared_ptr<ProblemOperatorBase>> & getProblemOperators() 31 : { 32 4083 : return _problem_operators; 33 : } 34 : 35 : /// Add an MFEM problem operator. Takes ownership. 36 1361 : virtual void addProblemOperator(std::shared_ptr<ProblemOperatorBase> problem_operator) 37 : { 38 1361 : _problem_operators.push_back(std::move(problem_operator)); 39 1361 : } 40 : 41 : private: 42 : std::vector<std::shared_ptr<ProblemOperatorBase>> _problem_operators; 43 : }; 44 : } 45 : 46 : #endif