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:
Bård Skaflestad
2023-03-09 16:47:33 +01:00
parent af9e446454
commit 7abfdc52e0
4 changed files with 208 additions and 126 deletions

View File

@@ -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");