This is a demonstration of using the
GridPropertyAccess::Compressed<>
class template. We save (some) memory by not creating the zero
fall-back vector in assignPermeability(), preferring instead to use
the fall-back/default mechanism of ArrayPolicy::ExtractFromDeck<>.
While here, adjust vector<PermComponent>::reserve() capacity to
reflect actual requirements.
Clients expect column-major (Fortran) ordering of the contiguous
"permeability_" array so that's what we create despite "tensor"
being row-major.
Suggested by: [at] atgeirr
This commit switches the assignment
diagonal = max(diagonal, minval)
to using a reference in the "diagonal" expression. This guarantees
that the indexing is done once which eases maintainability. While
here, replace the hard-coded dimension stride ('3') with the current
run-time dimension. This is mostly for symmetry because the overall
code is only really supported in three space dimension.
Calling code relies on permeability tensors being stored in column
major order (row index cycling the most rapidly). Honour that
requirement. The previous assignment implied row major ordering
(column index cycling the most rapidly). This, however, is a
pedantic rather than visible change because the surrounding code
enforces symmetric tensors whence both orderings produce the same
results when the array is viewed contiguously.
For constant capillar pressure function the saturation is
determined by cell depths:
Sg_max, Sw_min
----- goc ----
Sg_min, Sw_min
----- woc ----
Sg_min, Sw_max
This commit removes several instances of EOL whitespace in function
'swatInitScaling()'. Aesthetic only. No functional changes.
Suggested by: [at] atgeirr
The constant 1.0e-8 was used as a threshold to distinguish "low"
from "high" capillary pressure values. Introduce acutual constant
"pc_low_threshold" to clarify that role.
Suggested by: [at] atgeirr
This commit renames the 'np' parameter used to allocate small arrays
for saturations and capillary pressures to 'max_np' to better
reflect its purpose.
Suggested by: [at] atgeirr
New function well_controls_clone(), implemented in terms of the
public API only, mirrors the objective of function clone_wells(),
only for well control sets. Add a basic test to demonstrate the
function too.
The 'cpty' field is for internal memory management purposes only.
No client can know of its existence, let alone inspect or directly
change the value, so it should not be used to adjudicate control set
equality. This was useful during the refactoring work to introduce
the opm-parser support, but its utility has since ceased.
Okay'ed by: [at] atgeirr and [at] joakim-hove
Current version executes reordered solve once for each tracer. The benefit
is a simpler code and the ability to use MDU with tracers. The cost is
potentially higher runtime, compared to doing a single sweep for all
tracers (and tof).
When this boolean parameter is true (the default), tracer solutions
will be normalized so that the tracer averages will sum to one in each cell.
This behaviour is the same as before, the change is that it can now be
turned off.