Specifically, only assemble gravity contributions on internal faces or
external Dirichlet faces. Moreover, pay attention to direction of
gravity flux (in/out of cell) during assembly.
Specifically, split detection of prescribed reservoir pressure values
from prescribed well (i.e., BHP) pressure values. Previously, we
would not even assemble any well contributions if there were any
prescribed reservoir pressure values. Moreover, the return value from
assemble_cell_contrib() was exactly opposite of its intended value...
Callers may pass NULLs in absence of wells in any given model. This
implementation assembles an equation for each well, irrespective of
well control type (BHP or RATE), and assumes that productivity indices
and perforation pressure drops account for multiphase effects.
We will generate square matrices only in the foreseeable future and
there is no need to maintain the number of columns (the 'n' member)
separately. Update all users accordingly.
Following cset ba5d27f90d7a there is no need to compute the interface
pressure values after every linear solve. Re-factor
cfs_tpfa_press_flux() to only compute cell pressures and interface
fluxes, and move interface pressure value computation to cfs_tpfa_fpress().
Having a 'MAT_SIZE_T' that is sometimes an int and sometimes an
mwSignedIndex is asking for trouble. The practical impact for OPM is
low, though, as this issue affects only the MEX interface.
Specifically, move the evaluation of cell transmissibilities into
cfs_tpfa module (from original MEX implementation), and create a new
structure, 'struct compr_quantities', to hold the 'RB^{-1}' data and
(upwind) phase mobilities &c.
Specifically, introduce utilities compute_fpress() and
compute_flux(). The former is needed to implement the latter across
external boundary faces. Moreover, interface pressure values are
needed to evaluate fluid properties on faces (specifically R/B).
Add small gateway routine, cfs_tpfa_fpress(), to allow callers to
recover interface pressure values. Re-implement cfs_tpfa_press_flux()
in terms of compute_fpress() and compute_flux().
Also, add fields 'fpress' and 'fpaccum' to struct cfs_tpfa_impl.
We may wish to generalise this part into real utility functions but
for now, leave the functionality where it is most directly needed.
Rename the functions to highlight relationship to compr. tpfa.