The size is the number of cells and not dependent on the number of phases.
This was a typical copy&paste mistake that wasted space.
Kudos to atgeirr for catching this.
This is needed since hydro carbon state is used to get the
primal variables since PR #687, commit 9c771ab6. Therefore we
now distribute the state along with rest of the black oil state
variable at the start of a parallel simulation.
This closes issue #695
Since the support for threshold pressures running Norne with
flow_mpi aborted error messages like
```
Program threw an exception: [/home/mblatt/DUNE-test/opm-autodiff/opm/autodiff/BlackoilModelBase_impl.hpp:383] Illegal size of threshold_pressures input ( 153924 ), must be equal to number of faces + nncs ( 78316 + 0 ).
```
This commit now distributes the threshold pressures (if present) just like the rest
of the model properties and Norne does not abort here any more.
Please note:
1. If there are NNCs flow_mpi will abort with an error.
2. We might want to resort to reading and calculating the threshold pressure
(and maybe other properties) on distributed grids instead of using communication.
Since the refactoring to using opm-material a material law manager for
the global grid was used. This meant that the properties used for
elements of the local grid were wrong. With this commit we set up a
manager that is based on the local grid only.
Somehow I was mislead by the name rock properties that the data stored in
them is not associated to grid cells, but to rock regions. With this commit
we determine the porosity and permeability by communication.
Previously, we tried to make an empty container bigger by
resizing it with its current size. Of course this is wrong and does
not change anything. With this commit we use the size of another
container which already has the correct size.
As it turns out initializing the Geology on a distributed grid
result in wrong values for e.g. saturation. Therefore with this
commit we resort to initializing the global geology and distribute
it using communication.
Previously, we only did send the information for the
first phase which led to computing wrong values in
a simulation. With this patch we now send all the data
for all the phases.
During BlackoilStateDataHandle::gather we did read values from the
state where we should only receive values to. With this commit we
read from the state where we should send values.
Kudos to Bard for noticing this.
Previously BlackoilPropsDataHandle did hold a grid for sending
and receiving that were either not used or we could prevent their
usage. Therefore this commit removes them from the class and queries
all needed information from the property objects.
With this commit we add the possibility to start with a global representation
of a simulator that is read on each process and afterwards this presentation
is redistributed among the processors together with the properties and
state data needed to initialize the simulation.
There still is no parallel well handling and no parallel output. But with the
equilibrium example of @dr-robertk and deactivated output we can already
perform parallel runs.