Multigrid Preconditioner for HDG

39 views
Skip to first unread message

Aditya Karthik Saravanakumar

unread,
May 4, 2023, 9:26:05 PM5/4/23
to deal.II User Group
Hello everyone,

I've been trying to set up a geometric multigrid preconditioner (following step 16) for an HDG Poisson solver. I was able to set up all the MGLevelObjects but the MGTransferPrebuilt class isn't able to generate the prolongation matrices. 

Has anyone been successful in implementing a geometric multigrid preconditioner for an HDG solver? How would one go about building the transfer operations for the HDG finite element space?

Some relevant papers:
2. Lu 2021              - https://doi.org/10.1093/imanum/drab055

Wolfgang Bangerth

unread,
May 4, 2023, 10:44:23 PM5/4/23
to dea...@googlegroups.com
On 5/4/23 19:26, Aditya Karthik Saravanakumar wrote:
> I was able to set up all the MGLevelObjects but the MGTransferPrebuilt class
> isn't able to generate the prolongation matrices.

Aditya,
I don't know enough about multigrid to help, but you might get better answers
if you are specific about how your code looks and what actually happens.
Saying "isn't able to" is too non-specific for anyone to venture a guess what
the problem might be.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Aditya Karthik Saravanakumar

unread,
May 4, 2023, 11:31:07 PM5/4/23
to deal.II User Group
That's fair. To be more specific, I'm essentially trying to incorporate the multigrid code from step 16 into an HDG solver that's very similar to step 51. 

My code fails when I try to call the build(DoFHandler<dim>) function on my MGTransferPrebuilt object as shown below
(similar to what's done in the void LaplaceProblem<dim>::solve() function in step 16)

MGTransferPrebuilt<Vector,double>> mg_transfer(mg_constrained_dofs);
mg_transfer.build(this->dofh_uhat);

Note: dofh_uhat is a DoFHandler<dim> object corresponding to the FE_FaceQ<dim,spacedim> finite element space. 

ERROR MESSAGE
An error occurred in line <374> of file </home/--------/software/dealii-9.4.0/source/fe/fe.cc> in function
    const dealii::FullMatrix<double>& dealii::FiniteElement<<anonymous>, <anonymous> >::get_prolongation_matrix(unsigned int, const dealii::RefinementCase<dim>&) const [with int dim = 2; int spacedim = 2]
The violated condition was:
    prolongation[refinement_case - 1][child].n() == this->n_dofs_per_cell()
Additional information:
    You are trying to access the matrices that describe how to embed a
    finite element function on one cell into the finite element space on
    one of its children (i.e., the 'embedding' or 'prolongation'
    matrices). However, the current finite element can either not define
    this sort of operation, or it has not yet been implemented.

Stacktrace:
-----------
#0  /home/--------/software/dealii_current_build/lib/libdeal_II.g.so.9.4.0: dealii::FiniteElement<2, 2>::get_prolongation_matrix(unsigned int, dealii::RefinementCase<2> const&) const
#1  /home/--------/software/dealii_current_build/lib/libdeal_II.g.so.9.4.0: void dealii::MGTransferPrebuilt<dealii::Vector<double> >::build<2, 2>(dealii::DoFHandler<2, 2> const&)

Wolfgang Bangerth

unread,
May 4, 2023, 11:47:51 PM5/4/23
to dea...@googlegroups.com
On 5/4/23 21:31, Aditya Karthik Saravanakumar wrote:
>
> Note: dofh_uhat is a DoFHandler<dim> object corresponding to the
> FE_FaceQ<dim,spacedim> finite element space.
>
> _ERROR MESSAGE_
> An error occurred in line <374> of file
> </home/--------/software/dealii-9.4.0/source/fe/fe.cc> in function
>     const dealii::FullMatrix<double>& dealii::FiniteElement<<anonymous>,
> <anonymous> >::get_prolongation_matrix(unsigned int, const
> dealii::RefinementCase<dim>&) const [with int dim = 2; int spacedim = 2]
> The violated condition was:
>     prolongation[refinement_case - 1][child].n() == this->n_dofs_per_cell()
> Additional information:
>     You are trying to access the matrices that describe how to embed a
>     finite element function on one cell into the finite element space on
>     one of its children (i.e., the 'embedding' or 'prolongation'
>     matrices). However, the current finite element can either not define
>     this sort of operation, or it has not yet been implemented.

Ah yes. But this is of course not the fault of the multigrid implementation,
but rather that the element in question doesn't define these matrices.

So here's the underlying question: FE_FaceQ defines shape functions that only
live on the faces of the cell. If you want to interpolate ("prolong") the
solution from one mesh to a finer mesh, how are you going to define the
solution on the new edges that are created in the interior of the cell?

When we wrote the element, we simply didn't know the answer to this question,
and I still don't. What do the papers you reference use for this operation?
Reply all
Reply to author
Forward
0 new messages