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.
--
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/2e41b89a-cda8-445b-aa8b-1b44852a1fda%40colostate.edu.