in particular, where to put empty lines and spaces. Also added a
copyright statement for myself to a few files and added a comment. the
new comment was requested by [at]bska, the rest was requested by
[at]atgeirr.
this is necessary because some older simulations only provide the
full-fledged solver class but no physical model.
(also, this allows to use something else than the standard newton
solver.)
so, far it is just a copy of the old "SimulatorFullyImplicitBlackoil"
class (which became a simple forward to the base class). The intention
is to unify the common simulator code in this class to avoid excessive
copy-and-pasting.
This commit changes the API of class SimulatorFullyImplicitBlackoil<>
in order to support wells controlled by (total) reservoir voidage
volume rates. Specifically, we switch to holding a mutable Wells
object (backed by a std::shared_ptr<>) in class Impl rather than a
reference to a WellsManager. This allows dynamically updating rate
distributions and targets of individual well controls. That, in
turn, is a prerequisite to supporting ECL-style "RESV" control
modes--be it in prediction or history matching capacity.
While in the process of API changes, also prepare for the second
stage of "WCONHIST/RESV" support: Accept a ScheduleConstPtr that
holds the input deck's notion of the history matching vs. prediction
controls. We need to distinguish the two in order to support the
exact semantics of "WCONHIST/RESV".
Update SimFIBO<> clients accordingly.
i.e., the simulator does not deal with any output operations
anymore. This makes sense because report steps are handled by
Opm::TimeMap and the constructor for the simulator already needs more
arguments than appropriate even without this...
Manually resolved conficts in the following files
examples/sim_fibo_ad.cpp
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
opm/autodiff/SimulatorFullyImplicitBlackoil_impl.hpp
In additions examples/sim_fibo_ad_cp.cpp was adapted to compile again.
This includes:
- Using the class FullyImplicitBlackoilResidual instead of
in-class definition for the residual object.
- Changing residual field name mass_balance to material_balance_eq.
- Letting the simulator and solver classes accept a
FullyImplicitSystemSolverInterface instead of a LinearSolverInterface.
- In sim_fibo_ad and test_implicit_ad, instantiate class
FullyImplicitSystemSolverSimple, replicating existing behaviour.
The most severe change probably is the removal of the AutoDiff
debugging helper functions which were useful from within a debugger
but unfortunately had to rely on a presumed linker bug in order not to
be removed in the final binary.
Also, some private attributes were unused. These have been removed and
the constructors of their respective classes have been adapted. Once
their intended functionality is actually implemented, they should be
brought back on an as-needed basis.
Thanks to @bska for the review!