mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-05 22:13:00 -06:00
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:
parent
c676b73822
commit
905403e2ed
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user