Skip to content

Fix surfaces lying in x-y-plane

Lars Bilke requested to merge github/fork/chleh/fix-surface-in-x-y-plane into master

Created by: chleh

In our shape matrix computation routines there was some code detecting the special case when a 2D element lies in the x-y plane. This code led to Neumann BCs being added sign-flipped if the surface at which it was applied was in the x-y-plane with surface normal (0, 0, -1).

This PR fixes the special cases in the code. A small end-to-end test example has been added. Cf. image: Groundwaterflow process; upper row before the PR, lower row after the PR; one surface is kept at Dirichlet 1, the other has Neumann 1, i.e., the point at which the Neumann BC is applied must be the maximum over the entire z-axis; that did not always hold before this PR (upper right case).

fixed-surface-orientation

Furthermore the det J > 0 check has been made strict in this PR. I.e., elements with zero volume or wrong orientation are disallowed now.

Merge request reports