Fix BlackoilWellModel::numComponents for parallel runs.

In the case with active solvent (BlackoilWellModel::has_solvent_ is
true, e.g. case 2D_OILWATER_POLYMER.DATA) and one process have no
wells while another has some this lead to numComponents returning
different values. Later this lead to truncated message in MPI_Allgather.

The underlying problem was the usage of numWells() which returns just
the number of local wells. We resort to using wellsActive which
returns whether there any well active regardless which process knows it.
This commit is contained in:
Markus Blatt 2019-11-01 14:58:10 +01:00
parent c676b73822
commit 905403e2ed

View File

@ -1380,7 +1380,7 @@ namespace Opm {
int
BlackoilWellModel<TypeTag>::numComponents() const
{
if (numWells() > 0 && numPhases() < 3) {
if (wellsActive() && numPhases() < 3) {
return numPhases();
}
int numComp = FluidSystem::numComponents;