Add parser support for water induced rock compaction (#676)

Add support for water induced rock compaction
This commit is contained in:
Tor Harald Sandve
2019-03-18 17:08:38 +01:00
committed by Joakim Hove
parent 5421efd79d
commit daa67dc8d6
16 changed files with 566 additions and 4 deletions

View File

@@ -124,6 +124,8 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
src/opm/parser/eclipse/EclipseState/Tables/Rock2dTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.cpp
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.cpp
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParser.cpp
@@ -236,6 +238,7 @@ if(ENABLE_ECL_INPUT)
tests/parser/PORVTests.cpp
tests/parser/RawKeywordTests.cpp
tests/parser/RestartConfigTests.cpp
tests/parser/RockTableTests.cpp
tests/parser/RunspecTests.cpp
tests/parser/SatfuncPropertyInitializersTests.cpp
tests/parser/ScheduleTests.cpp
@@ -467,6 +470,10 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp
opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp
opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp
opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp
opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp
opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp
opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp
opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp

View File

@@ -0,0 +1,38 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_PARSER_OVERBURD_TABLE_HPP
#define OPM_PARSER_OVERBURD_TABLE_HPP
#include "SimpleTable.hpp"
namespace Opm {
class DeckItem;
class OverburdTable : public SimpleTable {
public:
OverburdTable( const DeckItem& item );
const TableColumn& getDepthColumn() const;
const TableColumn& getOverburdenPressureColumn() const;
};
}
#endif

View File

@@ -0,0 +1,46 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_PARSER_ROCK2D_TABLE_HPP
#define OPM_PARSER_ROCK2D_TABLE_HPP
#include <vector>
namespace Opm {
class DeckKeyword;
class Rock2dTable {
public:
Rock2dTable();
void init(const Opm::DeckRecord& record, size_t tableIdx);
size_t size() const;
size_t sizeMultValues() const;
double getPressureValue(size_t index) const;
double getPvmultValue(size_t pressureIndex, size_t saturationIndex ) const;
protected:
std::vector< std::vector <double> > m_pvmultValues;
std::vector< double > m_pressureValues;
};
}
#endif

View File

@@ -0,0 +1,45 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_PARSER_ROCK2DTR_TABLE_HPP
#define OPM_PARSER_ROCK2DTR_TABLE_HPP
#include <vector>
namespace Opm {
class DeckKeyword;
class Rock2dtrTable {
public:
Rock2dtrTable();
void init(const Opm::DeckRecord& record, size_t tableIdx);
size_t size() const;
size_t sizeMultValues() const;
double getPressureValue(size_t index) const;
double getTransMultValue(size_t pressureIndex, size_t saturationIndex ) const;
protected:
std::vector< std::vector <double> > m_transMultValues;
std::vector< double > m_pressureValues;
};
}
#endif

View File

@@ -0,0 +1,36 @@
/*
Copyright (C) 2019 Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_PARSER_ROCKWNOD_TABLE_HPP
#define OPM_PARSER_ROCKWNOD_TABLE_HPP
#include "SimpleTable.hpp"
namespace Opm {
class DeckItem;
class RockwnodTable : public SimpleTable {
public:
RockwnodTable( const DeckItem& item );
const TableColumn& getSaturationColumn() const;
};
}
#endif

View File

@@ -33,6 +33,8 @@
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp> // Phase::PhaseEnum
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp>
@@ -118,6 +120,11 @@ namespace Opm {
const std::vector<PvtgTable>& getPvtgTables() const;
const std::vector<PvtoTable>& getPvtoTables() const;
const std::vector<Rock2dTable>& getRock2dTables() const;
const std::vector<Rock2dtrTable>& getRock2dtrTables() const;
const TableContainer& getRockwnodTables() const;
const TableContainer& getOverburdTables() const;
const PvtwTable& getPvtwTable() const;
const PvcdoTable& getPvcdoTable() const;
const DensityTable& getDensityTable() const;
@@ -161,7 +168,42 @@ namespace Opm {
void initSkprwatTables(const Deck& deck);
void initSkprpolyTables(const Deck& deck);
//void initRockTables(const Deck& deck, const std::string& keywordName);
template <class TableType>
void initRockTables(const Deck& deck, const std::string& keywordName, std::vector<TableType>& rocktable ) {
if (!deck.hasKeyword(keywordName))
return;
if (!deck.hasKeyword("ROCKCOMP")) {
OpmLog::error("ROCKCOMP must be present if ROCK2DTR is used");
}
if (!deck.hasKeyword("ROCKWNOD")) {
OpmLog::error("ROCKWNOD must be present if ROCK2DTR is used");
}
const auto& rockcompKeyword = deck.getKeyword("ROCKCOMP");
const auto& record = rockcompKeyword.getRecord( 0 );
size_t numTables = record.getItem("NTROCC").get< int >(0);
rocktable.resize(numTables);
const auto& keyword = deck.getKeyword(keywordName);
size_t numEntries = keyword.size();
size_t regionIdx = 0;
size_t tableIdx = 0;
for (unsigned lineIdx = 0; lineIdx < numEntries; ++lineIdx) {
if (keyword.getRecord(lineIdx).getItem("PRESSURE").size() > 0) {
rocktable[regionIdx].init(keyword.getRecord(lineIdx), tableIdx);
tableIdx++;
} else { // next region
tableIdx = 0;
regionIdx++;
}
}
assert(regionIdx == numTables - 1 );
}
/**
@@ -291,7 +333,9 @@ namespace Opm {
std::map<std::string , TableContainer> m_simpleTables;
std::vector<PvtgTable> m_pvtgTables;
std::vector<PvtoTable> m_pvtoTables;
PvtwTable m_pvtwTable;
std::vector<Rock2dTable> m_rock2dTables;
std::vector<Rock2dtrTable> m_rock2dtrTables;
PvtwTable m_pvtwTable;
PvcdoTable m_pvcdoTable;
DensityTable m_densityTable;
RockTable m_rockTable;

View File

@@ -0,0 +1,59 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <vector>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
namespace Opm {
Rock2dTable::Rock2dTable()
{
}
void Rock2dTable::init(const DeckRecord& record, size_t tableIdx)
{
m_pressureValues.push_back(record.getItem("PRESSURE").getSIDoubleData()[0]);
m_pvmultValues.push_back(record.getItem("PVMULT").getSIDoubleData());
}
size_t Rock2dTable::size() const
{
return m_pressureValues.size();
}
size_t Rock2dTable::sizeMultValues() const
{
return m_pvmultValues[0].size();
}
double Rock2dTable::getPressureValue(size_t index) const
{
return m_pressureValues[index];
}
double Rock2dTable::getPvmultValue(size_t pressureIndex, size_t saturationIndex) const
{
return m_pvmultValues[pressureIndex][saturationIndex];
}
}

View File

@@ -0,0 +1,59 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <vector>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
namespace Opm {
Rock2dtrTable::Rock2dtrTable()
{
}
void Rock2dtrTable::init(const DeckRecord& record, size_t tableIdx)
{
m_pressureValues.push_back(record.getItem("PRESSURE").getSIDoubleData()[0]);
m_transMultValues.push_back(record.getItem("TRANSMULT").getSIDoubleData());
}
size_t Rock2dtrTable::size() const
{
return m_pressureValues.size();
}
size_t Rock2dtrTable::sizeMultValues() const
{
return m_transMultValues[0].size();
}
double Rock2dtrTable::getPressureValue(size_t index) const
{
return m_pressureValues[index];
}
double Rock2dtrTable::getTransMultValue(size_t pressureIndex, size_t saturationIndex) const
{
return m_transMultValues[pressureIndex][saturationIndex];
}
}

View File

@@ -57,6 +57,8 @@
#include <opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PbvdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PdvdTable.hpp>
@@ -132,6 +134,13 @@ namespace Opm {
m_rtemp = deck.getKeyword("RTEMP").getRecord(0).getItem("TEMP").getSIDouble( 0 );
else if (deck.hasKeyword( "RTEMPA" ) )
m_rtemp = deck.getKeyword("RTEMPA").getRecord(0).getItem("TEMP").getSIDouble( 0 );
if ( deck.hasKeyword( "ROCK2D") )
initRockTables(deck, "ROCK2D", m_rock2dTables );
if ( deck.hasKeyword( "ROCK2DTR") )
initRockTables(deck, "ROCK2DTR", m_rock2dtrTables );
}
void TableManager::initDims(const Deck& deck) {
@@ -274,6 +283,8 @@ namespace Opm {
numRocktabTables = static_cast<size_t>(record.getItem<ParserKeywords::ROCKCOMP::NTROCC>().get< int >(0));
}
addTables( "ROCKTAB", numRocktabTables);
addTables( "ROCKWNOD", numRocktabTables);
addTables( "OVERBURD", numRocktabTables);
}
@@ -325,6 +336,17 @@ namespace Opm {
initSimpleTableContainer<TlpmixpaTable>(deck, "TLPMIXPA", numMiscibleTables);
}
{
size_t numRocktabTables = ParserKeywords::ROCKCOMP::NTROCC::defaultValue;
if (deck.hasKeyword<ParserKeywords::ROCKCOMP>()) {
const auto& keyword = deck.getKeyword<ParserKeywords::ROCKCOMP>();
const auto& record = keyword.getRecord(0);
numRocktabTables = static_cast<size_t>(record.getItem<ParserKeywords::ROCKCOMP::NTROCC>().get< int >(0));
}
initSimpleTableContainer<RockwnodTable>(deck, "ROCKWNOD", numRocktabTables);
initSimpleTableContainer<OverburdTable>(deck, "OVERBURD", numRocktabTables);
}
initSimpleTableContainer<PvdgTable>(deck, "PVDG", m_tabdims.getNumPVTTables());
initSimpleTableContainer<PvdoTable>(deck, "PVDO", m_tabdims.getNumPVTTables());
@@ -574,11 +596,9 @@ namespace Opm {
std::shared_ptr<RocktabTable> table = std::make_shared<RocktabTable>( dataItem , isDirectional, useStressOption );
container.addTable( tableIdx , table );
}
}
}
}
size_t TableManager::numFIPRegions() const {
size_t ntfip = m_tabdims.getNumFIPRegions();
if (m_regdims->getNTFIP( ) > ntfip)
@@ -756,6 +776,22 @@ namespace Opm {
return m_pvtoTables;
}
const std::vector<Rock2dTable>& TableManager::getRock2dTables() const {
return m_rock2dTables;
}
const std::vector<Rock2dtrTable>& TableManager::getRock2dtrTables() const {
return m_rock2dtrTables;
}
const TableContainer& TableManager::getRockwnodTables() const {
return getTables("ROCKWNOD");
}
const TableContainer& TableManager::getOverburdTables() const {
return getTables("OVERBURD");
}
const PvtwTable& TableManager::getPvtwTable() const {
return this->m_pvtwTable;
}

View File

@@ -52,6 +52,8 @@
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp>
@@ -1134,6 +1136,29 @@ const TableColumn& MsfnTable::getOilRelpermMultiplierColumn() const {
return SimpleTable::getColumn(2);
}
RockwnodTable::RockwnodTable( const DeckItem& item ) {
m_schema.addColumn( ColumnSchema( "Saturation" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) );
SimpleTable::init( item );
}
const TableColumn& RockwnodTable::getSaturationColumn() const {
return SimpleTable::getColumn(0);
}
OverburdTable::OverburdTable( const DeckItem& item ) {
m_schema.addColumn( ColumnSchema( "Depth" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) );
m_schema.addColumn( ColumnSchema( "OverburdenPressure" , Table::STRICTLY_INCREASING , Table::DEFAULT_NONE) );
SimpleTable::init( item );
}
const TableColumn& OverburdTable::getDepthColumn() const {
return SimpleTable::getColumn(0);
}
const TableColumn& OverburdTable::getOverburdenPressureColumn() const {
return SimpleTable::getColumn(1);
}
namespace {
/*

View File

@@ -0,0 +1,6 @@
{"name" : "OVERBURD" , "sections" : ["PROPS"], "size" : {"keyword" : "ROCKCOMP" , "item" : "NTROCC"},
"items" : [
{"name":"DEPTH", "value_type" : "DOUBLE", "size_type" : "ALL" , "dimension":"Length" },
{"name":"OVERBURDENPRESSURE", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : "Pressure"}
]
}

View File

@@ -0,0 +1,6 @@
{"name" : "ROCK2D" , "sections" : ["PROPS"], "num_tables" : {"keyword" : "ROCKCOMP" , "item" : "NTROCC"},
"items" : [
{"name":"PRESSURE", "value_type" : "DOUBLE", "dimension":"Pressure" },
{"name":"PVMULT", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : "1"}
]
}

View File

@@ -0,0 +1,6 @@
{"name" : "ROCK2DTR" , "sections" : ["PROPS"], "num_tables" : {"keyword" : "ROCKCOMP" , "item" : "NTROCC"} ,
"items" : [
{"name":"PRESSURE", "value_type" : "DOUBLE", "dimension":"Pressure" },
{"name":"TRANSMULT", "value_type":"DOUBLE", "size_type" : "ALL" , "dimension" : "1"}
]
}

View File

@@ -0,0 +1,5 @@
{"name" : "ROCKWNOD" , "sections" : ["PROPS"], "size" : {"keyword" : "ROCKCOMP" , "item" : "NTROCC"},
"items" : [
{"name":"SATURATION", "value_type" : "DOUBLE", "size_type" : "ALL", "dimension":"1" }
]
}

View File

@@ -198,6 +198,7 @@ set( keywords
000_Eclipse100/O/OPERNUM
000_Eclipse100/O/OPTIONS
000_Eclipse100/O/OUTRAD
000_Eclipse100/O/OVERBURD
000_Eclipse100/P/PARALLEL
000_Eclipse100/P/PATHS
000_Eclipse100/P/PBVD
@@ -254,10 +255,13 @@ set( keywords
000_Eclipse100/R/RESTART
000_Eclipse100/R/RKTRMDIR
000_Eclipse100/R/ROCK
000_Eclipse100/R/ROCK2D
000_Eclipse100/R/ROCK2DTR
000_Eclipse100/R/ROCKCOMP
000_Eclipse100/R/ROCKNUM
000_Eclipse100/R/ROCKOPTS
000_Eclipse100/R/ROCKTAB
000_Eclipse100/R/ROCKWNOD
000_Eclipse100/R/RPTGRID
000_Eclipse100/R/RPTONLY
000_Eclipse100/R/RPTONLYO

View File

@@ -0,0 +1,140 @@
/*
Copyright (C) 2019 by Norce
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#define BOOST_TEST_MODULE RockTableTests
#include <boost/test/unit_test.hpp>
#include <opm/parser/eclipse/Parser/ParserKeywords/P.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
// generic table classes
#include <opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
// keyword specific table classes
//#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
#include <stdexcept>
#include <iostream>
using namespace Opm;
BOOST_AUTO_TEST_CASE( Rock2d ) {
const char *input =
"TABDIMS\n"
"1 1 /\n"
"\n"
"ROCKCOMP\n"
" REVERS 2 /\n"
"\n"
"OVERBURD\n"
"1 1.0\n"
"10 2.0\n"
" / \n"
"1 1.0\n"
"10 2.0\n"
" / \n"
"ROCK2D\n"
" 0.0 0.01\n"
" 0.02\n"
" 0.03 / \n"
"10.0 0.11 \n"
" 0.12 \n"
" 0.13/ \n"
"20.0 0.21\n"
" 0.22\n"
" 0.23/\n"
" / \n"
"0.7 0.04 \n"
" 0.05 /\n"
"10.0 0.14\n"
" 0.15/\n"
"20.0 0.24\n"
" 0.25/\n"
" / \n"
"ROCK2DTR\n"
" 0.0 0.01\n"
" 0.02\n"
" 0.03 / \n"
"10.0 0.11 \n"
" 0.12 \n"
" 0.13/ \n"
"20.0 0.21\n"
" 0.22\n"
" 0.23/\n"
" / \n"
"0.7 0.04 \n"
" 0.05 /\n"
"10.0 0.14\n"
" 0.15/\n"
"20.0 0.24\n"
" 0.25/\n"
" / \n"
"ROCKWNOD\n"
"0.0\n"
"0.5\n"
"1.0 /\n"
"0.9\n"
"1.0 /\n"
"\n";
auto deck = Parser().parseString( input );
TableManager tables( deck );
const auto& rock2d = tables.getRock2dTables();
const auto& rock2dtr = tables.getRock2dtrTables();
const auto& rockwnod = tables.getRockwnodTables();
const auto& overburd = tables.getOverburdTables();
const auto& rec1 = rock2d[0];
const auto& rec2 = rock2d.at(1);
const auto& rec1tr = rock2dtr[0];
const RockwnodTable& rockwnodTable1 = rockwnod.getTable<RockwnodTable>(0);
const RockwnodTable& rockwnodTable2 = rockwnod.getTable<RockwnodTable>(1);
const OverburdTable& overburdTable = overburd.getTable<OverburdTable>(0);
BOOST_CHECK_THROW( rock2d.at(2), std::out_of_range );
BOOST_REQUIRE_EQUAL(3, rec1.size());
BOOST_REQUIRE_EQUAL(3, rec2.size());
BOOST_REQUIRE_EQUAL(0.0, rec1.getPressureValue(0));
BOOST_REQUIRE_EQUAL(0.13, rec1.getPvmultValue(1,2));
BOOST_REQUIRE_EQUAL(rec1.sizeMultValues(), rockwnodTable1.getSaturationColumn().size());
BOOST_REQUIRE_EQUAL(rec2.sizeMultValues(), rockwnodTable2.getSaturationColumn().size());
BOOST_REQUIRE_EQUAL(0.0, rockwnodTable1.getSaturationColumn()[0]);
BOOST_REQUIRE_EQUAL(1, overburdTable.getDepthColumn()[0]);
BOOST_REQUIRE_EQUAL(1.0, overburdTable.getOverburdenPressureColumn()[0]);
BOOST_REQUIRE_EQUAL(0.0, rec1tr.getPressureValue(0));
BOOST_REQUIRE_EQUAL(0.13, rec1tr.getTransMultValue(1,2));
//BOOST_CHECK_CLOSE( 2, rec1.size() , 1e-5 );
}