How can I add curl conforming boundary constraints to the Multigrid transfer matrices?

65 views
Skip to first unread message

Julian Roth

unread,
May 18, 2020, 6:11:34 AM5/18/20
to deal.II User Group
Dear all,

I was trying to solve the Eddy Current Problem with Multigrid.
I have curl-conforming boundary constraints, i.e. n x u = 0.

I managed to apply these to the system matrix via
VectorTools::project_boundary_values_curl_conforming_l2()
Unlike step-16 where the same approach has been demonstrated for the LaplaceProblem, I didn't find any method,
which allows me to apply the before mentioned boundary constraints to the MGConstrainedDoFs object.
Thus I computed the curl conforming constraints in assemble_multigrid, when I instantiated the boundary_constraints on each level.
The matrix on the finest grid is the same as the system matrix, which means that my workaround should have worked.

How can I apply my boundary constraints to the transfer matrices between the level meshes, if they are not contained in MGConstrainedDoFs?

Currently I am still using:
MGTransferPrebuilt<VectorType> mg_transfer(mg_constrained_dofs);
mg_transfer
.build_matrices(dof_handler);

Obviously this isn't correct though, since the boundary constraints haven't been accounted for.
How can I add curl conforming boundary constraints to the transfer matrices?

Is there any other way that I can deal with the curl conforming boundary conditions, when I am working with Multigrid?

Kind regards,

Julian


P.S. Note that my Multigrid approach is not MatrixFree. Thus I don't think that I can use

MGConstrainedDoFs.add_user_constraints()

since this only applies to MatrixFree methods.

Timo Heister

unread,
May 20, 2020, 3:30:48 PM5/20/20
to deal.II User Group
Hi Julian,

you will need to extend MGTransferPrebuilt::prolongate with support for user constraints:

This might be as simple as a call to
  get_user_constraint_matrix(...).distribute(vector)

Can you try and report back?

Julian Roth

unread,
May 20, 2020, 6:52:06 PM5/20/20
to deal.II User Group
Hi Timo,

I tried your proposed solution and it looks like the iteration numbers of GMG are similar to what one would expect from the literature.
I will do a more in depth analysis of the results tomorrow, but so far the results look very promising.

Thank you very much!

Julian Roth

unread,
May 21, 2020, 5:51:16 AM5/21/20
to deal.II User Group
Hi TImo,

overall I am very happy with the results and I am quite confident that with your advice my Multigrid algorithm now works for the Eddy Current problem.
THANK YOU!

Timo Heister

unread,
May 22, 2020, 10:53:05 PM5/22/20
to deal.II User Group
Great, can I convince you to send in a pull request with your changes to deal.II? That would be very much appreciated.
Let us know if you need help with that.

Julian Roth

unread,
May 23, 2020, 3:07:48 PM5/23/20
to deal.II User Group
Yes, I will do that and let you know, if I have problems with that

Julian Roth

unread,
May 24, 2020, 2:43:43 PM5/24/20
to deal.II User Group
I created a pull request. However, I don't understand why the Travis CI check fails...

On Saturday, May 23, 2020 at 4:53:05 AM UTC+2, Timo Heister wrote:
Reply all
Reply to author
Forward
0 new messages