fdrmrc / Polydeal

C++ implementation of Polygonal Discontinuous Galerkin method within the deal.II Finite Element library.
https://fdrmrc.github.io/Polydeal/
Other
0 stars 0 forks source link

Fix `reinit(cell,agglo_face)` #25

Closed fdrmrc closed 2 years ago

fdrmrc commented 2 years ago

This PR fixes the following problem: when we construct an FEIsv, then weights are scaled according to the mappingFEField we submit, which is constructed starting from the bounding box of the agglomeration. Hence, we have to scale them back by a factor of $det(J) J^{-T} n$ for each quadrature point.

While $det(J)$ and $n$ are already known, $J^{-T}$ is not directly available before the construction of the FEIsv and the easiest way to reinit properly is:

This is not nice, but it works.

A test checking that $\int_{ \partial A} ds = |\partial A|$ where $A$ is an agglomeration has been added. This simply sums all the JxWs returned by a call of our reinit(cell,face) for every face of an agglomeration.

https://github.com/fdrmrc/AggloDeal/blob/9407a5508a47be4c025841ce7eabba4108e078d0/test/agglomeration/reinit_cell_face.cc#L92-L95

fdrmrc commented 2 years ago

Superseded by #26. The issue described above can be fixed by using the fact that the Jacobian is diagonal.