We pass an int pointer to the function initCornerPointGrid.
With ACTNUM this pointer was initialized with data pointer
of an int vector that we threw away before the function call
(otherwise it was null). To fix this we move the int-vector up one
scope.
Note that we have to reduce the year-range in the specific test
createDeckWithDRSDTthenDRVDT
in order not to wrap around for system_clock. This is a deficency of
the new time-service protocol.
Mostly for converting between std::time_t and broken-down time
stamps. Uses UTC and std::chrono::system_clock. May wrap in as
little as 292 years, depending on the period of system_clock.
Intended to replace various timestamping utility functions from
libecl. A comprehensive time-service protocol for Flow is much more
work than this, and will likely not be easily realized before we
have C++17 and its much expanded time/calendar library.
Instead, switch to 'int' for the 'before' and 'after' row indices.
The 'ssize_t' Posix type alias is not appropriate for this usage
since its range is only guaranteed to be [ -1 .. (1<<15)-1 ].
If you set CMAKE_INSTALL_PREFIX, have the dependencies installed there, but
the source of them lying around in the parent directory of the build
directory, then the build will fail starting with opm-models because
we assume that ../opm-material is a build directory and set opm-material_DIR
to it. CMake will complain about not finding opm-material-config.cmake or
Opm-materialConfig.cmake. With this commit we will only set opm-material_DIR
if the directory contains a file CMakeCache.txt (which should be the case in
a configured build directory.
Directory outline of the failing situation is
- ${CMAKE_INSTALL_PREFIX} # where all dependencies are installed
- parent_dir
|____ opm-common #source dir
|____ opm-material #source dir
|____ ...
|____ build #build directory for current module (e.g. opm-modules)
Change is tested with sibling build
- build
|___ opm-common #build dir
|___ opm-material #build dir
|___ ...
and the dune version of it
- parent_dir
|___ opm-common # source dir
|____ build # build dir opm-common
|___ opm-material # source dir
|____ build # build dir opm-material
...
This commit switches the 'test_Summary' unit test to use class ESmry
for inspecting the values output to disk by 'out::Summary'. As a
consequence, we are not able to verify units of measure for the
parameters, at least not for the time being. Moreover, class ESmry
exclusively uses the "i,j,k" sub-key for block-related parameters so
switch those to reference the IJK identifiers.
Finally, as class ESmry currently does not support reading separate
(multiple) summary files, switch the input decks to generate unified
output.
This commit switches a set of OPM-Common's unit tests away from
using direct calls to libecl functions and into using base types
from OPM-Common itself (along with Boost.Filesystem).
In particular summary related queries are replaced by calls to ESmry
member functions (wrapped in libecl-like interfaces to minimise code
changes). We disable checks on unit strings since ESmry currently
does not have a way of associating those with individual variables.
This commit takes a pass at the implementation files in opm-common
and removes references to libecl functions where practical. In
particular we switch to using types from C++'s standard library (and
Boost.Filesystem) to achieve the effects of the interfaces being
replaced.
We also insert direct calls to Posix function fnmatch() to preserve
existing pattern matching behaviour (well lists and well templates).
This commit introduces a new member function
int ESmry::miniStepIdxAtReportStep(rptStep)
which returns the zero-based ministep corresponding to the start of
the given report step (one-based indexing). This will simplify
decoupling a few unit tests from libecl.
This commit replaces the existing system for writing summary and
specification (SMSPEC) files with a new implementation based on
class EclOutput. We package the evaluators of individual parameters
in a set of classes determined by the parameter's category which
each implement a virtual 'update()' function. This update function
ultimately writes new values into a SummaryState object.
Add a factory-like system for instantiating the appropriate class
depending on a SummaryNode's 'category()'. Also, add a helper class
for managing the parameters that a configured in a simulation
model's SUMMARY section in order to distinguish these from those
parameters that are merely needed for restart purposes. The summary
class's 'eval()' function then becomes a loop over the evaluators
for parameters in SUMMARY followed by a loop over the evaluators for
restart vectors.
We reimplement the 'internal_store()' function in terms of an
std::vector of a helper structure 'MiniStep' which holds a ministep
ID (contiguous counter started at zero), a report step ID, and all
the evaluated parameters of this ministep. The final write function
then consists of outputting those ministep structures that have
accumulated since the previous call to write(). If a simulation
does not call write at all, then this will accumulate all parameters
for all ministeps throughout the simulation history.
We create the SMSPEC file at most once, and write to it at most each
report step. We create the summary file once (if unified) or at
each report step (if separate).
Needed to ensure we create the same summary/specification files as
the existing system. We will revert this change once the new system
is in place and we can afford to update the reference solutions.
Flow's saturation function finalizers don't currently handle models
with fewer than three active phases. Don't attempt to fill in
scaled endpoint vectors in this case, but issue a warning that we're
ignoring FILLEPS here.
The summary file must have DAYS (&c) for its TIME vector unit. This
is a step towards enabling new summary writer functionality.
Update the RFT writer accordingly.