Locally divergence free DG basis

43 views
Skip to first unread message

Florian Schulze

unread,
Mar 13, 2025, 12:57:03β€―PMMar 13
to deal.II User Group

Dear all,

I am trying to solve the magnetohydrodynamics (MHD) equations using the discontinuous Galerkin method with deal.II.
Currently, I face the problem of the divergence free condition of the magnetic field, βˆ‡β‹…π = 0.
One of the ways I want to address this problem is using locally divergence free elements,
i.e. an FE basis π›Ÿ(𝐱) that fulfils βˆ‡β‹…π›Ÿ(𝐱) = 0 on the cell.
(Face jumps of the normal component can still introduce divergence globally - I plan to use different methods to deal with that.)

I found that this topic was already discussed in the forum before:

But I don’t see that it made it into deal.II.
Am I missing something? Does deal.II have a divergence free FE basis?
Or does someone already have/know of an implementation?

If not, what would be the best way to go about implementing it?
After a short look in the documentation, seems like implementing a new TensorPolynomial and using with in the FE_DGVector is a possibility?

Thanks for your help!

Best,
Florian Schulze

Wolfgang Bangerth

unread,
Mar 13, 2025, 8:22:47β€―PMMar 13
to dea...@googlegroups.com


On 3/13/25 06:55, Florian Schulze wrote:
> I am trying to solve the magnetohydrodynamics (MHD) equations using the
> discontinuous Galerkin method with deal.II.
> Currently, I face the problem of the divergence free condition of the
> magnetic field, βˆ‡β‹…π = 0.
> One of the ways I want to address this problem is using locally
> divergence free elements,
> i.e. an FE basis π›Ÿ(𝐱) that fulfils βˆ‡β‹…π›Ÿ(𝐱) = 0 on the cell.
> (Face jumps of the normal component can still introduce divergence
> globally - I plan to use different methods to deal with that.)
>
> I found that this topic was already discussed in the forum before:
>
> * Locally divergence free FE space <https://groups.google.com/g/
> dealii/c/uGY2ltkMJ-E/m/6KzZm1u6l-EJ>
> * Custom shapeset questions <https://groups.google.com/g/dealii/c/
> NDiUu3qESOM/m/magIbF_FCQAJ>
>
> But I don’t see that it made it into deal.II.
> Am I missing something? Does deal.II have a divergence free FE basis?
> Or does someone already have/know of an implementation?
>
> If not, what would be the best way to go about implementing it?
> After a short look in the documentation, seems like implementing a new
> TensorPolynomial <https://www.dealii.org/current/doxygen/deal.II/
> classTensorPolynomialsBase.html> and using with in the FE_DGVector
> <https://www.dealii.org/current/doxygen/deal.II/classFE__DGVector.html>
> is a possibility?

Florian,
none of the previous work was ever proposed for integration into
deal.II, so there are no examples. But in general, implementing finite
elements is not "terribly" difficult as it is quite a localized problem:
You really only have to understand how the FiniteElement class works and
its interface. The biggest challenge is perhaps to understand the many
intermediate classes we have come up with over the years that abstract
the problem to one where you provide a class that describes the
polynomials and then everything else works automatically.

If your element is indeed discontinuous, then you are right that
FE_DGVector is the right starting point. In that case, you also don't
have to worry about one of the more labor-intensive parts, namely
dealing with hanging node constraints.

Obviously, we'd be excited to integrate whatever you come up with.
Please do ask questions if you get stuck!

Best
W.

Florian Schulze

unread,
Mar 17, 2025, 9:22:24β€―AMMar 17
to dea...@googlegroups.com

Thank you, Wolfgang,

I'll have a look and try my luck implementing them. If I am successful I'm happy to share my results :)

Best,
Florian

-- 
Florian Schulze

PhD Student
Max-Planck-Institut fΓΌr Kernphysik
Saupfercheckweg 1
69117 Heidelberg

Tel.: +49 6221 516-591

Wolfgang Bangerth

unread,
Mar 22, 2025, 11:11:03β€―PM (10 days ago) Mar 22
to dea...@googlegroups.com
On 3/17/25 03:21, Florian Schulze wrote:
>
> I'll have a look and try my luck implementing them. If I am successful I'm
> happy to share my results :)

Please do! And please also feel free to ask if you have questions!
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages