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

On 13.03.25 21:22, Wolfgang Bangerth wrote:


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

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

Tel.: +49 6221 516-591

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/0ec01e1b-76c1-4160-b27f-a67812cdf24a%40mpi-hd.mpg.de.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to