Specifically, output the solution only at the end (in MATLAB
compatible format, for easy comparison) and annotate the diagnostic
output (i.e., cpu time and residual norm) with the iteration number.
The definition from commit 6f22d10 included a non-zero derivative
which interfered with the automatic differentiation solver. Using a
fully constant Darcy flux enables using dt=150 while still computing
the correct solution.
While here, output the solution (s1) using more precision/digits for
comparison with 'sim_simple.m'.
Specifically,
- Introduce a new class, UpwindSelector<Scalar> which provides a
selection service (method select()) to pick out a quantity across
an interface in the upwind direction.
Method select() is implemented only for the case of no
counter-current flow (i.e., no effects of gravity and/or capillary
pressure). The selector is affected through applying an explicit
sparse matrix to each quantity. This may be inefficient, but only
measurements will tell.
- Split function fluxFunc<ADB>() into two components,
phaseMobility<ADB>() and fluxFunc<ADB>(). The former computes
phase mobilities (per cell) for water and oil in a subset of the
grid cells and the latter computes the flux function (for water,
i.e., the first phase) based on a (2-) vector of phase
mobilities--either per cell or per internal interface.
- Compute explicit phase mobilities (per cell) in the non-linear
loop before employing the upwind selector to pick out proper
upwind mobilities per (internal) interface to define the quantity
'fw_face' which was previously computed by an arithmetic average.