10 #ifdef MOOSE_MFEM_ENABLED 21 params.
addParam<std::string>(
"device",
"Run app on the chosen device.");
22 params.
addParam<
bool>(
"gpu_aware_mpi",
false,
"Use GPU-aware MPI.");
23 MooseEnum assembly_levels(
"legacy full element partial none",
"legacy",
true);
24 params.
addParam<
MooseEnum>(
"assembly_level", assembly_levels,
"Matrix assembly level.");
30 std::vector<std::shared_ptr<Moose::MFEM::ProblemOperatorBase>> & problem_operators)
32 _mfem_problem(dynamic_cast<
MFEMProblem &>(_problem)),
33 _problem_operators(problem_operators)
42 getParam<bool>(
"gpu_aware_mpi"),
52 problem_operator->Solve();
60 if (
auto * prec = solver->GetPreconditioner())
61 prec->ConstructSolver();
62 solver->ConstructSolver();
67 problem_operator->SetGridFunctions();
71 problem_operator->Solve();
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
MFEMProblemData & getProblemData()
Method to get the current MFEMProblemData object storing the current data specifying the FE problem...
std::vector< std::shared_ptr< Moose::MFEM::ProblemOperatorBase > > & _problem_operators
virtual bool solve() override
Solve routine provided by this object.
std::shared_ptr< Moose::MFEM::LinearSolverBase > jacobian_solver
void displaceMesh()
Displace the mesh, if mesh displacement is enabled.
bool hRefine()
If AMR is enabled, request (and perform if needed) h-refinement.
std::optional< MooseEnum > getComputeDevice() const
Get the device accelerated computations are supposed to be running on.
MFEMProblem & _mfem_problem
void setMFEMDevice(const std::string &device_string, bool gpu_aware_mpi, Moose::PassKey< MFEMProblemSolve >)
Create/configure the MFEM device with the provided device_string.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Executioners are objects that do the actual work of solving your problem.
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
MFEMProblemSolve(Executioner &ex, std::vector< std::shared_ptr< Moose::MFEM::ProblemOperatorBase >> &problem_operators)
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool pRefine()
If AMR is enabled, request (and perform if needed) p-refinement.