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 "ProblemOperatorInterface.h" 14 : #include "MFEMProblemSolve.h" 15 : #include "TimeDomainProblemOperator.h" 16 : #include "TransientBase.h" 17 : 18 : class MFEMTransient : public TransientBase, public Moose::MFEM::ProblemOperatorInterface 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : 23 : explicit MFEMTransient(const InputParameters & params); 24 : 25 : virtual void init() override; 26 : 27 : /// Return the solve object wrapped by time stepper 28 613 : virtual SolveObject * timeStepSolveObject() override { return &_mfem_problem_solve; } 29 : 30 : /// Do whatever is necessary to advance one step. 31 : virtual void takeStep(Real input_dt = -1.0) override; 32 : 33 : /// Not supported for MFEM problems, so error if called. 34 0 : virtual Real relativeSolutionDifferenceNorm(bool /*check_aux*/) const override 35 : { 36 0 : mooseError("MFEMTransient executioner does not yet support evaluating the relative solution " 37 : "difference norm at each timestep."); 38 : return 0.0; 39 : } 40 : 41 : /// MFEM problems have no libMesh based TimeIntegrators attached, so return empty set. 42 1332 : virtual std::set<TimeIntegrator *> getTimeIntegrators() const override { return {}; } 43 : 44 : /// MFEM problems have no libMesh based TimeIntegrators attached, so return empty vector. 45 106 : virtual std::vector<std::string> getTimeIntegratorNames() const override { return {}; } 46 : 47 : private: 48 : MFEMProblem & _mfem_problem; 49 : MFEMProblemData & _mfem_problem_data; 50 : MFEMProblemSolve _mfem_problem_solve; 51 : }; 52 : 53 : #endif