Geometric multigrid with Galerkin triple product #4234
-
Hi, I'm currently trying to implement an algorithm that is in some sense equivalent to geometric multigrid in PETSc and now I'd like to use mfem to build the grid hierarchy and prolongation/restriction operators etc. I followed ex26 to first implement a grid/operator hierarchy where the operators on each level are constructed by building new bilinear forms and rediscretising. That worked but now I'd like to instead construct the coarse operator by Galerkin projection, so A_coarse = P^T * A_fine * P, where P is the prolongation operator. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
This functionality is called For example, we have I suspect your inputs are |
Beta Was this translation helpful? Give feedback.
ParFiniteElementSpace::GetProlongationMatrix()
is the wrong prolongation matrix. The prolongation you want isFiniteElementSpaceHierarchy::GetProlongationAtLevel(int level)
. However, this is a matrix-free version and it is not easy to convert to aPetscParMatrix
. To get the prolongation matrix as aHypreParMatrix
, you can use the methodParFiniteElementSpace::GetTrueTransferOperator
where you need to set the type of the second argument toOperator::Hypre_ParCSR
, e.g. something like this: