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 normals in parallel #83

Closed fdrmrc closed 9 months ago

fdrmrc commented 9 months ago

Depends on #82, only commit 4e18563ccbd9a5b99ed44ad81e466d118d2b24db is relevant.

This PR fixes the following problem: in the distributed setting, we send normals from rank $1$ to rank $0$ in order to be able, from rank $0$, to call reinit(K0,f). If we sit on rank $0$, the sign of the normal vectors that we have received from $1$ must be swapped in order to be outward unit normals from $K_0$.

- - - - - - - - - - - - - -
|            |            |
|       K0   |     K1     |
- - - - - - - - - - - - - -

I've added a test that checks we can catch exactly the linear solution $u=x+y$ in the distributed case, which exposed the bug before this PR.