LCOV - code coverage report
Current view: top level - include/mfem/interfaces - ProblemOperatorInterface.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 1f9d31 Lines: 7 7 100.0 %
Date: 2025-09-02 20:01:20 Functions: 4 5 80.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14