When the matrix already exists and has the correct sparsity structure
(which is assumed by the calling update()), we can copy just the data,
avoiding the need for allocation and matrix construction.
i chose to split in a separate _impl file because this code is so
generic that there may be downstream users who want to use on other
matrix types than what we use in opm-simulators.
We got compile errors like:
/home/build/opm-simulators/opm/simulators/linalg/FlexibleSolver1.cpp:24:1: required from here
/usr/include/dune/istl/ilu.hh:140:29: error: 'double' is not a class, struct, or union type
without this patch.
Hence we use the new internal ILU functions if available.
If the user requested ILU0, the uninitialized valued caused an
arbritrary (quite high) fill-in level to be used which stalled the
computation and exhausted memory when running parallel.