RepairZCORN.hpp File Reference
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <exception>
#include <iterator>
#include <numeric>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for RepairZCORN.hpp:

Go to the source code of this file.

Detailed Description

Facility for ensuring that the ZCORN vector (corner-point depth) of an ECLIPSE corner-point description meets certain consistency requirements.

In particular, the ZCORN values should represent depth and therefore not decrease along pillars. Moreover, any cell's top corners should not be below that cell's bottom corner on the same pillar and no cell's bottom corner should be below that cell's lower neighbour's upper corner on the same pillar.

The final two conditions may for instance occur as a result of round-off when gridding software outputs ZCORN as float values while using double values internally.

This code will fail if all cells not explicitly deactivated in the input model are twisted, meaning that every such cell have at least one pillar for which ZCORN increases over the cell and at least one pillar for which ZCORN decreases. This is hopefully a pathological case that does not occur in real input decks.