opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.
https://github.com/OPM/opm-parser/pull/677
Methods that returns the scaled critical gas (SGCR) saturation and the
scaled critical gas in oil saturation (SOGCR) is added to
BlackoilPropsAdFromDeck and BlackoilPropsAdInterface
A test is added in test_boprops_ad and fluid.data is modified to make
the test non trivial.
It needs a material law manager that works on the processes local
grid partition. Therfore copying the one from the global representation
does not work. Instead we now create an new SaturationPropsFromDeck and
initialize it with the local material law manager.
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.
This makes some API changes to AutoDiffBlock.
- Add overload for the constant() constructor taking rvalue ref.
- Add overload for the variable() constructor taking rvalue ref.
- Make the function() constructor *require* rvalue refs.
- Add a swap() function.
The remaining changes in this commit are follow-ups especially
to the third change (adding std::move in many places), and
some removal of unnecessary block pattern arguments from calls to
the constant() static method.
Remaining method is the one taking AD objects. This modification
required changes to a few more places than anticipated:
- RateConverter
- FullyImplicitBlackoilSolver::computeWellConnectionPressures()
In these places, the call now is a little more complex and there
might be a very minor performance loss, until we optimize the
bX() functions to check for the no-derivatives case.
This change has been made in both BlackoilPropsAdInterface
and BlackoilPropsAdFromDeck. Only remaining overloads are
those using AD objects and passing the PhasePresence for
each data point.
1) swatinit() is changed to setSwatInitScaling() to make it obvious that
we are modifying the props.
2) the descriptions of saturation and pc now makes more sense
3) the method is removed from the sibling class and the interface and
the type of new_props is changed from BlackoilPropsAdInterface to
BlackoilPropsAdFromDeck
5) The same modification is added to sim_fibo_ad_cp
The capillary pressure function in new_props is scaled to match the
capillary pressure function in props.
This is a temporary workaround while the simulator uses two different
property object.