12 #ifndef MFEM_MULTIGRID
13 #define MFEM_MULTIGRID
18 #include "../linalg/operator.hpp"
19 #include "../linalg/handle.hpp"
47 int preSmoothingSteps;
48 int postSmoothingSteps;
94 int postSmoothingSteps_);
111 void SmoothingStep(
int level,
bool transpose)
const;
114 void Cycle(
int level)
const;
Array< BilinearForm * > bfs
Multigrid(const FiniteElementSpaceHierarchy &fespaces_)
Constructs an empty multigrid for the given FiniteElementSpaceHierarchy.
Pointer to an Operator of a specified type.
const FiniteElementSpaceHierarchy & fespaces
void FormFineLinearSystem(Vector &x, Vector &b, OperatorHandle &A, Vector &X, Vector &B)
Form the linear system A X = B, corresponding to the operator on the finest level.
virtual void SetOperator(const Operator &op) override
Not supported for multigrid.
virtual ~Multigrid()
Destructor.
void AddLevel(Operator *opr, Solver *smoother, bool ownOperator, bool ownSmoother)
Adds a level to the multigrid operator hierarchy.
Solver * GetSmootherAtLevel(int level) const
Returns smoother at given level.
const Operator * GetOperatorAtFinestLevel() const
Returns operator at finest level.
virtual void Mult(const Vector &x, Vector &y) const override
Application of the multigrid as a preconditioner.
int GetFinestLevelIndex() const
Returns the index of the finest level.
Array< Array< int > * > essentialTrueDofs
int NumLevels() const
Returns the number of levels.
const Operator * GetOperatorAtLevel(int level) const
Returns operator at given level.
void RecoverFineFEMSolution(const Vector &X, const Vector &b, Vector &x)
Recover the solution of a linear system formed with FormFineLinearSystem()
void SetCycleType(CycleType cycleType_, int preSmoothingSteps_, int postSmoothingSteps_)
Set the cycle type and number of pre- and post-smoothing steps used by Mult.