mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5653 from bska/fix-rst-inplace
Initialise Fluid-in-Place Balance Sheets at Restart
This commit is contained in:
commit
0ff3d63c0a
@ -637,7 +637,29 @@ public:
|
||||
}
|
||||
|
||||
void endRestart()
|
||||
{}
|
||||
{
|
||||
// We need these objects to satisfy the interface requirements of
|
||||
// member function calc_inplace(), but the objects are otherwise
|
||||
// unused and intentionally so.
|
||||
auto miscSummaryData = std::map<std::string, double>{};
|
||||
auto regionData = std::map<std::string, std::vector<double>>{};
|
||||
|
||||
// Note: calc_inplace() *also* assigns the output module's
|
||||
// "initialInplace_" data member. This is, semantically speaking,
|
||||
// very wrong, as the run's intial volumes then correspond to the
|
||||
// volumes at the restart time instead of the start of the base run.
|
||||
// Nevertheless, this is how Flow has "always" done it.
|
||||
//
|
||||
// See GenericOutputBlackoilModule::accumulateRegionSums() for
|
||||
// additional comments.
|
||||
auto inplace = this->outputModule_
|
||||
->calc_inplace(miscSummaryData, regionData,
|
||||
this->simulator_.gridView().comm());
|
||||
|
||||
if (this->collectOnIORank_.isIORank()) {
|
||||
this->inplace_ = std::move(inplace);
|
||||
}
|
||||
}
|
||||
|
||||
const OutputBlackOilModule<TypeTag>& outputModule() const
|
||||
{ return *outputModule_; }
|
||||
|
Loading…
Reference in New Issue
Block a user