Add ERst::dataSize() - #5331
Conversation
ERst reports how many times a name occurs in a report step through occurrence_count(), but not how many elements those occurrences hold. A caller building a summary of the arrays of a restart file, for instance one that treats the global grid and the LGRs as a single result, therefore had to walk listOfRstArrays() for every grid and add the sizes up itself. Add dataSize(), which returns the total number of elements stored under a name in a report step, counting every occurrence. An unknown name gives zero and a non existing report step throws, as in occurrence_count(). Co-authored-by: Kristian Bendiksen <kristian.bendiksen@gmail.com>
That's a very weird thing to compute. Why do you need it? In a run with LGRs, the total data size per array is just sum of the number of active cells per grid. That's a constant. |
It is not the always sum of active cells, I think. As a counter-example: in the LGR_TESTMOD file FIPGAS/FIPOIL/FIPWAT are written for the global grid only: 30 values when the reservoir has 350 active cells. In ResInsight we are classifying the arrays as a "cell result for the porosity model" if they are |
ERst reports how many times a name occurs in a report step through occurrence_count(), but not how many elements those occurrences hold. A caller building a summary of the arrays of a restart file, for instance one that treats the global grid and the LGRs as a single result, therefore had to walk listOfRstArrays() for every grid and add the sizes up itself.
Add dataSize(), which returns the total number of elements stored under a name in a report step, counting every occurrence. An unknown name gives zero and a non existing report step throws, as in occurrence_count().