updates of ERst api, supports multiple occurrences of array names
This commit is contained in:
@@ -195,7 +195,7 @@ void checkRestartFile( int timeStepIdx ) {
|
||||
const auto& knownVec = rstFile.listOfRstArrays(i);
|
||||
|
||||
if (keywordExists(knownVec, "PRESSURE")) {
|
||||
const auto& press = rstFile.getRst<float>("PRESSURE", i);
|
||||
const auto& press = rstFile.getRst<float>("PRESSURE", i, 0);
|
||||
for( auto& x : sol.data("PRESSURE") )
|
||||
x /= Metric::Pressure;
|
||||
|
||||
@@ -203,22 +203,22 @@ void checkRestartFile( int timeStepIdx ) {
|
||||
}
|
||||
|
||||
if (keywordExists(knownVec, "SWAT")) {
|
||||
const auto& swat = rstFile.getRst<float>("SWAT", i);
|
||||
const auto& swat = rstFile.getRst<float>("SWAT", i, 0);
|
||||
compareErtData( sol.data("SWAT"), swat, 1e-4 );
|
||||
}
|
||||
|
||||
if (keywordExists(knownVec, "SGAS")) {
|
||||
const auto& sgas = rstFile.getRst<float>("SGAS", i);
|
||||
const auto& sgas = rstFile.getRst<float>("SGAS", i, 0);
|
||||
compareErtData( sol.data("SGAS"), sgas, 1e-4 );
|
||||
}
|
||||
|
||||
if (keywordExists(knownVec, "KRO")) {
|
||||
const auto& kro = rstFile.getRst<float>("KRO", i);
|
||||
const auto& kro = rstFile.getRst<float>("KRO", i, 0);
|
||||
BOOST_CHECK_CLOSE(1.0 * i * kro.size(), sum(kro), 1.0e-8);
|
||||
}
|
||||
|
||||
if (keywordExists(knownVec, "KRG")) {
|
||||
const auto& krg = rstFile.getRst<float>("KRG", i);
|
||||
const auto& krg = rstFile.getRst<float>("KRG", i, 0);
|
||||
BOOST_CHECK_CLOSE(10.0 * i * krg.size(), sum(krg), 1.0e-8);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user