Using a different construction method for the sparse matrix
used makes the methods a little faster. There is probably
still room for improvement by refactoring to avoid the
sparse matrix products.
New parameters are:
- cpr_use_amg (default false) if true, use AMG preconditioner for elliptic part
- cpr_use_bicgstab (default true) if true, use BiCGStab (else use CG) for elliptic part
The 'props_' table of PVT functions has one entry for each active
phase. Fix four instances of indexing into the table using the
canonical rather than active phase indices.
This is necessary, but not sufficient, to run two-phase problems
without a "dummy" third phase.
First the change in oil saturation is calculated from changes in water
and oil saturation. Then oil saturation is updated based on this change
instead of just fixed to 1-sw-sg. With this change the oil saturation is
less sensitive towards numerical errors that may cause very small oil
saturations. Witch again may cause the simulator to think that the gas
phase is saturation with vaporized oil when it is not.
Currently, there are two abstract interface for the grids. One that
usually returns pods and arrays of them that also can be used by C
and is used also in opm-core, and one that returns Eigen datastructures
needed within opm-autodiff.
This commit adds a postfix ToEigen to those functions (faceCells, and
cellCentroidsZ) one could imagine to also return pods and arrays of them.
This should at least resolve the confusion about the two faceCells functions.
The next step will be issue #192Fixes#176
Now it takes a std::vector instead of an Eigen::Array, more importantly
it expects one element per face, not interior face. The mapping now takes
place in setThresholdPressures().
This fixes the following bugs:
- No longer overwrite the matlab-output files each step.
- Create output also for the initial state.
- Change filenames of matlab-output by one (initial state is 000.txt,
final state is NNN.txt and not (NNN-1).txt for total of NNN steps).
- Eclipse binary output matches eclipse output (includes the same
steps including initial state) for the same case.
Also added several comments outlining the parts of the run() function.