mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Refactor Construction of Analytic Aquifer Objects
In particular, split the 'static' aquifer object initialisation of member function 'init()' into a new helper function initializeStaticAquifers() This is in preparation of adding a similar function to handle dynamic aquifer object initialisation from a restart file. To that end, also add a new member function createDynamicAquifers(episode_index) containing the current implementation of beginEpisode(). Creating the dynamic objects from a restart file then amounts to calling this function with a different 'episode_index'. As another aid to maintainability, add a new templated member function createAnalyticAquiferPointer() which forms 'unique_ptr<AquiferInterface>' objects for every known type of analytic aquifer. This, in turn, requires reordering the parameters of the AquiferConstantFlux constructor to match those of the existing Fetkovich and Carter-Tracy types. Finally, split the calculation of the constant flux aquifer's total flux rate out to a new helper function AquiferConstantFlux::totalFluxRate()
This commit is contained in:
@@ -491,7 +491,7 @@ BOOST_AUTO_TEST_CASE(AquiferConstantFlux)
|
||||
Opm::Serializer ser(packer);
|
||||
ser.pack(data_out);
|
||||
const size_t pos1 = ser.position();
|
||||
decltype(data_out) data_in({}, {}, sim);
|
||||
decltype(data_out) data_in({}, sim, {});
|
||||
ser.unpack(data_in);
|
||||
const size_t pos2 = ser.position();
|
||||
BOOST_CHECK_MESSAGE(pos1 == pos2, "Packed size differ from unpack size for AquiferConstantFlux");
|
||||
|
||||
Reference in New Issue
Block a user