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 "EquationSystemProblemOperator.h" 15 : #include "EigenproblemEquationSystem.h" 16 : 17 : namespace Moose::MFEM 18 : { 19 : class EigensolverBase; 20 : 21 : /// Steady-state eigenproblem operator with an equation system. 22 : class EigenproblemESProblemOperator : public EquationSystemProblemOperator 23 : { 24 : public: 25 26 : EigenproblemESProblemOperator(MFEMProblem & problem) : EquationSystemProblemOperator(problem) 26 : { 27 : mooseAssert(std::dynamic_pointer_cast<EigenproblemEquationSystem>(_problem_data.eqn_system), 28 : "MFEMProblemData::eqn_system is not an EigenproblemEquationSystem."); 29 26 : } 30 : 31 : virtual void Solve() override; 32 : 33 130 : [[nodiscard]] EigenproblemEquationSystem * GetEquationSystem() const override 34 : { 35 : return static_cast<EigenproblemEquationSystem *>( 36 130 : EquationSystemProblemOperator::GetEquationSystem()); 37 : } 38 : 39 : private: 40 : void RecoverEigenproblemSolution(GridFunctions & gridfunctions, EigensolverBase * eigensolver); 41 : 42 : protected: 43 : /// Add kernels/bcs and assemble the linear part of the equation system 44 : void BuildEquationSystemOperator(); 45 : }; 46 : 47 : } // namespace Moose::MFEM 48 : 49 : #endif