since we forcefully make numerical aquifer cells active. If a connection
cells is neighboring a numerical aquifer cell, we should be able to create
NNC to connection the cell and the nuermical aquifer cell.
This commit replaces the data members 'nx', 'ny', and 'nz' with a
copy of the GridDims object passed as an argument to the
constructor. In turn, this enables using GridDims::getIJK() to
compute the cell's IJK tuple from its global Cartesian index instead
of implementing the same calculation locally (and incorrectly).
While here, also include the layer index (K) in determining whether
or not a connection is an NNC, and do this just once instead of once
for each MULTREGT record. Cells (I,J,K) and (I,J,K+3) might be
connected across pinched-out layers and for the purposes of MULTREGT
that connection should be treated as an NNC.
In particular, ensure that we include all requisite headers, hide
type aliases that are not needed outside the class, consistently use
std::size_t, split a few long lines, and switch to range-for in one
location.
A numeric index serves the same purpose as a pointer in this very
specific instance and also has the benefit of being easily
transferable between processes. This, in turn, means we can remove
the 'getSearchMap()' and 'constructSearchMap()' member functions.
We use log10 of the value to compute the scale factor. This only makes
sense for positive values. For zero it returns -HUGE_VAL and for
negative values it returns nan where supported.
Unfortunately on some platforms (e.g. mips64el) further operations in
nan resulted in values so large that the scale factors were to large
for the columns. This resulted in invalid_argument exceptions in
strtod which were hard to debug. Out of pure luck on many platforms
the scale factors still were zero in this case.
To fix this we now always use a scale factor 0 for values less or
equal to zero. This fixes e.g. Debian packages on mips64el.
In addition we now make sure that printed scale factors have less
characters than the column width. Otherwise parsing the *.RSM file
might fail because of throwing strtod function.