added: virtual method globalFieldProps to EclipseState
this will always return the global field props, even in parallel. necessary since certain operations related to IO need to full global view on the root process, even when running in parallel also virtualize the EclipseGrid accessor to add assert in parallel to ensure only root-process access
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Opm {
|
||||
|
||||
const InitConfig& getInitConfig() const;
|
||||
const SimulationConfig& getSimulationConfig() const;
|
||||
const EclipseGrid& getInputGrid() const;
|
||||
virtual const EclipseGrid& getInputGrid() const;
|
||||
|
||||
const FaultCollection& getFaults() const;
|
||||
const TransMult& getTransMult() const;
|
||||
@@ -91,7 +91,10 @@ namespace Opm {
|
||||
const EDITNNC& getInputEDITNNC() const;
|
||||
bool hasInputEDITNNC() const;
|
||||
|
||||
// The potentially parallelized field properties
|
||||
virtual const FieldPropsManager& fieldProps() const;
|
||||
// Always the non-parallel field properties
|
||||
virtual const FieldPropsManager& globalFieldProps() const;
|
||||
const TableManager& getTableManager() const;
|
||||
const EclipseConfig& getEclipseConfig() const;
|
||||
const EclipseConfig& cfg() const;
|
||||
|
||||
@@ -2088,7 +2088,7 @@ SummaryImplementation(const EclipseState& es,
|
||||
const Schedule& sched,
|
||||
const std::string& basename)
|
||||
: grid_ (std::cref(grid))
|
||||
, regCache_ (es.fieldProps().get_int("FIPNUM"), grid, sched)
|
||||
, regCache_ (es.globalFieldProps().get_int("FIPNUM"), grid, sched)
|
||||
, deferredSMSpec_(makeDeferredSMSpecCreation(es, grid, sched))
|
||||
, rset_ (makeResultSet(es.cfg().io(), basename))
|
||||
, fmt_ { es.cfg().io().getFMTOUT() }
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace {
|
||||
const ::Opm::UnitSystem& units,
|
||||
::Opm::EclIO::OutputStream::Init& initFile)
|
||||
{
|
||||
auto porv = es.fieldProps().porv(true);
|
||||
auto porv = es.globalFieldProps().porv(true);
|
||||
units.from_si(::Opm::UnitSystem::measure::volume, porv);
|
||||
initFile.write("PORV", singlePrecision(porv));
|
||||
}
|
||||
@@ -327,7 +327,7 @@ namespace {
|
||||
// assertKeyword() here--on a 'const' GridProperties object--to
|
||||
// invoke the autocreation property, and ensure that the keywords
|
||||
// exist in the properties container.
|
||||
const auto& fp = es.fieldProps();
|
||||
const auto& fp = es.globalFieldProps();
|
||||
fp.get_int("PVTNUM");
|
||||
fp.get_int("SATNUM");
|
||||
fp.get_int("EQLNUM");
|
||||
@@ -451,8 +451,8 @@ namespace {
|
||||
// The INIT file should always contain the NTG property, we
|
||||
// therefore invoke the auto create functionality to ensure
|
||||
// that "NTG" is included in the properties container.
|
||||
const auto& fp = es.fieldProps();
|
||||
es.fieldProps().get_double("NTG");
|
||||
const auto& fp = es.globalFieldProps();
|
||||
fp.get_double("NTG");
|
||||
writeDoubleCellProperties(doubleKeywords, fp,
|
||||
units, false, initFile);
|
||||
}
|
||||
@@ -519,7 +519,7 @@ namespace {
|
||||
.withHysteresis(es.runspec().hysterPar().active())
|
||||
.collect (es.runspec().phases());
|
||||
|
||||
const auto& fp = es.fieldProps();
|
||||
const auto& fp = es.globalFieldProps();
|
||||
if (! es.cfg().init().filleps()) {
|
||||
// No FILLEPS in input deck or number of active phases
|
||||
// unsupported by Flow's saturation function finalizers.
|
||||
|
||||
@@ -102,6 +102,10 @@ namespace Opm {
|
||||
return this->field_props;
|
||||
}
|
||||
|
||||
const FieldPropsManager& EclipseState::globalFieldProps() const {
|
||||
return this->field_props;
|
||||
}
|
||||
|
||||
|
||||
const TableManager& EclipseState::getTableManager() const {
|
||||
return m_tables;
|
||||
|
||||
Reference in New Issue
Block a user