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 "EquationSystem.h" 15 : 16 : namespace Moose::MFEM 17 : { 18 : /** 19 : * Class to store weak form components for time dependent PDEs 20 : */ 21 : class TimeDependentEquationSystem : public EquationSystem 22 : { 23 : public: 24 : TimeDependentEquationSystem(const Moose::MFEM::TimeDerivativeMap & time_derivative_map); 25 : 26 1048 : virtual void SetTimeStep(mfem::real_t & dt) { _dt = dt; }; 27 : virtual void AddKernel(std::shared_ptr<MFEMKernel> kernel) override; 28 : 29 : protected: 30 : virtual void BuildBilinearForms() override; 31 : virtual void BuildMixedBilinearForms() override; 32 : virtual void BuildNonlinearForms() override; 33 : virtual void EliminateCoupledVariables() override; 34 : 35 : /// Timestep size 36 : mfem::real_t _dt; 37 : 38 : Moose::MFEM::NamedFieldsMap<Moose::MFEM::NamedFieldsMap<std::vector<std::shared_ptr<MFEMKernel>>>> 39 : _td_kernels_map; 40 : /// Containers to store contributions to weak form of the form (F du/dt, v) 41 : Moose::MFEM::NamedFieldsMap<mfem::ParBilinearForm> _td_blfs; 42 : Moose::MFEM::NamedFieldsMap<Moose::MFEM::NamedFieldsMap<mfem::ParMixedBilinearForm>> 43 : _td_mblfs; // named according to trial variable 44 : 45 : /// Map between variable names and their time derivatives 46 : const Moose::MFEM::TimeDerivativeMap & _time_derivative_map; 47 : 48 : private: 49 : friend class TimeDependentEquationSystemProblemOperator; 50 : }; 51 : 52 : } // namespace Moose::MFEM 53 : 54 : #endif