106 int postSmoothingSteps_);
116 MFEM_ABORT(
"SetOperator is not supported in Multigrid!");
121 void Cycle(
int level)
const;
124 void SmoothingStep(
int level,
bool zero,
bool transpose)
const;
127 void InitVectors()
const;
128 void EraseVectors()
const;
131 virtual const Operator* GetProlongationAtLevel(
int level)
const = 0;
158 virtual const Operator* GetProlongationAtLevel(
int level)
const override
Dynamic 2D array using row-major layout.
Geometric multigrid associated with a hierarchy of finite element spaces.
MFEM_DEPRECATED GeometricMultigrid(const FiniteElementSpaceHierarchy &fespaces_)
Deprecated.
void RecoverFineFEMSolution(const Vector &X, const Vector &b, Vector &x)
Recover the solution of a linear system formed with FormFineLinearSystem()
Array< Array< int > * > essentialTrueDofs
Array< BilinearForm * > bfs
const FiniteElementSpaceHierarchy & fespaces
void FormFineLinearSystem(Vector &x, Vector &b, OperatorHandle &A, Vector &X, Vector &B)
virtual ~GeometricMultigrid()
Destructor.
Abstract base class for Multigrid solvers.
virtual void ArrayMult(const Array< const Vector * > &X_, Array< Vector * > &Y_) const override
Operator application on a matrix: Y=A(X).
Solver * GetSmootherAtLevel(int level)
int GetFinestLevelIndex() const
Returns the index of the finest level.
int NumLevels() const
Returns the number of levels.
virtual ~MultigridBase()
Destructor.
Array< Operator * > operators
Array< bool > ownedSmoothers
const Operator * GetOperatorAtLevel(int level) const
Returns operator at given level.
Array< bool > ownedOperators
virtual void SetOperator(const Operator &op) override
Not supported for multigrid.
void AddLevel(Operator *op, Solver *smoother, bool ownOperator, bool ownSmoother)
Adds a level to the multigrid operator hierarchy.
Array< Solver * > smoothers
MultigridBase()
Constructs an empty multigrid hierarchy.
virtual void Mult(const Vector &x, Vector &y) const override
Application of the multigrid as a preconditioner.
const Solver * GetSmootherAtLevel(int level) const
Returns smoother at given level.
void SetCycleType(CycleType cycleType_, int preSmoothingSteps_, int postSmoothingSteps_)
Set cycle type and number of pre- and post-smoothing steps used by Mult.
const Operator * GetOperatorAtFinestLevel() const
Returns operator at finest level.
Operator * GetOperatorAtLevel(int level)
Operator * GetOperatorAtFinestLevel()
Multigrid()=default
Constructs an empty multigrid hierarchy.
Array< bool > ownedProlongations
Array< Operator * > prolongations
virtual ~Multigrid()
Destructor.
Pointer to an Operator of a specified type.