this was actually broken by an upstream change from return-by-reference
to return-by-value, but we were lucky, the return value was
kept in memory until end of block it seems.
now the serializer is 'standard', as in we only require basic types
+ stl containers. this should make the actual implementation pretty
pluggable. will ease replacing our serialization routines
with those in Dune 2.7 later.
this shall be used by users when they have a vector of types
with a serializeOp template. it cannot (at least not right now)
be part of the regular operator() as some vectors should go
directly to the underlying serializer (trivial types).
we can possibly find some traits magic for this later.
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.
With the arrival of compressed field properties there is no need
to extract the global arrays just to compress them manually
afterwards. This change should remove commununication and
synchronization points.
There is not reason to it as a vector of cartesian size as we access
its entries by the compressed element index. This should save space
and speedup the lookup.
They are attached to the cells as well and are now distributed
during CpGrid::loadBalance. Due to this change we also rename
FieldPropsDataHandle to PropsCentroidsDataHandle.
The created data handle for the communication could in theory be used
with other DUNE grids, too. In reality we will need to merge with the
handle that ALUGrid already uses to communicate the cartesian indices.
This PR gets rid of using the get_global_(double|int) method in
ParallelEclipseState and reduces the amount of boilerplate code there.