Compare commits
22 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a3326a7d8 | ||
|
|
7f2bdb9d65 | ||
|
|
8738f78a10 | ||
|
|
45f01eb2ab | ||
|
|
5babdb413c | ||
|
|
ebc0f30b94 | ||
|
|
5ae44d0d4c | ||
|
|
aed0063b61 | ||
|
|
ba067e4132 | ||
|
|
81c8021cdd | ||
|
|
325da26722 | ||
|
|
87b501f7b0 | ||
|
|
1ab30d9182 | ||
|
|
330ef3c26a | ||
|
|
0c1ae46f01 | ||
|
|
81160c55e9 | ||
|
|
a52f8bf782 | ||
|
|
43eb1bac37 | ||
|
|
2f0e782dfd | ||
|
|
5f77a71b8f | ||
|
|
e281a1e661 | ||
|
|
d894ef99d3 |
@@ -124,7 +124,7 @@ macro (find_opm_package module deps header lib defs prog conf)
|
||||
# without config.h
|
||||
config_cmd_line (${module}_CMD_CONFIG ${module}_CONFIG_VARS)
|
||||
|
||||
if(NOT "${prog}" STREQUAL "")
|
||||
if(prog) # always evaluates to false, but makes tests with DUNE 2.6-2.7 work
|
||||
# check that we can compile a small test-program
|
||||
include (CMakePushCheckState)
|
||||
cmake_push_check_state ()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if(USE_DAMARIS_LIB AND MPI_Found)
|
||||
if(USE_DAMARIS_LIB AND MPI_FOUND)
|
||||
if (Damaris_FOUND)
|
||||
set(HAVE_DAMARIS 1)
|
||||
message(STATUS "The Damaris library was found: ${Damaris_VERSION} ${Damaris_DIR}")
|
||||
|
||||
@@ -108,7 +108,18 @@ if(NOT @opm-project_NAME@_FOUND)
|
||||
# The settings in this block do not mix well with the DEST_PREFIX
|
||||
# setting.
|
||||
if (NOT DEST_PREFIX)
|
||||
# This is required to include OpmPackage
|
||||
# if this file is not processed using the OPM CMake system but
|
||||
# simply by a call to find_package(module) then the CMAKE_MODULE_PATH
|
||||
# might not include the location of the OPM cmake module yet.
|
||||
# Hence we search for opm-common using config mode to set it up.
|
||||
# The check for opm-common_PREFIX is there to not do this in
|
||||
# opm-common-config.cmake
|
||||
if(NOT opm-common_PREFIX
|
||||
AND NOT opm-common_FOUND)
|
||||
# This needed to find the path to the CMake modules
|
||||
find_package(opm-common CONFIG)
|
||||
endif()
|
||||
# This is required to include OpmPackage /opm-common-prereq.cmake
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" @PREREQ_LOCATION@)
|
||||
|
||||
# extra code from variable OPM_PROJECT_EXTRA_CODE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Userspesific CSS for doxygen */
|
||||
/* Userspecific CSS for doxygen */
|
||||
body, table, div, p, dl {
|
||||
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
|
||||
11
docs/man1/arraylist.1
Normal file
11
docs/man1/arraylist.1
Normal file
@@ -0,0 +1,11 @@
|
||||
.TH SUMMARY "1" "October 2022" "arraylist 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
summary \- Printer for list of arrays in Eclipse summary files
|
||||
.SH DESCRIPTION
|
||||
List all arrays found in an EclFile specified on the command line.
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
\fB\-h\fR Print help and exit.
|
||||
.TP
|
||||
\fB\-r\fR List array for a specific report time step number. Option only valid for a unified restart file.
|
||||
.PP
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH COMPAREECL "1" "April 2022" "compareECL 2022.04" "User Commands"
|
||||
.TH COMPAREECL "1" "October 2022" "compareECL 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
compareECL \- Comparator for Eclipse files
|
||||
.SH DESCRIPTION
|
||||
@@ -32,7 +32,7 @@ The integration test compares SGAS, SWAT and PRESSURE in unified restart files,
|
||||
.TP
|
||||
\fB\-p\fR Print keywords in both cases and exit.
|
||||
.TP
|
||||
\fB\-r\fR compare a spesific report time step number in a restart file.
|
||||
\fB\-r\fR compare a specific report time step number in a restart file.
|
||||
.TP
|
||||
\fB\-t\fR Specify ECLIPSE filetype to compare, (default behaviour is that all files are compared if found). Different possible arguments are:
|
||||
.IP
|
||||
@@ -50,6 +50,9 @@ Compare two RFT files (.RFT).
|
||||
.IP
|
||||
\fB\-t\fR SMRY
|
||||
Compare two cases consistent of (unified) summary files.
|
||||
.IP
|
||||
\fB\-t\fR RSM
|
||||
Compare RSM file against a summary file.
|
||||
.PP
|
||||
\fB\-x\fR Allow extra keywords in case number 2. These additional keywords (not found in case number1) will be ignored in the comparison.
|
||||
.PP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH CONVERTECL "1" "April 2022" "convertECL 2022.04" "User Commands"
|
||||
.TH CONVERTECL "1" "October 2022" "convertECL 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
convertECL \- Converter for Eclipse files (binary <-> formatted format)
|
||||
.SH DESCRIPTION
|
||||
@@ -14,5 +14,5 @@ In addition, the program takes these options (which must be given before the arg
|
||||
.TP
|
||||
\fB\-i\fR Enforce IX standard on output file.
|
||||
.TP
|
||||
\fB\-r\fR extract and convert a spesific report time step number from a unified restart file.
|
||||
\fB\-r\fR extract and convert a specific report time step number from a unified restart file.
|
||||
.PP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH OPMHASH "1" "April 2022" "opmhash 2022.04" "User Commands"
|
||||
.TH OPMHASH "1" "October 2022" "opmhash 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
opmhash \- Hasher for summary keywords in Eclipse files
|
||||
.SH DESCRIPTION
|
||||
@@ -39,3 +39,11 @@ depends on the keyword order.
|
||||
\fB\-l\fR : Add filename and linenumber information to each keyword.
|
||||
.HP
|
||||
\fB\-s\fR : Short form \- only print the hash of the complete deck.
|
||||
.HP
|
||||
\fB\-S\fR : Silent form \- will not print any deck output.
|
||||
.PP
|
||||
It is possible to add multiple deck arguments, they are then scanned repeatedly,
|
||||
and the decks are compared. In the case of multiple deck arguments the exit
|
||||
status of the program will be zero if all are equal and nonzero in case of
|
||||
differences.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH OPMPACK "1" "April 2022" "opmpack 2022.04" "User Commands"
|
||||
.TH OPMPACK "1" "October 2022" "opmpack 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
opmpack \- Validator and printer of deck in Eclipse files without comments
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH RST_DECK: "1" "April 2022" "rst_deck 2022.04" "User Commands"
|
||||
.TH RST_DECK: "1" "October 2022" "rst_deck 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
rst_deck \- Convert simulation deck to a deck ready for restart
|
||||
.SH DESCRIPTION
|
||||
@@ -86,95 +86,3 @@ rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rs
|
||||
1: The program has a compiled list of keywords which will be retained in the
|
||||
.IP
|
||||
SOLUTION section. The current value of that list is: RPTRST
|
||||
.PP
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'v'
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'e'
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'r'
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'i'
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'o'
|
||||
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'n'
|
||||
.PP
|
||||
The rst_deck program will load a simulation deck and parameters for a restart
|
||||
and reformat the deck to become a restart deck. Before the updated deck is
|
||||
output the program will update the SOLUTION and SCHEDULE sections. All keywords
|
||||
from the SOLUTION section will be cleared out(1) and a RESTART keyword will be
|
||||
inserted. In the SCHEDULE section the program can either remove all keywords up
|
||||
until the restart date, or alternatively insert SKIPREST immediately following
|
||||
the SCHEDULE keyword.
|
||||
.PP
|
||||
When creating the updated restart deck the program can either link to unmodified
|
||||
include files with INCLUDE statements, create a copy of deck structure in an
|
||||
alternative location or create one large file with all keywords in the same
|
||||
file. Apart from the alterations to support restart the output deck will be
|
||||
equivalent to the input deck, but formatting is not retained and comments have
|
||||
been stripped away.
|
||||
.PP
|
||||
Arguments:
|
||||
.PP
|
||||
1. The data file we are starting with.
|
||||
.PP
|
||||
2. The restart source; this can either be a basename with an optional path
|
||||
.IP
|
||||
prefix and a :N to restart from step N; alternatively you can point to an
|
||||
existing restart file. If you point to an existing restart file the input
|
||||
will be validated in several ways:
|
||||
.IP
|
||||
a) Unified/multiple files will be checked against the UNIFIN setting of
|
||||
.IP
|
||||
the deck.
|
||||
.IP
|
||||
b) Formatted/unformatted will be checked against the FMTIn setting of the
|
||||
.IP
|
||||
deck.
|
||||
.IP
|
||||
c) If a single file like \fI\,/path/to/case/HISTORY.X0067\/\fP is given as argument the
|
||||
.IP
|
||||
:N notation to denote report step should not be used.
|
||||
.IP
|
||||
If the restart argument is given as the path to an existing file the content
|
||||
of the RESTART keyword will be updated to contain the correct path from the
|
||||
location of the restart deck to the location of the restart file. This path
|
||||
awareness will be fooled if the restart deck is redirected from stdout to a
|
||||
path different from cwd. If the restart argument is given as an absolute
|
||||
filename the RESTART keyword will have an absolute path, if the restart
|
||||
argument is a relative path the RESTART keyword will get a relative path \-
|
||||
although an absolute path will be used if the restart file and the output
|
||||
deck have different roots. If the restart argument is given as a string not
|
||||
pointing to an existing file it will be inserted verbatim in the restart
|
||||
deck.
|
||||
.IP
|
||||
A restart step value of 0 is interpreted as a dry run \- a deck which has not
|
||||
been set up for restart will be written out.
|
||||
.PP
|
||||
3. Basename of the restart deck we create, can optionally contain a path prefix;
|
||||
.IP
|
||||
the path will be created if it does not already exist. This argument is
|
||||
optional, if it is not provided the program will dump a restart deck on
|
||||
stdout. If the argument corresponds to an existing directory the restart case
|
||||
will get the same name as the base case.
|
||||
.PP
|
||||
\fB\-s\fR: Manipulate the SCHEDULE section by inserting a SKIPREST keyword immediately
|
||||
.IP
|
||||
following the SCHEDULE keyword. If the \fB\-s\fR option is not used the SCHEDULE
|
||||
section will be modified by removing all keywords until we reach the restart
|
||||
date.
|
||||
.PP
|
||||
\fB\-m\fR: [share|inline|copy] The restart deck can reuse the unmodified include files
|
||||
.IP
|
||||
from the base case, this is mode 'share' and is the default. With mode
|
||||
\&'inline' the restart deck will be one long file and with mode 'copy' the
|
||||
file structure of the base case will be retained. The default if no \fB\-m\fR
|
||||
option is given is the 'share' mode.
|
||||
.IP
|
||||
In the case of 'share' and 'copy' the correct path to include files will be
|
||||
negotiated based on the path given to the output case in the third argument.
|
||||
If the restart deck is passed to stdout the include files will be resolved
|
||||
based on output in cwd.
|
||||
.PP
|
||||
Example:
|
||||
.IP
|
||||
rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rst/RESTART\/\fP \fB\-s\fR
|
||||
.PP
|
||||
1: The program has a compiled list of keywords which will be retained in the
|
||||
.IP
|
||||
SOLUTION section. The current value of that list is: RPTRST
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH SUMMARY "1" "April 2022" "summary 2022.04" "User Commands"
|
||||
.TH SUMMARY "1" "October 2022" "summary 2022.10" "User Commands"
|
||||
.SH NAME
|
||||
summary \- Printer for summary keys in Eclipse summary files
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Module: opm-common
|
||||
Description: Open Porous Media Initiative shared infrastructure
|
||||
Version: 2022.10-pre
|
||||
Label: 2022.10-pre
|
||||
Version: 2022.10
|
||||
Label: 2022.10
|
||||
Maintainer: opm@opm-project.org
|
||||
MaintainerName: OPM community
|
||||
Url: http://opm-project.org
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
double rate;
|
||||
|
||||
BCFace() = default;
|
||||
explicit BCFace(const DeckRecord& record);
|
||||
explicit BCFace(const DeckRecord& record, const GridDims& grid);
|
||||
|
||||
static BCFace serializationTestObject();
|
||||
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace {
|
||||
@@ -204,7 +206,7 @@ Welldims::Welldims(const Deck& deck)
|
||||
this->nCWMax = wd.getItem<WD::MAXCONN>().get<int>(0);
|
||||
this->nWGMax = wd.getItem<WD::MAX_GROUPSIZE>().get<int>(0);
|
||||
|
||||
// This is the E100 definition. E300 instead uses
|
||||
// Note: nGMax uses the E100 definition. E300 instead uses
|
||||
//
|
||||
// Max{ "MAXGROUPS", "MAXWELLS" }
|
||||
//
|
||||
@@ -212,11 +214,13 @@ Welldims::Welldims(const Deck& deck)
|
||||
this->nGMax = wd.getItem<WD::MAXGROUPS>().get<int>(0);
|
||||
this->nWMax = wd.getItem<WD::MAXWELLS>().get<int>(0);
|
||||
|
||||
// maximum number of well lists pr well
|
||||
this->nWlistPrWellMax = wd.getItem<WD::MAX_WELLIST_PR_WELL>().get<int>(0);
|
||||
//maximum number of dynamic well lists
|
||||
this->nDynWlistMax = wd.getItem<WD::MAX_DYNAMIC_WELLIST>().get<int>(0);
|
||||
// Maximum number of well lists pr well. Always at least 1.
|
||||
this->nWlistPrWellMax =
|
||||
std::max(WD::MAX_WELLIST_PR_WELL::defaultValue,
|
||||
wd.getItem<WD::MAX_WELLIST_PR_WELL>().get<int>(0));
|
||||
|
||||
// Maximum number of dynamic well lists
|
||||
this->nDynWlistMax = wd.getItem<WD::MAX_DYNAMIC_WELLIST>().get<int>(0);
|
||||
|
||||
this->m_location = keyword.location();
|
||||
}
|
||||
|
||||
@@ -64,18 +64,37 @@ BCComponent component(const std::string& s) {
|
||||
}
|
||||
}
|
||||
|
||||
BCConfig::BCFace::BCFace(const DeckRecord& record) :
|
||||
i1(record.getItem("I1").get<int>(0) - 1),
|
||||
i2(record.getItem("I2").get<int>(0) - 1),
|
||||
j1(record.getItem("J1").get<int>(0) - 1),
|
||||
j2(record.getItem("J2").get<int>(0) - 1),
|
||||
k1(record.getItem("K1").get<int>(0) - 1),
|
||||
k2(record.getItem("K2").get<int>(0) - 1),
|
||||
BCConfig::BCFace::BCFace(const DeckRecord& record, const GridDims& grid) :
|
||||
i1(0),
|
||||
i2(grid.getNX() - 1),
|
||||
j1(0),
|
||||
j2(grid.getNY() - 1),
|
||||
k1(0),
|
||||
k2(grid.getNZ() - 1),
|
||||
bctype(fromstring::bctype(record.getItem("TYPE").get<std::string>(0))),
|
||||
dir(FaceDir::FromString(record.getItem("DIRECTION").get<std::string>(0))),
|
||||
component(fromstring::component(record.getItem("COMPONENT").get<std::string>(0))),
|
||||
rate(record.getItem("RATE").getSIDouble(0))
|
||||
{
|
||||
using BC = ParserKeywords::BC;
|
||||
if (const auto& I1 = record.getItem<BC::I1>(); ! I1.defaultApplied(0)) {
|
||||
this->i1 = I1.get<int>(0) - 1;
|
||||
}
|
||||
if (const auto& I2 = record.getItem<BC::I2>(); ! I2.defaultApplied(0)) {
|
||||
this->i2 = I2.get<int>(0) - 1;
|
||||
}
|
||||
if (const auto& J1 = record.getItem<BC::J1>(); ! J1.defaultApplied(0)) {
|
||||
this->j1 = J1.get<int>(0) - 1;
|
||||
}
|
||||
if (const auto& J2 = record.getItem<BC::J2>(); ! J2.defaultApplied(0)) {
|
||||
this->j2 = J2.get<int>(0) - 1;
|
||||
}
|
||||
if (const auto& K1 = record.getItem<BC::K1>(); ! K1.defaultApplied(0)) {
|
||||
this->k1 = K1.get<int>(0) - 1;
|
||||
}
|
||||
if (const auto& K2 = record.getItem<BC::K2>(); ! K2.defaultApplied(0)) {
|
||||
this->k2 = K2.get<int>(0) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
BCConfig::BCFace BCConfig::BCFace::serializationTestObject()
|
||||
@@ -112,9 +131,10 @@ bool BCConfig::BCFace::operator==(const BCConfig::BCFace& other) const {
|
||||
|
||||
|
||||
BCConfig::BCConfig(const Deck& deck) {
|
||||
GridDims grid( deck );
|
||||
for (const auto& kw: deck.getKeywordList<ParserKeywords::BC>()) {
|
||||
for (const auto& record : *kw)
|
||||
this->m_faces.emplace_back( record );
|
||||
this->m_faces.emplace_back( record, grid );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
"name": "DATA",
|
||||
"value_type": "DOUBLE",
|
||||
"size_type": "ALL",
|
||||
"comment": "(given by the COMPS keyword). Fun!",
|
||||
"dimension": [
|
||||
"ContextDependent"
|
||||
"Temperature",
|
||||
"Viscosity"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
"value_type": "INT"
|
||||
},
|
||||
{
|
||||
"name": "TYPE",
|
||||
"name": "DIRECTION",
|
||||
"value_type": "STRING"
|
||||
},
|
||||
{
|
||||
"name": "DIRECTION",
|
||||
"name": "TYPE",
|
||||
"value_type": "STRING"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -287,12 +287,12 @@ void ECLRegressionTest::checkSpesificKeyword(std::vector<std::string>& keywords1
|
||||
std::vector<eclArrType>& arrayType2,
|
||||
const std::string& reference)
|
||||
{
|
||||
auto search1 = std::find(keywords1.begin(), keywords1.end(), spesificKeyword);
|
||||
auto search2 = std::find(keywords2.begin(), keywords2.end(), spesificKeyword);
|
||||
auto search1 = std::find(keywords1.begin(), keywords1.end(), specificKeyword);
|
||||
auto search2 = std::find(keywords2.begin(), keywords2.end(), specificKeyword);
|
||||
|
||||
if (search1 == keywords1.end() && search2 == keywords2.end()) {
|
||||
std::cout << "Testing specific keyword \"" << spesificKeyword << "\" in " << reference << ". Keyword not found in any of the cases ." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting spesific keyword \"" << spesificKeyword << "\" in " << reference << ". Keyword not found in any of the cases .");
|
||||
std::cout << "Testing specific keyword \"" << specificKeyword << "\" in " << reference << ". Keyword not found in any of the cases ." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting specific keyword \"" << specificKeyword << "\" in " << reference << ". Keyword not found in any of the cases .");
|
||||
}
|
||||
|
||||
eclArrType arrType;
|
||||
@@ -301,23 +301,23 @@ void ECLRegressionTest::checkSpesificKeyword(std::vector<std::string>& keywords1
|
||||
arrType = arrayType1[ind];
|
||||
|
||||
if (search2 == keywords2.end()) {
|
||||
std::cout << "Testing spesific kewyword in " << reference << ". Keyword found in fist case but not in second case." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting spesific kewyword in " << reference << ". Keyword found in fist case but not in second case.");
|
||||
std::cout << "Testing specific kewyword in " << reference << ". Keyword found in fist case but not in second case." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting specific kewyword in " << reference << ". Keyword found in fist case but not in second case.");
|
||||
}
|
||||
|
||||
keywords1.clear();
|
||||
arrayType1.clear();
|
||||
keywords1.push_back(spesificKeyword);
|
||||
keywords1.push_back(specificKeyword);
|
||||
arrayType1.push_back(arrType);
|
||||
|
||||
keywords2.clear();
|
||||
arrayType2.clear();
|
||||
keywords2.push_back(spesificKeyword);
|
||||
keywords2.push_back(specificKeyword);
|
||||
arrayType2.push_back(arrType);
|
||||
} else {
|
||||
if (search2 != keywords2.end()) {
|
||||
std::cout << "Testing spesific kewyword in " << reference << ". Keyword not found in fist case but found in second case." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting spesific kewyword in " << reference << ". Keyword not found in fist case but found in second case.");
|
||||
std::cout << "Testing specific kewyword in " << reference << ". Keyword not found in fist case but found in second case." << std::endl;
|
||||
OPM_THROW(std::runtime_error, "\nTesting specific kewyword in " << reference << ". Keyword not found in fist case but found in second case.");
|
||||
}
|
||||
|
||||
keywords1.clear();
|
||||
@@ -585,7 +585,7 @@ void ECLRegressionTest::results_init()
|
||||
} else {
|
||||
std::cout << "\nComparing init files \n" << std::endl;
|
||||
|
||||
if (spesificKeyword.empty()) {
|
||||
if (specificKeyword.empty()) {
|
||||
if (keywords1.size() == keywords2.size() && keywords1 != keywords2) {
|
||||
/*
|
||||
If the keywords come in different order in the two files
|
||||
@@ -693,23 +693,23 @@ void ECLRegressionTest::results_rst()
|
||||
|
||||
deviations.clear();
|
||||
|
||||
if (spesificSequence > -1) {
|
||||
auto search1 = std::find(seqnums1.begin(), seqnums1.end(), spesificSequence);
|
||||
auto search2 = std::find(seqnums2.begin(), seqnums2.end(), spesificSequence);
|
||||
if (specificSequence > -1) {
|
||||
auto search1 = std::find(seqnums1.begin(), seqnums1.end(), specificSequence);
|
||||
auto search2 = std::find(seqnums2.begin(), seqnums2.end(), specificSequence);
|
||||
|
||||
if (search1 == seqnums1.end()) {
|
||||
OPM_THROW(std::runtime_error, "\nSpecified sequence " << spesificSequence << " not found in restart files for case 1");
|
||||
OPM_THROW(std::runtime_error, "\nSpecified sequence " << specificSequence << " not found in restart files for case 1");
|
||||
}
|
||||
|
||||
if (search2 == seqnums2.end()) {
|
||||
OPM_THROW(std::runtime_error, "\nSpecified sequence " << spesificSequence << " not found in restart files for case 2");
|
||||
OPM_THROW(std::runtime_error, "\nSpecified sequence " << specificSequence << " not found in restart files for case 2");
|
||||
}
|
||||
|
||||
seqnums1.clear();
|
||||
seqnums1.push_back(spesificSequence);
|
||||
seqnums1.push_back(specificSequence);
|
||||
|
||||
seqnums2.clear();
|
||||
seqnums2.push_back(spesificSequence);
|
||||
seqnums2.push_back(specificSequence);
|
||||
|
||||
} else if (onlyLastSequence) {
|
||||
|
||||
@@ -791,7 +791,7 @@ void ECLRegressionTest::results_rst()
|
||||
if (printKeywordOnly) {
|
||||
printComparisonForKeywordLists(keywords1, keywords2, arrayType1, arrayType2);
|
||||
} else {
|
||||
if (spesificKeyword.empty()) {
|
||||
if (specificKeyword.empty()) {
|
||||
compareKeywords(keywords1, keywords2, reference);
|
||||
} else {
|
||||
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);
|
||||
@@ -946,7 +946,7 @@ void ECLRegressionTest::results_smry()
|
||||
printMissingKeywords(keywords1, keywords2);
|
||||
}
|
||||
} else {
|
||||
if (spesificKeyword.empty()) {
|
||||
if (specificKeyword.empty()) {
|
||||
compareKeywords(keywords1, keywords2, reference);
|
||||
} else {
|
||||
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);
|
||||
@@ -1114,7 +1114,7 @@ void ECLRegressionTest::results_rft()
|
||||
if (printKeywordOnly) {
|
||||
printComparisonForKeywordLists(keywords1, keywords2, arrayType1, arrayType2);
|
||||
} else {
|
||||
if (spesificKeyword.empty()) {
|
||||
if (specificKeyword.empty()) {
|
||||
compareKeywords(keywords1, keywords2, reference);
|
||||
} else {
|
||||
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);
|
||||
|
||||
@@ -80,10 +80,10 @@ public:
|
||||
}
|
||||
|
||||
void compareSpesificKeyword(std::string keyword) {
|
||||
this->spesificKeyword = std::move(keyword);
|
||||
this->specificKeyword = std::move(keyword);
|
||||
}
|
||||
void compareSpesificRstReportStepNumber(int seqn) {
|
||||
this->spesificSequence = seqn;
|
||||
this->specificSequence = seqn;
|
||||
}
|
||||
|
||||
void setLoadBaseRunData(bool loadArg) {
|
||||
@@ -177,11 +177,11 @@ private:
|
||||
|
||||
bool loadBaseRunData = false;
|
||||
|
||||
// spesific keyword to be compared
|
||||
std::string spesificKeyword;
|
||||
// specific keyword to be compared
|
||||
std::string specificKeyword;
|
||||
|
||||
// spesific restart sequence to be compared
|
||||
int spesificSequence = -1;
|
||||
// specific restart sequence to be compared
|
||||
int specificSequence = -1;
|
||||
|
||||
// Accept extra keywords in the restart file of the 'new' simulation.
|
||||
bool acceptExtraKeywords = false;
|
||||
|
||||
@@ -34,7 +34,7 @@ static void printHelp() {
|
||||
std::cout << "\nList all arrays found in an EclFile specified on the command line. \n\n"
|
||||
<< "\nThe program have one option which will only work on unified restart files:\n\n"
|
||||
<< "-h Print help and exit.\n"
|
||||
<< "-r List array for a spesific report time step number. Option only valid for a unified restart file. \n\n";
|
||||
<< "-r List array for a specific report time step number. Option only valid for a unified restart file. \n\n";
|
||||
}
|
||||
|
||||
void print_array_list(const std::vector<EclEntry>& array_list, const std::vector<int>& element_size)
|
||||
|
||||
@@ -42,14 +42,14 @@ static void printHelp() {
|
||||
<< "-l Only do comparison for the last Report Step. This option is only valid for restart files.\n"
|
||||
<< "-n Do not throw on errors.\n"
|
||||
<< "-p Print keywords in both cases and exit.\n"
|
||||
<< "-r compare a spesific report time step number in a restart file.\n"
|
||||
<< "-r compare a specific report time step number in a restart file.\n"
|
||||
<< "-t Specify ECLIPSE filetype to compare, (default behaviour is that all files are compared if found). Different possible arguments are:\n"
|
||||
<< " -t UNRST \t Compare two unified restart files (.UNRST). This the default value, so it is the same as not passing option -t.\n"
|
||||
<< " -t EGRID \t Compare two EGrid files (.EGRID).\n"
|
||||
<< " -t INIT \t Compare two initial files (.INIT).\n"
|
||||
<< " -t RFT \t Compare two RFT files (.RFT).\n"
|
||||
<< " -t SMRY \t Compare two cases consistent of (unified) summary files.\n"
|
||||
<< " -t RSM \t Compare RSM file agaist a summary file.\n"
|
||||
<< " -t RSM \t Compare RSM file against a summary file.\n"
|
||||
<< "-x Allow extra keywords in case number 2. These additional keywords (not found in case number1) will be ignored in the comparison.\n"
|
||||
<< "\nExample usage of the program: \n\n"
|
||||
<< "compareECL -k PRESSURE <path to first casefile> <path to second casefile> 1e-3 1e-5\n"
|
||||
@@ -216,7 +216,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
if (integrationTest && specificFileType) {
|
||||
if (fileTypeString=="EGRID" || fileTypeString=="INIT" || fileTypeString=="RFT") {
|
||||
std::cerr << "Integration test and spesific file type, only valid for UNRST and SMRY" << std::endl;
|
||||
std::cerr << "Integration test and specific file type, only valid for UNRST and SMRY" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ static void printHelp() {
|
||||
<< "-h Print help and exit.\n"
|
||||
<< "-l List report step numbers in the selected restart file.\n"
|
||||
<< "-i Enforce IX standard on output file.\n"
|
||||
<< "-r Extract and convert a spesific report time step number from a unified restart file. \n\n";
|
||||
<< "-r Extract and convert a specific report time step number from a unified restart file. \n\n";
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
@@ -434,6 +434,55 @@ WELLDIMS
|
||||
BOOST_CHECK_EQUAL(wd.maxGroupsInField(), 0); // WELLDIMS(3), defaulted
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Dflt)
|
||||
{
|
||||
const auto input = std::string { R"(
|
||||
RUNSPEC
|
||||
|
||||
WELLDIMS
|
||||
/
|
||||
)" };
|
||||
|
||||
const auto wd = Welldims {
|
||||
Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 1); // WELLDIMS(11), defaulted
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Assigned)
|
||||
{
|
||||
const auto input = std::string { R"(
|
||||
RUNSPEC
|
||||
|
||||
WELLDIMS
|
||||
10* 5 /
|
||||
)" };
|
||||
|
||||
const auto wd = Welldims {
|
||||
Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 5); // WELLDIMS(11), assigned
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WELLDIMS_MaxWList_Zero)
|
||||
{
|
||||
const auto input = std::string { R"(
|
||||
RUNSPEC
|
||||
|
||||
WELLDIMS
|
||||
10* 0 /
|
||||
)" };
|
||||
|
||||
const auto wd = Welldims {
|
||||
Parser{}.parseString(input)
|
||||
};
|
||||
|
||||
// WELLDIMS(11) assigned but reset to at least 1.
|
||||
BOOST_CHECK_EQUAL(wd.maxWellListsPrWell(), 1);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WSEGDIMS_NotSpecified)
|
||||
{
|
||||
const auto input = std::string {
|
||||
|
||||
@@ -51,7 +51,6 @@ const std::string& inputStr = "RUNSPEC\n"
|
||||
"EQLNUM\n"
|
||||
"10*1 10*2 100*3 /\n "
|
||||
"\n"
|
||||
|
||||
"SOLUTION\n"
|
||||
"THPRES\n"
|
||||
"1 2 12.0/\n"
|
||||
@@ -62,7 +61,6 @@ const std::string& inputStr = "RUNSPEC\n"
|
||||
|
||||
|
||||
const std::string& inputStr_noTHPRES = "RUNSPEC\n"
|
||||
"EQLOPTS\n"
|
||||
"DIMENS\n"
|
||||
"10 3 4 /\n"
|
||||
"\n"
|
||||
@@ -75,12 +73,16 @@ const std::string& inputStr_noTHPRES = "RUNSPEC\n"
|
||||
"\n";
|
||||
|
||||
const std::string& inputStr_cpr = "RUNSPEC\n"
|
||||
"DIMENS\n"
|
||||
"10 3 4 /\n"
|
||||
"CPR\n"
|
||||
"/\n"
|
||||
"SUMMARY\n";
|
||||
|
||||
|
||||
const std::string& inputStr_INVALID = "RUNSPEC\n"
|
||||
"DIMENS\n"
|
||||
"10 3 4 /\n"
|
||||
"CPR\n"
|
||||
"WEll 10 10 17/"
|
||||
"/\n"
|
||||
@@ -88,11 +90,16 @@ const std::string& inputStr_INVALID = "RUNSPEC\n"
|
||||
|
||||
|
||||
|
||||
const std::string& inputStr_cpr_in_SUMMARY = "SUMMARY\n"
|
||||
const std::string& inputStr_cpr_in_SUMMARY = "RUNSPEC\n"
|
||||
"DIMENS\n"
|
||||
"10 3 4 /\n"
|
||||
"SUMMARY\n"
|
||||
"CPR\n"
|
||||
"well1 10 27 10/\n/\n";
|
||||
|
||||
const std::string& inputStr_cpr_BOTH = "RUNSPEC\n"
|
||||
"DIMENS\n"
|
||||
"10 3 4 /\n"
|
||||
"CPR\n"
|
||||
"/\n"
|
||||
"SUMMARY\n"
|
||||
|
||||
@@ -499,18 +499,18 @@ BOOST_AUTO_TEST_CASE(results_init_1) {
|
||||
// should fail, even though using accept extra keywords option
|
||||
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
|
||||
|
||||
// check with spesific kewyword PORV, found in both cases and should be ok
|
||||
// check with specific kewyword PORV, found in both cases and should be ok
|
||||
test1a.setAcceptExtraKeywords(false);
|
||||
test1a.compareSpesificKeyword("PORV");
|
||||
|
||||
test1a.results_init();
|
||||
|
||||
// check with spesific kewyword PORO, found in second case only, should throw exeption
|
||||
// check with specific kewyword PORO, found in second case only, should throw exeption
|
||||
test1a.compareSpesificKeyword("PORO");
|
||||
|
||||
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
|
||||
|
||||
// check with spesific kewyword not found in any of the cases, should throw exeption
|
||||
// check with specific kewyword not found in any of the cases, should throw exeption
|
||||
test1a.compareSpesificKeyword("XXXXX");
|
||||
|
||||
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
|
||||
@@ -723,20 +723,20 @@ BOOST_AUTO_TEST_CASE(results_unrst_1) {
|
||||
test2a.setAcceptExtraKeywords(true);
|
||||
test2a.results_rst();
|
||||
|
||||
// checking for spesific keyword PRESSURE, found in both cases
|
||||
// checking for specific keyword PRESSURE, found in both cases
|
||||
test2a.setAcceptExtraKeywords(false);
|
||||
test2a.compareSpesificKeyword("PRESSURE");
|
||||
|
||||
// test should be ok
|
||||
test2a.results_rst();
|
||||
|
||||
// checking for spesific keyword RS, only present in one of the cases
|
||||
// checking for specific keyword RS, only present in one of the cases
|
||||
test2a.compareSpesificKeyword("RS");
|
||||
|
||||
// should fail
|
||||
BOOST_CHECK_THROW(test2a.results_rst(),std::runtime_error);
|
||||
|
||||
// checking for spesific keyword XXXX, not found in any of the cases
|
||||
// checking for specific keyword XXXX, not found in any of the cases
|
||||
test2a.compareSpesificKeyword("XXXX");
|
||||
|
||||
// should fail
|
||||
@@ -926,7 +926,7 @@ BOOST_AUTO_TEST_CASE(results_unrst_3) {
|
||||
ECLRegressionTest test2("TMP1", "TMP2", 1e-3, 1e-3);
|
||||
BOOST_CHECK_THROW(test2.results_rst(),std::runtime_error);
|
||||
|
||||
// check spesific keyword RS, should be OK
|
||||
// check specific keyword RS, should be OK
|
||||
|
||||
test2.compareSpesificKeyword("RS");
|
||||
test2.results_rst();
|
||||
@@ -1231,7 +1231,7 @@ BOOST_AUTO_TEST_CASE(results_rft_1) {
|
||||
|
||||
test1b.results_rft();
|
||||
|
||||
// accept extra keyword to false, but check for spesific keyword (PRESSSURE)
|
||||
// accept extra keyword to false, but check for specific keyword (PRESSSURE)
|
||||
|
||||
test1b.setAcceptExtraKeywords(false);
|
||||
test1b.compareSpesificKeyword("PRESSURE");
|
||||
|
||||
Reference in New Issue
Block a user