https://mooseframework.inl.gov
TimeDomainEquationSystemProblemOperator.h
Go to the documentation of this file.
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 MFEM_ENABLED
11 
12 #pragma once
15 
16 namespace Moose::MFEM
17 {
18 
22 {
23 public:
25  : TimeDomainProblemOperator(problem),
28  {
29  }
30 
31  void SetGridFunctions() override;
32  void Init(mfem::BlockVector & X) override;
33 
34  void ImplicitSolve(const double dt, const mfem::Vector & X, mfem::Vector & dX_dt) override;
35 
37  {
38  if (!_equation_system)
39  {
40  MFEM_ABORT("No equation system has been added.");
41  }
42 
43  return _equation_system.get();
44  }
45 
46 protected:
47  void BuildEquationSystemOperator(double dt);
48 
49 private:
50  std::vector<mfem::ParGridFunction *> _trial_variable_time_derivatives;
51  std::shared_ptr<Moose::MFEM::TimeDependentEquationSystem> _equation_system{nullptr};
52 };
53 
54 } // namespace Moose::MFEM
55 
56 #endif
Base problem data struct.
std::shared_ptr< Moose::MFEM::TimeDependentEquationSystem > _equation_system
Moose::MFEM::TimeDependentEquationSystem * GetEquationSystem() const override
Returns a pointer to the operator&#39;s equation system.
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
Problem operator for time-dependent problems with an equation system.
Problem operator for time-dependent problems with no equation system.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void ImplicitSolve(const double dt, const mfem::Vector &X, mfem::Vector &dX_dt) override