GEOS-DEV / GEOS-DEV/GEOS

Null-area face aborts the run on valid corner-point pinch-outs (regression from #3977)

Open
#4,135 2 comments 0 reactions 1 assignee View on GitHub

@jafranc is already working on this.

Since Sep 2, 2026.

Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

Description

centroid_3DPolygon() in ComputationalGeometry.hpp calls GEOS_ERROR when a polygon has zero area. This aborts the run on corner-point meshes that contain pinch-outs. A pinch-out is ordinary reservoir geology, not a defect in the mesh.

Regression

Before #3977 (01a4f15b2e, "Change to local Newell's normal") the branch returned zero:

if( area > areaTolerance )       { /* normalize */ }
else if( area < -areaTolerance ) { GEOS_ERROR( "Negative area found" ); }
else                             { return 0.0; }

#3977 replaced that return 0.0 with GEOS_ERROR( "Null area found" ). The return 0.0 looks deliberate: a zero-area face gives zero transmissibility, which is the physically correct outcome, because no flow crosses a face of zero area. #3977 was about Newell normals, so the change to the tolerance branch appears incidental.

Concrete case

A corner-point mesh of 1761 hexahedra, converted from a standard Eclipse-style deck. Eight consecutive cells each have one vertical edge of zero length, while the other three measure 3.9 to 4.7 m. One lateral face of each cell collapses to a triangle.

The cells are valid and active: non-zero volume, and porosity between 0.05 and 0.14. The mesh holds 8 degenerate faces among several thousand.

On current develop this mesh cannot be run at all. The first degenerate face aborts initialization.

Suggested fix

Change GEOS_ERROR to GEOS_WARNING in the null-area branch and keep return 0.0. This restores the pre-#3977 behavior and keeps the diagnostic that #3977 added. The negative-area branch should stay a GEOS_ERROR, because a negative area does signal a real defect.

A stricter alternative would be an input flag that lets the user choose between abort and warn, with warn as the default for corner-point meshes.

Impact

With the warning, two such decks run to completion and reproduce our reference results bit for bit over 500 simulated years. Each reports 16 warnings, from the 8 degenerate faces.

Environment

GEOS develop at 24a8410b51, gcc 13.3.0, VTK 9.4.2, serial run.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.