LCOV - code coverage report
Current view: top level - include/mfem/problem_operators - ProblemOperatorBase.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: fef103 Lines: 1 1 100.0 %
Date: 2025-09-03 20:01:23 Functions: 1 2 50.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 "MFEMProblem.h"
      14             : 
      15             : namespace Moose::MFEM
      16             : {
      17             : /// Interface inherited by ProblemOperator and TimeDomainProblemOperator. Removes duplicated code in both classes.
      18             : class ProblemOperatorBase
      19             : {
      20             : public:
      21             :   ProblemOperatorBase(MFEMProblem & problem);
      22         311 :   virtual ~ProblemOperatorBase() = default;
      23             : 
      24             :   virtual void SetGridFunctions();
      25             :   virtual void SetTestVariablesFromTrueVectors();
      26             :   virtual void SetTrialVariablesFromTrueVectors();
      27             :   virtual void Init(mfem::BlockVector & X);
      28             :   virtual void Solve() = 0;
      29             : 
      30             :   mfem::Array<int> _block_true_offsets;
      31             : 
      32             :   mfem::BlockVector _true_x, _true_rhs;
      33             :   mfem::OperatorHandle _equation_system_operator;
      34             : 
      35             : protected:
      36             :   /// Reference to the current problem.
      37             :   MFEMProblem & _problem;
      38             :   MFEMProblemData & _problem_data;
      39             : 
      40             :   /// Vector of names of state gridfunctions used in formulation, ordered by appearance in block
      41             :   /// vector during solve.
      42             :   std::vector<std::string> _test_var_names;
      43             :   std::vector<mfem::ParGridFunction *> _test_variables;
      44             :   const mfem::Vector * _test_true_vector = nullptr;
      45             : 
      46             :   /// Vector of names of state gridfunctions used in formulation, ordered by appearance in block
      47             :   /// vector during solve.
      48             :   std::vector<std::string> _trial_var_names;
      49             :   std::vector<mfem::ParGridFunction *> _trial_variables;
      50             : };
      51             : }
      52             : 
      53             : #endif

Generated by: LCOV version 1.14