This commit extracts the internal helpers of class
InterRegFlowMap
out to a new public helper class template, CSRGraphFromCoordinates.
Client code can, at the expense of one additional data member and
some dynamic memory, elect to track the index pairs. This enables
O(1) assembly per element when used as part of a CSR matrix with a
value array, SA.
Class CSRGraphFromCoordinates does not track values. It is purely
for the sake of forming the IA and JA structure arrays. Upon
calling 'compress()', column indices are sorted per row and
duplicate column indices condensed to a single, unique,
representative.
The existing algorithm was a little too fragile and dependent on
branch numbers. This new version starts at segment 1/branch 1 and
follows Segment::inletSegments() in depth-first order, taking care
to enqueue new branches as they're encountered instead of in
numerical order. We search to the end of each branch before
switching to the next branch. This ensures determinism regardless
of branch numbering and input ordering.
While here, switch iLBR_ to a WindowedMatrix<int> to simplify branch
references in the output table.
This is in preparation of revising the algorithm for ILBR/ILBS.
Mostly splitting long lines, adding missing headers, passing scalars
by value, and making three helper structures private to the
implementation file. There are no external users of these types.
This commit adds the requisite backing storage and parser support
for capturing and transporting simulator-level calculation of phase
and mixture density value for purpose of summary file output. To
this end, make 'SegmentQuantity' into a template on a set of defined
items and make SegmentPhaseQuantity into a specialisation of this
template. Add a new specialisation, SegmentPhaseDensity, which
holds phase densities (oil, gas, water), and fluid mixture densities
with and without flowing fraction exponents.
These will be used to transport the values needed to output segment
level summary vectors
SDENx -- Phase density of phase 'x' (O, G, W)
SDENM -- Fluid mixture density without flowing fraction exponents
SMDEN -- Fluid mixture density with flowing fraction exponents
In particular
* Tag a single argument constructor as 'explicit',
* Remove an unused private function
* Fix mismatched tags (struct vs. class) in forward declaration
* Return 'false' in an impossible updateHyst() case
While here, also use a real UnitSystem object instead of creating
a METRIC system just to infer unit strings.
This initial commit changes the Summary class's API for consuming
block-averaged well level pressure values (summary keywords WBPn).
The former approach was intended to consume a collection of source
values--pressures, densities, and pore-volumes--and then to defer
calculation of the WBPn summary vectors to the Summary class.
This commit introduces a 'WellBlockAvgPress' container class which
holds precomputed WBPn results and the intention is to move the
calculation to the simulator side for greater parallelism.
This commit adds logic and structures for bringing in constant flux
aquifer objects-keyword AQUFLUX-from the restart file and forming
the requisite dynamic objects in the Schedule.
In particular, the 'RstAquifer' gets a new bare-bones representation
of these aquifer types and we add new constant flux aquifer objects
to the pertinent 'ScheduleState' when these exist. We also add this
aquifer type to 'data::Aquifers' in preparation of reinitialising
the simulator's aquifer container from the restart file. In
particular, this needs the total produced volume from the aquifer so
far.
We support constant flux aquifers (AQUFLUX keyword) entered both in
the SOLUTION and in the SCHEDULE sections. The primary structural
change is that we have to support analytic aquifers being introduced
dynamically, whence the connection information (xCAQ) must be
captured without knowing the full set of analytic aquifers. We
therefore allocate those output arrays purely from the maximum sizes
entered in the RUNSPEC section whereas we defer determining the
maximum aquifer ID to the point of capturing the dynamic values.
The xAAQ values for constant flux aquifers amount to a new aquifer
type integer value (=2) in IAAQ[11] and the flux value in SAAQ[0].
In particular, provide a container for holding/communicating the
per-phase, per-segment quantities at local flow conditions
- Flow velocities
- Holdup fractions
- Viscosities