Throw in output if OwnerCellsFirst = False

This commit is contained in:
Tor Harald Sandve 2023-12-12 11:32:03 +01:00
parent 6eeb5b4187
commit 87361b8f8d
4 changed files with 13 additions and 4 deletions

View File

@ -44,6 +44,7 @@
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
#include <opm/simulators/flow/countGlobalCells.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
@ -516,7 +517,7 @@ private:
}
const auto& gridView = simulator_.vanguard().gridView();
const int num_interior = Opm::detail::
const int num_interior = detail::
countLocalInteriorCellsGridView(gridView);
const bool log = this->collectToIORank_.isIORank();

View File

@ -711,7 +711,7 @@ regionSum(const ScalarBuffer& property,
// the property does not contain the ghostcells
// This code assumes that that the ghostcells are
// added after the interior cells
// Is this a valid assumption?
// OwnerCellsFirst = True
assert(regionId.size() >= property.size());
for (std::size_t j = 0; j < property.size(); ++j) {
const int regionIdx = regionId[j] - 1;

View File

@ -173,6 +173,14 @@ public:
this->forceDisableFipresvOutput_ =
EWOMS_GET_PARAM(TypeTag, bool, ForceDisableResvFluidInPlaceOutput);
if (! EWOMS_GET_PARAM(TypeTag, bool, OwnerCellsFirst)) {
const std::string msg = "The output code does not support --owner-cells-first=false.";
if (collectToIORank.isIORank()) {
OpmLog::error(msg);
}
OPM_THROW_NOLOG(std::runtime_error, msg);
}
}
/*!

View File

@ -331,7 +331,7 @@ public:
}
const auto& gridView = simulator_.vanguard().gridView();
const int num_interior = Opm::detail::
const int num_interior = detail::
countLocalInteriorCellsGridView(gridView);
this->eclOutputModule_->
@ -562,7 +562,7 @@ private:
const auto& gridView = simulator_.vanguard().gridView();
const bool log = this->collectToIORank_.isIORank();
const int num_interior = Opm::detail::
const int num_interior = detail::
countLocalInteriorCellsGridView(gridView);
this->eclOutputModule_->
allocBuffers(num_interior, reportStepNum,