Previously, the user had to specify it in the json file read from the
FlexibleSolver or 1 was used. Unfortunately, the index depends on the
model used and it seem rather opaque to a user what that index is.
With this commit we determine the pressure index from the model.
This commit makes the constructor PressureInverseOperator that
accepts a Dune::OwnerOverlapCopyCommunication<> object contingent on
having MPI. The type does not exist otherwise.
Previously, it got passed the weights only needed for CPR.
Additionally those were passed with the parameter tree to the
update method and constructor.
Now the CPR constructor gets a function to use for recalculating
the weights and the property is not changed. Unfortunately this
means that the preconditioner creators of the factory get another
parameter.
It gives overhead in constructor when linear system is created. No overhead if reuse is used.
This commit 141903a26 cherry-picked, cleaned and made compilable with
recent changes
Also use it in flow_blackoil_dunecpr.cpp. Adds new command-line parameter,
--linear-solver-configuration-json-file, to read linear solver config from
JSON-format file at runtime.