https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMGMRESSolver.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 MOOSE_MFEM_ENABLED
11
12#pragma once
13
15
19class MFEMGMRESSolver : public Moose::MFEM::LORLinearSolverBase<mfem::GMRESSolver>
20{
21public:
23
25
26 void ConstructSolver() override;
27
28protected:
30 virtual void SetSolverParameters(mfem::GMRESSolver & solver) override;
31
32 virtual void SetPreconditionerImpl() override
33 {
34 cast_ref<mfem::GMRESSolver &>(GetSolver()).SetPreconditioner(_preconditioner->GetSolver());
35 }
36};
37
38#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Wrapper for mfem::GMRESSolver.
virtual void SetPreconditionerImpl() override
Override in solvers that accept a preconditioner.
void ConstructSolver() override
Override in derived classes to construct and set the solver options.
static InputParameters validParams()
virtual void SetSolverParameters(mfem::GMRESSolver &solver) override
Update the wrapped MFEM solver parameters.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Base class for LOR compatible linear MFEM solvers and preconditioners.
std::shared_ptr< LinearSolverBase > _preconditioner
Preconditioner to be used for the problem.
mfem::Solver & GetSolver()
Returns the wrapped MFEM solver.