10#ifdef MOOSE_MFEM_ENABLED
27 params.
addParam<Real>(
"time", 0.0,
"System time");
33 _mfem_problem(dynamic_cast<
MFEMProblem &>(feProblem())),
34 _mfem_problem_data(_mfem_problem.getProblemData()),
35 _mfem_problem_solve(*this, getProblemOperators()),
36 _system_time(getParam<Real>(
"time")),
37 _time_step(_mfem_problem.timeStep()),
39 _last_solve_converged(
false)
42 if (getProblemOperators().empty())
48 _mfem_problem_data.eqn_system = std::make_shared<Moose::MFEM::EigenproblemEquationSystem>();
49 auto problem_operator =
50 std::make_shared<Moose::MFEM::EigenproblemESProblemOperator>(_mfem_problem);
51 addProblemOperator(std::move(problem_operator));
55 _mfem_problem_data.eqn_system = std::make_shared<Moose::MFEM::EquationSystem>();
56 auto problem_operator =
57 std::make_shared<Moose::MFEM::EquationSystemProblemOperator>(_mfem_problem);
58 addProblemOperator(std::move(problem_operator));
63 _mfem_problem_data.eqn_system = std::make_shared<Moose::MFEM::ComplexEquationSystem>();
64 auto problem_operator =
65 std::make_shared<Moose::MFEM::ComplexEquationSystemProblemOperator>(_mfem_problem);
66 addProblemOperator(std::move(problem_operator));
70 "Please set the Problem numeric type to either 'real' or 'complex'.");
90 getParam<MooseEnum>(
"assembly_level").getEnum<mfem::AssemblyLevel>());
94 problem_operator->SetGridFunctions();
104 _console <<
"\nCannot recover steady solves!\nExiting...\n" << std::endl;
142 TIME_SECTION(
"final", 1,
"Executing Final Objects")
registerMooseObject("MooseApp", MFEMSteady)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const ExecFlagType EXEC_PRE_MULTIAPP_SETUP
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_INITIAL
const ExecFlagType EXEC_FINAL
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Executioners are objects that do the actual work of solving your problem.
static InputParameters validParams()
virtual void preExecute()
Override this for actions that should take place before execution.
virtual void postExecute()
Override this for actions that should take place after execution.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep.
virtual void postExecute()
Method called at the end of the simulation.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
void timestepSetup() override
virtual void computeIndicators()
virtual Real & time() const
virtual void computeMarkers()
virtual void outputStep(ExecFlagType type)
Output the current step.
virtual bool solve() override
Solve routine provided by this object.
static InputParameters validParams()
virtual void execute(const ExecFlagType &exec_type) override
Convenience function for performing execution of MOOSE systems.
virtual void initialSetup() override
MFEMSteady(const InputParameters ¶ms)
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
MFEMProblemSolve _mfem_problem_solve
MFEMProblemData & _mfem_problem_data
bool _last_solve_converged
Flag showing if the last solve converged.
static InputParameters validParams()
MFEMProblem & _mfem_problem
virtual void init() override
Initialize the executioner.
bool isRecovering() const
Whether or not this is a "recover" calculation.
MooseApp & _app
The MOOSE application this is associated with.
virtual std::vector< std::shared_ptr< ProblemOperatorBase > > & getProblemOperators()
Returns a pointer to the operator's equation system.
std::shared_ptr< Moose::MFEM::EquationSystem > eqn_system
Moose::MFEM::CoefficientManager coefficients
Moose::MFEM::ComplexGridFunctions cmplx_gridfunctions
mfem::BlockVector true_solution
Persistent true-DoF solution vector backing trial grid functions after problem operator init.
std::shared_ptr< Moose::MFEM::NonlinearSolverBase > nonlinear_solver
Moose::MFEM::GridFunctions gridfunctions