Previously, this method did not take parallelism into account but just
checked the local wells for the constraints. Depending on the load balancing
of the wells this sometimes led to different return values of the function on different
processors. As the output is used to limit the time step size, different processors
were sometimes using different time steps in their local computations. This screwed
up convergence checks int the nonlinear operator such that only some processor thought
convergence was already achieved while others wanted to do more iterations.
With this commit the method now returns whether there is any well on any processor
with the constraint being true.
it is not used anymore. A lot of related implementation has been moved
to WellTestState.
Its existence makes some logic rather confusing and some new development
not easy.
the way to get the result of an evaluation is by return value, i.e.,
z = fn.eval(x, y);
not by passing a separate argument to the eval() function like
fn.eval(x, y, z);
the `XYTabulated2DFunction` used the latter approach causing an API
inconsistency with all other tabulation classes in
opm-material. OPM/opm-material#319 fixes that but requires this mop-up
as a consequence.
This allows (re)moving of the following files
opm/autodiff/RateConverter.hpp
opm/autodiff/Compat.cpp
opm/autodiff/Compat.hpp
opm/core/props/BlackoilPropertiesInterface.hpp
opm/core/simulator/BlackoilState.cpp
opm/core/simulator/BlackoilState.hpp
opm/core/simulator/BlackoilStateToFluidState.hpp
opm/core/utility/initHydroCarbonState.hpp
opm/polymer/PolymerBlackoilState.cpp
opm/polymer/PolymerBlackoilState.hpp
tests/test_blackoilstate.cpp
A WellSwitchingLogger was created in a local context (meaning not
all processes might be there), but since its destructor does
communication it must be called in a global context (guaranteeing
that all processes create it).
Since computeAverageFormationFactor() involves communication to reduce
values across the whole reservoir, it must be called by all processes,
also those with no wells to reopen.
the key difficulty is that we do not have reliable explicit information
to do the testing.
In this version, we try to obtain the explicit information by finishing
one converged solving.