Allow auto creation of field properties arrays in ParallelEclipseState.

There are field properties that can usually be queried even if they
are not explicitly specified in the input
file (e.g. PVTNUM). Unfortunately, the ParallelEclipseState cannot
forsee which of these will be queried at startup and after the
loadbalancing only the master process is able to auto creates
these (easily). Hence this commit uses a fall-back if an unstored
keyword is queried. In this case we use get_global-* to auto create
the keyword and use functions of the cartesian mapper to extract the
relevant values on the process.

Of course this temporarily wastes space and we might want to resort to
a more memory savy approach later.
This commit is contained in:
Markus Blatt
2020-03-09 14:21:35 +01:00
parent f4876becfb
commit 04311f6337
3 changed files with 53 additions and 2 deletions

View File

@@ -218,6 +218,8 @@ public:
#endif
cartesianIndexMapper_.reset(new CartesianIndexMapper(*grid_));
// reset cartesian index mapper for auto creation of field properties
static_cast<ParallelEclipseState&>(this->eclState()).resetCartesianMapper(cartesianIndexMapper_.get());
this->updateGridView_();
#if HAVE_MPI
if (mpiSize > 1) {