Restart *WEL Arrays: Add Foundational Helper Classes

This commit adds new helper classes,

    Opm::RestartIO::Helpers::CharArrayNullTerm<NChar>
    Opm::RestartIO::Helpers::WindowedArray<T>
    Opm::RestartIO::Helpers::WindowedMatrix<T>

the first of which represents a nul-terminated character string of
'NChar' user data (total array size is NChar + 1).  Mainly intended
for representing Fortran-compatible characters arrays--especially
for ZWEL and similar restart vectors (e.g., ZGRP).

The second two simplify working with subsets of large linear arrays,
particularly those that represent N items per well, group, or
segment.  The WindowedArray is a linear array of windows (N items
per window) packed into a std::vector<T> and the WindowedMatrix
additionally imposes a Row-by-Colum structure which is useful for
the case of N windows (each of size K) for each of M entities (e.g.,
K items for each of N connections for each of M wells).
This commit is contained in:
Bård Skaflestad
2018-07-03 13:20:04 +02:00
parent b9c68bdc6e
commit 03b3be48b0
5 changed files with 528 additions and 0 deletions

View File

@@ -232,6 +232,7 @@ if(ENABLE_ECL_INPUT)
endif()
if(ENABLE_ECL_OUTPUT)
list (APPEND TEST_SOURCE_FILES
tests/test_CharArrayNullTerm.cpp
tests/test_compareSummary.cpp
tests/test_EclFilesComparator.cpp
tests/test_EclipseIO.cpp
@@ -246,6 +247,7 @@ if(ENABLE_ECL_OUTPUT)
tests/test_Summary.cpp
tests/test_Tables.cpp
tests/test_Wells.cpp
tests/test_WindowedArray.cpp
tests/test_writenumwells.cpp
tests/test_serialize_ICON.cpp
tests/test_serialize_SCON.cpp
@@ -488,6 +490,7 @@ if(ENABLE_ECL_OUTPUT)
opm/output/data/Cells.hpp
opm/output/data/Solution.hpp
opm/output/data/Wells.hpp
opm/output/eclipse/CharArrayNullTerm.hpp
opm/output/eclipse/DoubHEAD.hpp
opm/output/eclipse/EclipseGridInspector.hpp
opm/output/eclipse/EclipseIO.hpp
@@ -501,6 +504,7 @@ if(ENABLE_ECL_OUTPUT)
opm/output/eclipse/Summary.hpp
opm/output/eclipse/SummaryState.hpp
opm/output/eclipse/Tables.hpp
opm/output/eclipse/WindowedArray.hpp
opm/output/eclipse/WriteRestartHelpers.hpp
opm/output/OutputWriter.hpp
opm/test_util/EclFilesComparator.hpp