Ensembles / ert

Ert has been split into three repositories, libecl, libres, and ert, and now lives at Equinor's GitHub organization — https://github.com/equinor/libecl | https://github.com/equinor/libres | https://github.com/equinor/ert
https://github.com/equinor/ert
GNU General Public License v3.0
31 stars 52 forks source link

Eclipse point containment for concave cells #1456

Closed markusdregi closed 7 years ago

markusdregi commented 7 years ago

The work of this PR is twofold. First, we develop a synthetic grid generator that can create much more evil grids then the current EclGrid.createRectangular. Among others, one can create grids with:

We also reimplemented the containment test to handle concave cells and the generator described above is used to test this new code. The point containment test is now done as follows:

joakim-hove commented 7 years ago

The volume of an Eclipse grid cell can be approximated in the following manner

ehhh yes - but why? I don't really understand the purpose of this PR?

markusdregi commented 7 years ago

Ah, maybe I was not clear enough. The main purpose is to ensure that the computation of cell volume and point containment is consistent. Hence, the added tests that approximates the volume via the point containment.

The tests fails for non-convex cells and hence this should be fixed. Right now, it also fails for trapezoidal cells, i.e. layers that looks like waves. But this will be ok when the cell_contains_faces branch is merged.

joakim-hove commented 7 years ago

Ah, maybe I was not clear enough. The main purpose is to ensure that the computation of cell volume and point containment is consistent.

OK - but is that even a goal; or realistic - for cells where some of the tetrahedrons contribute with negative volume?

pgdr commented 7 years ago

ensure that the computation of cell volume and point containment is consistent.

OK - but is that even a goal;

Obviously yes!

or realistic - for cells where some of the tetrahedrons contribute with negative volume?

Some tetrahedrons might contribute negatively, but a cell should never have a negative volume, and thus if we compute cell volumes and cell containments based on cells it sounds realistic.

joakim-hove commented 7 years ago

OK - this looks good (or frankly - I am not really up to reviewing it). My only wish is that new - quite advanved - functionality for creating grids be split into a separate fully static class - e.g. GridGenerator.

markusdregi commented 7 years ago

@joakim-hove There is now an EclGridGenerator.