10#ifdef MOOSE_MFEM_ENABLED
18 MFEMProblem & problem,
const std::string & weak_form_name)
21 problem.getEquationSystem(weak_form_name)))
24 mooseError(
"The weak form supplying this operator does not provide a "
25 "TimeDependentEquationSystem, which is required by "
26 "TimeDependentEquationSystemProblemOperator.");
43 ode_solver = std::make_unique<mfem::BackwardEulerSolver>();
44 ode_solver->Init(*(
this));
46 SetImplicitVariableType(STATE);
58 gfs.GetRef(tdm.getTimeDerivativeName(trial_var_name)) = gfs.GetRef(trial_var_name);
69 (gfs.GetRef(tdm.getTimeDerivativeName(trial_var_name)) -= gfs.GetRef(trial_var_name)) /= -dt;
81 "TimeDependentEquationSystemProblemOperator::FormSystem", 2,
"Assembling MFEM System");
89 "TimeDependentEquationSystemProblemOperator::SolveSystem", 2,
"Solving MFEM 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.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
virtual Real & dt() const
virtual Real & time() const
void setTime(const mfem::real_t time)
const std::vector< std::string > & GetTrialVarNames() const
const std::vector< std::string > & GetTestVarNames() const
void FormSystem(mfem::BlockVector &trueX, mfem::BlockVector &trueRHS)
Build all weak-form components via BuildEquationSystem(), form the constrained linear part of the sys...
virtual void SetTrialVariablesFromTrueVectors()
void SolveWithOperator(mfem::Operator &system_operator, mfem::Operator &linear_operator, const mfem::Vector &rhs, mfem::Vector &x)
Solve the current system operator using the configured nonlinear and linear solvers.
mfem::Vector * _trial_true_vector
MFEMProblem & _problem
Reference to the current problem.
MFEMProblemData & _problem_data
mfem::BlockVector _true_rhs
std::vector< std::string > _trial_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
std::vector< std::string > _test_var_names
mfem::BlockVector _true_x
virtual Moose::MFEM::TimeDependentEquationSystem * GetEquationSystem() const override
Returns a pointer to the operator's equation system.
virtual void ImplicitSolve(const mfem::real_t, const mfem::Vector &, mfem::Vector &) override
virtual void Init() override
TimeDependentEquationSystemProblemOperator(MFEMProblem &problem, const std::string &weak_form_name="")
std::shared_ptr< Moose::MFEM::TimeDependentEquationSystem > _equation_system
virtual void SetGridFunctions() override
void FormEquationSystemOperator(mfem::real_t dt)
Form equation-system state for the current implicit time step.
virtual void Solve() override
Class to store weak form components for time dependent PDEs.
virtual void SetTimeStep(mfem::real_t &dt)
Problem operator for time-dependent problems with no equation system.
virtual void SetGridFunctions() override
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
Moose::MFEM::TimeDerivativeMap time_derivative_map
Moose::MFEM::CoefficientManager coefficients
std::unique_ptr< mfem::ODESolver > ode_solver
Moose::MFEM::GridFunctions gridfunctions