mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update opm-common based on 2020.04 branch
Use branch https://github.com/CeetronSolutions/opm-common/commits/windows-fixes-2020.04 Update from 34ff4827569bb04190743e7aae3404794ccd188a
This commit is contained in:
parent
011174153e
commit
df2a6fb9d9
@ -100,11 +100,8 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Condition.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/State.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.cpp
|
||||
@ -118,12 +115,9 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Branch.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Node.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RPTConfig.cpp
|
||||
@ -161,7 +155,6 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TLMixpar.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
|
||||
@ -169,7 +162,6 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp
|
||||
@ -199,6 +191,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/Units/Dimension.cpp
|
||||
src/opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/parser/eclipse/Utility/Functional.cpp
|
||||
src/opm/parser/eclipse/Utility/Stringview.cpp
|
||||
)
|
||||
|
||||
|
||||
@ -343,7 +336,6 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/MultiRegTests.cpp
|
||||
tests/parser/MultisegmentWellTests.cpp
|
||||
tests/parser/MULTREGTScannerTests.cpp
|
||||
tests/parser/NetworkTests.cpp
|
||||
tests/parser/OrderedMapTests.cpp
|
||||
tests/parser/ParseContextTests.cpp
|
||||
tests/parser/ParseContext_EXIT1.cpp
|
||||
@ -393,7 +385,6 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/test_AggregateConnectionData.cpp
|
||||
tests/test_AggregateUDQData.cpp
|
||||
tests/test_ArrayDimChecker.cpp
|
||||
tests/test_data_GuideRateValue.cpp
|
||||
tests/test_EclipseIO.cpp
|
||||
tests/test_DoubHEAD.cpp
|
||||
tests/test_InteHEAD.cpp
|
||||
@ -437,8 +428,6 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/SPE1CASE1A.SMSPEC
|
||||
tests/SPE9_CP_PACKED.DATA
|
||||
tests/SOFR_TEST.DATA
|
||||
tests/UDQ_BASE.DATA
|
||||
tests/UDQ_RESTART.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
tests/UDQ_ACTIONX_TEST1_U.DATA
|
||||
@ -487,8 +476,6 @@ if(ENABLE_ECL_INPUT)
|
||||
#examples/opmi.cpp
|
||||
#examples/opmpack.cpp
|
||||
#examples/opmhash.cpp
|
||||
#examples/wellgraph.cpp
|
||||
#examples/make_lodsmry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -501,7 +488,6 @@ if(ENABLE_ECL_INPUT)
|
||||
examples/opmi.cpp
|
||||
examples/opmpack.cpp
|
||||
examples/opmhash.cpp
|
||||
examples/make_lodsmry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -548,6 +534,7 @@ if(ENABLE_ECL_INPUT)
|
||||
list(APPEND PUBLIC_HEADER_FILES
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/json/JsonObject.hpp
|
||||
opm/parser/eclipse/Utility/Stringview.hpp
|
||||
opm/parser/eclipse/Utility/Functional.hpp
|
||||
opm/parser/eclipse/Utility/Typetools.hpp
|
||||
opm/parser/eclipse/Generator/KeywordGenerator.hpp
|
||||
@ -603,11 +590,8 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
|
||||
@ -617,7 +601,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TLMixpar.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp
|
||||
@ -627,8 +610,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/JFunc.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp
|
||||
@ -685,12 +666,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/Condition.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Branch.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Node.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp
|
||||
@ -717,7 +693,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp
|
||||
@ -733,8 +708,8 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.hpp
|
||||
@ -789,10 +764,9 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/io/eclipse/rst/well.hpp
|
||||
opm/output/data/Aquifer.hpp
|
||||
opm/output/data/Cells.hpp
|
||||
opm/output/data/GuideRateValue.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/data/Solution.hpp
|
||||
opm/output/data/Wells.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/eclipse/VectorItems/aquifer.hpp
|
||||
opm/output/eclipse/VectorItems/connection.hpp
|
||||
opm/output/eclipse/VectorItems/group.hpp
|
||||
@ -837,6 +811,5 @@ endif()
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
list( APPEND PUBLIC_HEADER_FILES
|
||||
cross-platform/windows/Substitutes.hpp
|
||||
cross-platform/PortableEndian.hpp
|
||||
)
|
||||
endif()
|
||||
|
@ -1952,13 +1952,11 @@ GLIFTOPT::GLIFTOPT( ) : ParserKeyword("GLIFTOPT")
|
||||
{
|
||||
ParserItem item("MAX_LIFT_GAS_SUPPLY", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(-100000000000000000000.000000) );
|
||||
item.push_backDimension("GasSurfaceVolume/Time");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("MAX_TOTAL_GAS_RATE", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(-100000000000000000000.000000) );
|
||||
item.push_backDimension("GasSurfaceVolume/Time");
|
||||
record.addItem(item);
|
||||
}
|
||||
addRecord( record );
|
||||
@ -2168,7 +2166,6 @@ GPMAINT::GPMAINT( ) : ParserKeyword("GPMAINT")
|
||||
}
|
||||
{
|
||||
ParserItem item("FIP_FAMILY", ParserItem::itype::STRING);
|
||||
item.setDefault( std::string("FIPNUM") );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
@ -2194,7 +2191,6 @@ const std::string GPMAINT::GROUP::itemName = "GROUP";
|
||||
const std::string GPMAINT::FLOW_TARGET::itemName = "FLOW_TARGET";
|
||||
const std::string GPMAINT::REGION::itemName = "REGION";
|
||||
const std::string GPMAINT::FIP_FAMILY::itemName = "FIP_FAMILY";
|
||||
const std::string GPMAINT::FIP_FAMILY::defaultValue = "FIPNUM";
|
||||
const std::string GPMAINT::PRESSURE_TARGET::itemName = "PRESSURE_TARGET";
|
||||
const std::string GPMAINT::PROP_CONSTANT::itemName = "PROP_CONSTANT";
|
||||
const std::string GPMAINT::TIME_CONSTANT::itemName = "TIME_CONSTANT";
|
||||
|
@ -310,18 +310,15 @@ LIFTOPT::LIFTOPT( ) : ParserKeyword("LIFTOPT")
|
||||
ParserRecord record;
|
||||
{
|
||||
ParserItem item("INCREMENT_SIZE", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("GasSurfaceVolume/Time");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("MIN_ECONOMIC_GRADIENT", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("LiquidSurfaceVolume/GasSurfaceVolume");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("MIN_INTERVAL_BETWEEN_GAS_LIFT_OPTIMIZATIONS", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(0) );
|
||||
item.push_backDimension("Time");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
|
@ -625,11 +625,6 @@ NODEPROP::NODEPROP( ) : ParserKeyword("NODEPROP")
|
||||
item.setDefault( std::string("NO") );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("ADD_GAS_LIFT_GAS", ParserItem::itype::STRING);
|
||||
item.setDefault( std::string("NO") );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("CHOKE_GROUP", ParserItem::itype::STRING);
|
||||
record.addItem(item);
|
||||
@ -651,8 +646,6 @@ const std::string NODEPROP::NAME::itemName = "NAME";
|
||||
const std::string NODEPROP::PRESSURE::itemName = "PRESSURE";
|
||||
const std::string NODEPROP::AS_CHOKE::itemName = "AS_CHOKE";
|
||||
const std::string NODEPROP::AS_CHOKE::defaultValue = "NO";
|
||||
const std::string NODEPROP::ADD_GAS_LIFT_GAS::itemName = "ADD_GAS_LIFT_GAS";
|
||||
const std::string NODEPROP::ADD_GAS_LIFT_GAS::defaultValue = "NO";
|
||||
const std::string NODEPROP::CHOKE_GROUP::itemName = "CHOKE_GROUP";
|
||||
const std::string NODEPROP::SOURCE_SINK_GROUP::itemName = "SOURCE_SINK_GROUP";
|
||||
const std::string NODEPROP::NETWORK_VALUE_TYPE::itemName = "NETWORK_VALUE_TYPE";
|
||||
|
@ -318,7 +318,7 @@ OPERATER::OPERATER( ) : ParserKeyword("OPERATER")
|
||||
{
|
||||
ParserRecord record;
|
||||
{
|
||||
ParserItem item("TARGET_ARRAY", ParserItem::itype::STRING);
|
||||
ParserItem item("RESULT_ARRAY", ParserItem::itype::STRING);
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
@ -352,7 +352,7 @@ OPERATER::OPERATER( ) : ParserKeyword("OPERATER")
|
||||
}
|
||||
}
|
||||
const std::string OPERATER::keywordName = "OPERATER";
|
||||
const std::string OPERATER::TARGET_ARRAY::itemName = "TARGET_ARRAY";
|
||||
const std::string OPERATER::RESULT_ARRAY::itemName = "RESULT_ARRAY";
|
||||
const std::string OPERATER::REGION_NUMBER::itemName = "REGION_NUMBER";
|
||||
const std::string OPERATER::OPERATION::itemName = "OPERATION";
|
||||
const std::string OPERATER::ARRAY_PARAMETER::itemName = "ARRAY_PARAMETER";
|
||||
|
@ -646,17 +646,19 @@ const int PERMAVE::EXPO_2::defaultValue = -1;
|
||||
|
||||
PERMFACT::PERMFACT( ) : ParserKeyword("PERMFACT")
|
||||
{
|
||||
setSizeType(OTHER_KEYWORD_IN_DECK);
|
||||
initSizeKeyword("EQLDIMS","NTEQUL",0);
|
||||
setSizeType(SLASH_TERMINATED);
|
||||
addValidSectionName("PROPS");
|
||||
clearDeckNames();
|
||||
addDeckName("PERMFACT");
|
||||
{
|
||||
ParserRecord record;
|
||||
{
|
||||
ParserItem item("DATA", ParserItem::itype::DOUBLE);
|
||||
item.setSizeType(ParserItem::item_size::ALL);
|
||||
ParserItem item("POROSITY", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("1");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("PERMFACTMULT", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("1");
|
||||
record.addItem(item);
|
||||
}
|
||||
@ -664,7 +666,8 @@ PERMFACT::PERMFACT( ) : ParserKeyword("PERMFACT")
|
||||
}
|
||||
}
|
||||
const std::string PERMFACT::keywordName = "PERMFACT";
|
||||
const std::string PERMFACT::DATA::itemName = "DATA";
|
||||
const std::string PERMFACT::POROSITY::itemName = "POROSITY";
|
||||
const std::string PERMFACT::PERMFACTMULT::itemName = "PERMFACTMULT";
|
||||
|
||||
|
||||
PERMJFUN::PERMJFUN( ) : ParserKeyword("PERMJFUN")
|
||||
|
@ -2193,16 +2193,26 @@ RWGSALT::RWGSALT( ) : ParserKeyword("RWGSALT")
|
||||
{
|
||||
setSizeType(OTHER_KEYWORD_IN_DECK);
|
||||
initSizeKeyword("TABDIMS","NTPVT",0);
|
||||
setTableCollection( true );
|
||||
addValidSectionName("PROPS");
|
||||
clearDeckNames();
|
||||
addDeckName("RWGSALT");
|
||||
{
|
||||
ParserRecord record;
|
||||
{
|
||||
ParserItem item("RESERVOIR_PRESSURE", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("Pressure");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("SALT_CONCENTRATION", ParserItem::itype::DOUBLE);
|
||||
item.setSizeType(ParserItem::item_size::ALL);
|
||||
item.push_backDimension("Mass/Length*Length*Length");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("DATA", ParserItem::itype::DOUBLE);
|
||||
item.setSizeType(ParserItem::item_size::ALL);
|
||||
item.push_backDimension("Pressure");
|
||||
item.push_backDimension("Mass/Length*Length*Length");
|
||||
item.push_backDimension("OilDissolutionFactor");
|
||||
record.addItem(item);
|
||||
}
|
||||
@ -2210,6 +2220,8 @@ RWGSALT::RWGSALT( ) : ParserKeyword("RWGSALT")
|
||||
}
|
||||
}
|
||||
const std::string RWGSALT::keywordName = "RWGSALT";
|
||||
const std::string RWGSALT::RESERVOIR_PRESSURE::itemName = "RESERVOIR_PRESSURE";
|
||||
const std::string RWGSALT::SALT_CONCENTRATION::itemName = "SALT_CONCENTRATION";
|
||||
const std::string RWGSALT::DATA::itemName = "DATA";
|
||||
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ const std::string SOLVDIMS::data::itemName = "data";
|
||||
|
||||
SOLVDIRS::SOLVDIRS( ) : ParserKeyword("SOLVDIRS")
|
||||
{
|
||||
setFixedSize( (size_t) 1);
|
||||
setSizeType(SLASH_TERMINATED);
|
||||
addValidSectionName("GRID");
|
||||
clearDeckNames();
|
||||
addDeckName("SOLVDIRS");
|
||||
|
@ -2652,7 +2652,7 @@ WELTARG::WELTARG( ) : ParserKeyword("WELTARG")
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("NEW_VALUE", ParserItem::itype::UDA);
|
||||
ParserItem item("NEW_VALUE", ParserItem::itype::DOUBLE);
|
||||
record.addItem(item);
|
||||
}
|
||||
addRecord( record );
|
||||
@ -4193,62 +4193,61 @@ WSEGAICD::WSEGAICD( ) : ParserKeyword("WSEGAICD")
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("SEG1", ParserItem::itype::INT);
|
||||
ParserItem item("SEGMENT1", ParserItem::itype::INT);
|
||||
item.setDefault( 0 );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("SEG2", ParserItem::itype::INT);
|
||||
ParserItem item("SEGMENT2", ParserItem::itype::INT);
|
||||
item.setDefault( 0 );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("STRENGTH", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("Pressure*Time*Time/GeometricVolume*GeometricVolume");
|
||||
ParserItem item("AICD_STRENGTH", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(0) );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("LENGTH", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("ICD_LENGTH", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(12.000000) );
|
||||
item.push_backDimension("Length");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("DENSITY_CALI", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("RHO", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(1000.250000) );
|
||||
item.push_backDimension("Density");
|
||||
item.push_backDimension("Mass/Length*Length*Length");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("VISCOSITY_CALI", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("VISCOSITY", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(1.450000) );
|
||||
item.push_backDimension("Viscosity");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("CRITICAL_VALUE", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("WATER_LIMIT", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(0.500000) );
|
||||
item.push_backDimension("1");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("WIDTH_TRANS", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("TRANSITION_WIDTH", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(0.050000) );
|
||||
item.push_backDimension("1");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("MAX_VISC_RATIO", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("MAX_SOMETHING", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(5.000000) );
|
||||
item.push_backDimension("1");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("METHOD_SCALING_FACTOR", ParserItem::itype::INT);
|
||||
ParserItem item("SCALING_METHOD", ParserItem::itype::INT);
|
||||
item.setDefault( -1 );
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("MAX_ABS_RATE", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("GeometricVolume/Time");
|
||||
ParserItem item("MAX_QICD", ParserItem::itype::DOUBLE);
|
||||
item.push_backDimension("ReservoirVolume/Time");
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
@ -4260,7 +4259,7 @@ WSEGAICD::WSEGAICD( ) : ParserKeyword("WSEGAICD")
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("STATUS", ParserItem::itype::STRING);
|
||||
ParserItem item("ICD_FLAG", ParserItem::itype::STRING);
|
||||
item.setDefault( std::string("OPEN") );
|
||||
record.addItem(item);
|
||||
}
|
||||
@ -4280,7 +4279,7 @@ WSEGAICD::WSEGAICD( ) : ParserKeyword("WSEGAICD")
|
||||
record.addItem(item);
|
||||
}
|
||||
{
|
||||
ParserItem item("OIL_VISC_FRACTION", ParserItem::itype::DOUBLE);
|
||||
ParserItem item("OIL_VSIC_FRACTION", ParserItem::itype::DOUBLE);
|
||||
item.setDefault( double(1.000000) );
|
||||
record.addItem(item);
|
||||
}
|
||||
@ -4299,36 +4298,39 @@ WSEGAICD::WSEGAICD( ) : ParserKeyword("WSEGAICD")
|
||||
}
|
||||
const std::string WSEGAICD::keywordName = "WSEGAICD";
|
||||
const std::string WSEGAICD::WELL::itemName = "WELL";
|
||||
const std::string WSEGAICD::SEG1::itemName = "SEG1";
|
||||
const std::string WSEGAICD::SEG2::itemName = "SEG2";
|
||||
const std::string WSEGAICD::STRENGTH::itemName = "STRENGTH";
|
||||
const std::string WSEGAICD::LENGTH::itemName = "LENGTH";
|
||||
const double WSEGAICD::LENGTH::defaultValue = 12.000000;
|
||||
const std::string WSEGAICD::DENSITY_CALI::itemName = "DENSITY_CALI";
|
||||
const double WSEGAICD::DENSITY_CALI::defaultValue = 1000.250000;
|
||||
const std::string WSEGAICD::VISCOSITY_CALI::itemName = "VISCOSITY_CALI";
|
||||
const double WSEGAICD::VISCOSITY_CALI::defaultValue = 1.450000;
|
||||
const std::string WSEGAICD::CRITICAL_VALUE::itemName = "CRITICAL_VALUE";
|
||||
const double WSEGAICD::CRITICAL_VALUE::defaultValue = 0.500000;
|
||||
const std::string WSEGAICD::WIDTH_TRANS::itemName = "WIDTH_TRANS";
|
||||
const double WSEGAICD::WIDTH_TRANS::defaultValue = 0.050000;
|
||||
const std::string WSEGAICD::MAX_VISC_RATIO::itemName = "MAX_VISC_RATIO";
|
||||
const double WSEGAICD::MAX_VISC_RATIO::defaultValue = 5.000000;
|
||||
const std::string WSEGAICD::METHOD_SCALING_FACTOR::itemName = "METHOD_SCALING_FACTOR";
|
||||
const int WSEGAICD::METHOD_SCALING_FACTOR::defaultValue = -1;
|
||||
const std::string WSEGAICD::MAX_ABS_RATE::itemName = "MAX_ABS_RATE";
|
||||
const std::string WSEGAICD::SEGMENT1::itemName = "SEGMENT1";
|
||||
const int WSEGAICD::SEGMENT1::defaultValue = 0;
|
||||
const std::string WSEGAICD::SEGMENT2::itemName = "SEGMENT2";
|
||||
const int WSEGAICD::SEGMENT2::defaultValue = 0;
|
||||
const std::string WSEGAICD::AICD_STRENGTH::itemName = "AICD_STRENGTH";
|
||||
const double WSEGAICD::AICD_STRENGTH::defaultValue = 0.000000;
|
||||
const std::string WSEGAICD::ICD_LENGTH::itemName = "ICD_LENGTH";
|
||||
const double WSEGAICD::ICD_LENGTH::defaultValue = 12.000000;
|
||||
const std::string WSEGAICD::RHO::itemName = "RHO";
|
||||
const double WSEGAICD::RHO::defaultValue = 1000.250000;
|
||||
const std::string WSEGAICD::VISCOSITY::itemName = "VISCOSITY";
|
||||
const double WSEGAICD::VISCOSITY::defaultValue = 1.450000;
|
||||
const std::string WSEGAICD::WATER_LIMIT::itemName = "WATER_LIMIT";
|
||||
const double WSEGAICD::WATER_LIMIT::defaultValue = 0.500000;
|
||||
const std::string WSEGAICD::TRANSITION_WIDTH::itemName = "TRANSITION_WIDTH";
|
||||
const double WSEGAICD::TRANSITION_WIDTH::defaultValue = 0.050000;
|
||||
const std::string WSEGAICD::MAX_SOMETHING::itemName = "MAX_SOMETHING";
|
||||
const double WSEGAICD::MAX_SOMETHING::defaultValue = 5.000000;
|
||||
const std::string WSEGAICD::SCALING_METHOD::itemName = "SCALING_METHOD";
|
||||
const int WSEGAICD::SCALING_METHOD::defaultValue = -1;
|
||||
const std::string WSEGAICD::MAX_QICD::itemName = "MAX_QICD";
|
||||
const std::string WSEGAICD::FLOW_RATE_EXPONENT::itemName = "FLOW_RATE_EXPONENT";
|
||||
const std::string WSEGAICD::VISC_EXPONENT::itemName = "VISC_EXPONENT";
|
||||
const std::string WSEGAICD::STATUS::itemName = "STATUS";
|
||||
const std::string WSEGAICD::STATUS::defaultValue = "OPEN";
|
||||
const std::string WSEGAICD::ICD_FLAG::itemName = "ICD_FLAG";
|
||||
const std::string WSEGAICD::ICD_FLAG::defaultValue = "OPEN";
|
||||
const std::string WSEGAICD::OIL_FLOW_FRACTION::itemName = "OIL_FLOW_FRACTION";
|
||||
const double WSEGAICD::OIL_FLOW_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::WATER_FLOW_FRACTION::itemName = "WATER_FLOW_FRACTION";
|
||||
const double WSEGAICD::WATER_FLOW_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::GAS_FLOW_FRACTION::itemName = "GAS_FLOW_FRACTION";
|
||||
const double WSEGAICD::GAS_FLOW_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::OIL_VISC_FRACTION::itemName = "OIL_VISC_FRACTION";
|
||||
const double WSEGAICD::OIL_VISC_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::OIL_VSIC_FRACTION::itemName = "OIL_VSIC_FRACTION";
|
||||
const double WSEGAICD::OIL_VSIC_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::WATER_VISC_FRACTION::itemName = "WATER_VISC_FRACTION";
|
||||
const double WSEGAICD::WATER_VISC_FRACTION::defaultValue = 1.000000;
|
||||
const std::string WSEGAICD::GAS_VISC_FRACTION::itemName = "GAS_VISC_FRACTION";
|
||||
|
@ -1647,7 +1647,6 @@ namespace ParserKeywords {
|
||||
class FIP_FAMILY {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const std::string defaultValue;
|
||||
};
|
||||
|
||||
class PRESSURE_TARGET {
|
||||
|
@ -484,12 +484,6 @@ namespace ParserKeywords {
|
||||
static const std::string defaultValue;
|
||||
};
|
||||
|
||||
class ADD_GAS_LIFT_GAS {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const std::string defaultValue;
|
||||
};
|
||||
|
||||
class CHOKE_GROUP {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
|
@ -223,7 +223,7 @@ namespace ParserKeywords {
|
||||
OPERATER();
|
||||
static const std::string keywordName;
|
||||
|
||||
class TARGET_ARRAY {
|
||||
class RESULT_ARRAY {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
@ -417,7 +417,12 @@ namespace ParserKeywords {
|
||||
PERMFACT();
|
||||
static const std::string keywordName;
|
||||
|
||||
class DATA {
|
||||
class POROSITY {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class PERMFACTMULT {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
@ -1504,6 +1504,16 @@ namespace ParserKeywords {
|
||||
RWGSALT();
|
||||
static const std::string keywordName;
|
||||
|
||||
class RESERVOIR_PRESSURE {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class SALT_CONCENTRATION {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class DATA {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
|
@ -3110,64 +3110,67 @@ namespace ParserKeywords {
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class SEG1 {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class SEG2 {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class STRENGTH {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class LENGTH {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class DENSITY_CALI {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class VISCOSITY_CALI {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class CRITICAL_VALUE {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class WIDTH_TRANS {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class MAX_VISC_RATIO {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class METHOD_SCALING_FACTOR {
|
||||
class SEGMENT1 {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const int defaultValue;
|
||||
};
|
||||
|
||||
class MAX_ABS_RATE {
|
||||
class SEGMENT2 {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const int defaultValue;
|
||||
};
|
||||
|
||||
class AICD_STRENGTH {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class ICD_LENGTH {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class RHO {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class VISCOSITY {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class WATER_LIMIT {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class TRANSITION_WIDTH {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class MAX_SOMETHING {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class SCALING_METHOD {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const int defaultValue;
|
||||
};
|
||||
|
||||
class MAX_QICD {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
};
|
||||
@ -3182,7 +3185,7 @@ namespace ParserKeywords {
|
||||
static const std::string itemName;
|
||||
};
|
||||
|
||||
class STATUS {
|
||||
class ICD_FLAG {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const std::string defaultValue;
|
||||
@ -3206,7 +3209,7 @@ namespace ParserKeywords {
|
||||
static const double defaultValue;
|
||||
};
|
||||
|
||||
class OIL_VISC_FRACTION {
|
||||
class OIL_VSIC_FRACTION {
|
||||
public:
|
||||
static const std::string itemName;
|
||||
static const double defaultValue;
|
||||
|
@ -153,12 +153,6 @@ if (OPM_ENABLE_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add dependency of Shlwapi.lib for Windows platforms
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_link_libraries(opmcommon Shlwapi)
|
||||
endif()
|
||||
|
||||
|
||||
# all setup common to the OPM library modules is done here
|
||||
include (OpmLibMain)
|
||||
|
||||
@ -199,11 +193,15 @@ if(ENABLE_ECL_INPUT)
|
||||
# test_util/summary.cpp
|
||||
# )
|
||||
|
||||
#foreach(target compareECL convertECL summary)
|
||||
#add_executable(test_esmry_lod
|
||||
# test_util/test_esmry_lod.cpp
|
||||
# )
|
||||
|
||||
#foreach(target compareECL convertECL summary test_esmry_lod)
|
||||
# target_link_libraries(${target} opmcommon)
|
||||
# install(TARGETS ${target} DESTINATION bin)
|
||||
#endforeach()
|
||||
|
||||
|
||||
# Add the tests
|
||||
set(_libs opmcommon
|
||||
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
||||
@ -261,11 +259,10 @@ if (OPM_ENABLE_PYTHON)
|
||||
list(APPEND _opmcommon_include_dirs ${_ecl_include_dirs})
|
||||
string(REPLACE ";" ":" _setup_include_dirs "${_opmcommon_include_dirs}")
|
||||
|
||||
get_target_property(_opmcommon_lib_dirs opmcommon LINK_DIRECTORIES)
|
||||
if (CMAKE_PREFIX_PATH)
|
||||
list(APPEND _opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(_opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
list(APPEND _opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib)
|
||||
set(_opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib)
|
||||
endif()
|
||||
string(REPLACE ";" ":" _setup_lib_dirs "${_opmcommon_lib_dirs}")
|
||||
|
||||
@ -291,11 +288,6 @@ if (OPM_ENABLE_PYTHON)
|
||||
set( _rpath_arg "")
|
||||
endif()
|
||||
|
||||
set(opm-common_PYTHON_PACKAGE_VERSION ${OPM_PYTHON_PACKAGE_VERSION_TAG})
|
||||
|
||||
# Generate versioned setup.py
|
||||
configure_file (${PROJECT_SOURCE_DIR}/python/setup.py.in ${PROJECT_BINARY_DIR}/python/setup.py)
|
||||
file(COPY ${PROJECT_SOURCE_DIR}/python/README.md DESTINATION ${PROJECT_BINARY_DIR}/python)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} target_name.py
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python
|
||||
OUTPUT_VARIABLE python_lib_target)
|
||||
@ -303,19 +295,19 @@ if (OPM_ENABLE_PYTHON)
|
||||
add_custom_target(copy_python ALL
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/python/install.py ${PROJECT_SOURCE_DIR}/python ${PROJECT_BINARY_DIR} 0)
|
||||
|
||||
add_custom_command(OUTPUT python/opm/${python_lib_target}
|
||||
add_custom_command(OUTPUT python/python/opm/${python_lib_target}
|
||||
DEPENDS ${PYTHON_CXX_DEPENDS}
|
||||
DEPENDS copy_python
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/python/setup.py
|
||||
build
|
||||
build_ext
|
||||
--build-lib=${PROJECT_BINARY_DIR}/python
|
||||
--build-lib=${PROJECT_BINARY_DIR}/python/python/opm
|
||||
--library-dirs=${_setup_lib_dirs}
|
||||
${_rpath_arg}
|
||||
--include-dirs=${_setup_include_dirs}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
||||
COMMENT "Building python bindings at python/opm/${python_lib_target}")
|
||||
add_custom_target(opmcommon_python ALL DEPENDS python/opm/${python_lib_target})
|
||||
COMMENT "Building python bindings")
|
||||
add_custom_target(opmcommon_python ALL DEPENDS python/python/opm/${python_lib_target})
|
||||
add_dependencies(opmcommon_python opmcommon)
|
||||
|
||||
# The install target is based on manually copying the python file tree to the
|
||||
@ -330,7 +322,7 @@ if (OPM_ENABLE_PYTHON)
|
||||
# setup.py install manually - optionally with the generated script
|
||||
# setup-install.sh - and completely bypass cmake in the installation phase.
|
||||
if (OPM_INSTALL_PYTHON)
|
||||
install( CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/python/install.py ${PROJECT_BINARY_DIR}/python/opm ${DEST_PREFIX}${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX} 1)")
|
||||
install( CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/python/install.py ${PROJECT_BINARY_DIR}/python/python/opm ${DEST_PREFIX}${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX} 1)")
|
||||
endif()
|
||||
|
||||
# Observe that if the opmcommon library has been built as a shared library the
|
||||
@ -338,11 +330,11 @@ if (OPM_ENABLE_PYTHON)
|
||||
# testing.
|
||||
add_test(NAME python_tests
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
||||
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/lib ${PYTHON_EXECUTABLE} setup.py build_ext --dry-run --build-lib ${PROJECT_BINARY_DIR}/python test
|
||||
COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/lib ${PYTHON_EXECUTABLE} setup.py build_ext --dry-run --build-lib ${PROJECT_BINARY_DIR}/python/python/opm test
|
||||
)
|
||||
|
||||
set_target_properties(opmcommon PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_BINARY_DIR}/python)
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_BINARY_DIR}/python/python)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Let cmake configure some small shell scripts which can be used to simplify
|
||||
@ -352,11 +344,6 @@ if (OPM_ENABLE_PYTHON)
|
||||
DESTINATION ${PROJECT_BINARY_DIR}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
|
||||
|
||||
configure_file(python/setup-package.sh.in tmp/setup-package.sh)
|
||||
file( COPY ${PROJECT_BINARY_DIR}/tmp/setup-package.sh
|
||||
DESTINATION ${PROJECT_BINARY_DIR}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
|
||||
|
||||
configure_file(python/setup-test.sh.in tmp/setup-test.sh)
|
||||
file( COPY ${PROJECT_BINARY_DIR}/tmp/setup-test.sh
|
||||
DESTINATION ${PROJECT_BINARY_DIR}
|
||||
|
@ -100,11 +100,8 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Condition.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/State.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.cpp
|
||||
@ -118,12 +115,9 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Branch.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Node.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RPTConfig.cpp
|
||||
@ -161,7 +155,6 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TLMixpar.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
|
||||
@ -169,7 +162,6 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.cpp
|
||||
@ -199,6 +191,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/Units/Dimension.cpp
|
||||
src/opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/parser/eclipse/Utility/Functional.cpp
|
||||
src/opm/parser/eclipse/Utility/Stringview.cpp
|
||||
)
|
||||
|
||||
|
||||
@ -343,7 +336,6 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/MultiRegTests.cpp
|
||||
tests/parser/MultisegmentWellTests.cpp
|
||||
tests/parser/MULTREGTScannerTests.cpp
|
||||
tests/parser/NetworkTests.cpp
|
||||
tests/parser/OrderedMapTests.cpp
|
||||
tests/parser/ParseContextTests.cpp
|
||||
tests/parser/ParseContext_EXIT1.cpp
|
||||
@ -393,7 +385,6 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/test_AggregateConnectionData.cpp
|
||||
tests/test_AggregateUDQData.cpp
|
||||
tests/test_ArrayDimChecker.cpp
|
||||
tests/test_data_GuideRateValue.cpp
|
||||
tests/test_EclipseIO.cpp
|
||||
tests/test_DoubHEAD.cpp
|
||||
tests/test_InteHEAD.cpp
|
||||
@ -437,8 +428,6 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/SPE1CASE1A.SMSPEC
|
||||
tests/SPE9_CP_PACKED.DATA
|
||||
tests/SOFR_TEST.DATA
|
||||
tests/UDQ_BASE.DATA
|
||||
tests/UDQ_RESTART.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
tests/UDQ_ACTIONX_TEST1_U.DATA
|
||||
@ -487,8 +476,6 @@ if(ENABLE_ECL_INPUT)
|
||||
#examples/opmi.cpp
|
||||
#examples/opmpack.cpp
|
||||
#examples/opmhash.cpp
|
||||
#examples/wellgraph.cpp
|
||||
#examples/make_lodsmry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -501,7 +488,6 @@ if(ENABLE_ECL_INPUT)
|
||||
examples/opmi.cpp
|
||||
examples/opmpack.cpp
|
||||
examples/opmhash.cpp
|
||||
examples/make_lodsmry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -548,6 +534,7 @@ if(ENABLE_ECL_INPUT)
|
||||
list(APPEND PUBLIC_HEADER_FILES
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/json/JsonObject.hpp
|
||||
opm/parser/eclipse/Utility/Stringview.hpp
|
||||
opm/parser/eclipse/Utility/Functional.hpp
|
||||
opm/parser/eclipse/Utility/Typetools.hpp
|
||||
opm/parser/eclipse/Generator/KeywordGenerator.hpp
|
||||
@ -603,11 +590,8 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PermfactTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
|
||||
@ -617,7 +601,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TLMixpar.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp
|
||||
@ -627,8 +610,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/JFunc.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp
|
||||
@ -685,12 +666,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/Condition.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Branch.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Node.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp
|
||||
@ -717,7 +693,6 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp
|
||||
@ -733,8 +708,8 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/updatingConnectionsWithSegments.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/SpiralICD.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.hpp
|
||||
@ -789,10 +764,9 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/io/eclipse/rst/well.hpp
|
||||
opm/output/data/Aquifer.hpp
|
||||
opm/output/data/Cells.hpp
|
||||
opm/output/data/GuideRateValue.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/data/Solution.hpp
|
||||
opm/output/data/Wells.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/eclipse/VectorItems/aquifer.hpp
|
||||
opm/output/eclipse/VectorItems/connection.hpp
|
||||
opm/output/eclipse/VectorItems/group.hpp
|
||||
|
@ -20,6 +20,7 @@ set(genkw_SOURCES src/opm/json/JsonObject.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/StarToken.cpp
|
||||
src/opm/parser/eclipse/Units/Dimension.cpp
|
||||
src/opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/parser/eclipse/Utility/Stringview.cpp
|
||||
src/opm/common/OpmLog/OpmLog.cpp
|
||||
src/opm/common/OpmLog/Logger.cpp
|
||||
src/opm/common/OpmLog/StreamLog.cpp
|
||||
|
@ -33,7 +33,8 @@ find_opm_package (
|
||||
# test program
|
||||
"#include <dune/geometry/quadraturerules.hh>
|
||||
int main (void) {
|
||||
Dune::GeometryType gt = Dune::GeometryTypes::quadrilateral;
|
||||
Dune::GeometryType gt;
|
||||
gt.makeQuadrilateral();
|
||||
Dune::QuadratureRules<double, 2>::rule(gt, 2).size();
|
||||
return 0;
|
||||
}
|
||||
|
@ -106,13 +106,8 @@ macro (find_and_append_package_to prefix name)
|
||||
|
||||
# if we're told not to look for the package, pretend it was never found
|
||||
if (CMAKE_DISABLE_FIND_PACKAGE_${name})
|
||||
# If required send an error
|
||||
cmake_parse_arguments(FIND "REQUIRED" "" "" ${ARGN} )
|
||||
set (${name}_FOUND FALSE)
|
||||
set (${NAME}_FOUND FALSE)
|
||||
if (FIND_REQUIRED)
|
||||
message(SEND_ERROR "package ${name} but disable with CMAKE_DISABLE_FIND_PACKAGE_${name}")
|
||||
endif ()
|
||||
set (${name}_FOUND FALSE)
|
||||
set (${NAME}_FOUND FALSE)
|
||||
else ()
|
||||
# List of components might differ for every module. Therefore we will
|
||||
# need to research for a library multiple times. _search_components
|
||||
|
@ -62,10 +62,7 @@ include (UseOptimization)
|
||||
|
||||
# turn on all warnings; this must be done before adding any
|
||||
# dependencies, in case they alter the list of warnings
|
||||
option(OPM_DISABLE_WARNINGS "Disable warning flags" OFF)
|
||||
if(NOT OPM_DISABLE_WARNINGS)
|
||||
include (UseWarnings)
|
||||
endif()
|
||||
include (UseWarnings)
|
||||
|
||||
# parallel programming
|
||||
include (UseOpenMP)
|
||||
|
@ -115,34 +115,26 @@ macro (find_opm_package module deps header lib defs prog conf)
|
||||
# without config.h
|
||||
config_cmd_line (${module}_CMD_CONFIG ${module}_CONFIG_VARS)
|
||||
|
||||
if(prog)
|
||||
# check that we can compile a small test-program
|
||||
include (CMakePushCheckState)
|
||||
cmake_push_check_state ()
|
||||
include (CheckCXXSourceCompiles)
|
||||
# only add these if they are actually found; otherwise it won't
|
||||
# compile and the variable won't be set
|
||||
append_found (${module}_INCLUDE_DIRS CMAKE_REQUIRED_INCLUDES)
|
||||
append_found (${module}_LIBRARIES CMAKE_REQUIRED_LIBRARIES)
|
||||
# since we don't have any config.h yet
|
||||
list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_DEFINITIONS})
|
||||
list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_CMD_CONFIG})
|
||||
check_cxx_source_compiles ("${prog}" HAVE_${MODULE})
|
||||
cmake_pop_check_state ()
|
||||
else(prog)
|
||||
if(${module}_FOUND)
|
||||
# No test code provided, mark compilation as successful
|
||||
# if module was founf
|
||||
set(HAVE_${MODULE} 1)
|
||||
endif(${module}_FOUND)
|
||||
endif(prog)
|
||||
# check that we can compile a small test-program
|
||||
include (CMakePushCheckState)
|
||||
cmake_push_check_state ()
|
||||
include (CheckCXXSourceCompiles)
|
||||
# only add these if they are actually found; otherwise it won't
|
||||
# compile and the variable won't be set
|
||||
append_found (${module}_INCLUDE_DIRS CMAKE_REQUIRED_INCLUDES)
|
||||
append_found (${module}_LIBRARIES CMAKE_REQUIRED_LIBRARIES)
|
||||
# since we don't have any config.h yet
|
||||
list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_DEFINITIONS})
|
||||
list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_CMD_CONFIG})
|
||||
check_cxx_source_compiles ("${prog}" HAVE_${MODULE})
|
||||
cmake_pop_check_state ()
|
||||
|
||||
# write status message in the same manner as everyone else
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (
|
||||
${module}
|
||||
DEFAULT_MSG
|
||||
${module}_INCLUDE_DIRS ${module}_LIBRARIES ${module}_FOUND ${module}_ALL_PREREQS HAVE_${MODULE}
|
||||
${module}_INCLUDE_DIRS ${module}_LIBRARIES ${module}_FOUND ${module}_ALL_PREREQS
|
||||
)
|
||||
|
||||
# some genius that coded the FindPackageHandleStandardArgs figured out
|
||||
|
@ -24,16 +24,9 @@ if (cmake_build_type_upper_ MATCHES DEBUG)
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"debug\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (debug)\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
|
||||
# Write header file with build timestamp
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#ifndef OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
)
|
||||
else ()
|
||||
if (NOT GIT_FOUND)
|
||||
find_package (Git)
|
||||
@ -50,15 +43,9 @@ else ()
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"unknown git version\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (unknown git version)\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
# Write header file with build timestamp
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#ifndef OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
)
|
||||
else ()
|
||||
add_custom_target (update-version ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
@ -56,6 +56,7 @@ file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
||||
"#define PROJECT_VERSION_NAME \"${PROJECT_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"${sha1}\"\n"
|
||||
"#define PROJECT_VERSION \"${PROJECT_LABEL} (${sha1})\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
|
||||
@ -65,11 +66,3 @@ file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
||||
execute_process (COMMAND
|
||||
${CMAKE_COMMAND} -E copy_if_different "${PROJECT_BINARY_DIR}/project-version.tmp" "${PROJECT_BINARY_DIR}/project-version.h"
|
||||
)
|
||||
|
||||
# Write header file with build timestamp
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#ifndef OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
)
|
||||
|
16
ThirdParty/custom-opm-common/opm-common/cross-platform/windows/PortableEndian.hpp
vendored
Normal file
16
ThirdParty/custom-opm-common/opm-common/cross-platform/windows/PortableEndian.hpp
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef PORTABLE_ENDIAN_H__
|
||||
#define PORTABLE_ENDIAN_H__
|
||||
|
||||
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
|
||||
|
||||
# define __WINDOWS__
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
#define __builtin_bswap16(x) _byteswap_ushort((x))
|
||||
#define __builtin_bswap32(x) _byteswap_ulong((x))
|
||||
#define __builtin_bswap64(x) _byteswap_uint64((x))
|
||||
#endif
|
||||
|
||||
#endif // PORTABLE_ENDIAN_H__
|
@ -1,4 +1,4 @@
|
||||
opm-common (2019.04-pre~xenial) xenial; urgency=medium
|
||||
opm-common (2020.04-1~xenial) xenial; urgency=medium
|
||||
|
||||
* New release
|
||||
|
||||
|
@ -1,109 +0,0 @@
|
||||
/*
|
||||
Copyright 2019 Equinor ASA.
|
||||
|
||||
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 <iostream>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
#include <opm/io/eclipse/ESmry.hpp>
|
||||
#include <opm/io/eclipse/EclUtil.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
|
||||
static void printHelp() {
|
||||
|
||||
std::cout << "\nThis program create one or more lodsmry files, designed for effective load on the demand. \n"
|
||||
<< "These files are created with input from the smspec and unsmry file. \n"
|
||||
<< "\nIn addition, the program takes these options (which must be given before the arguments):\n\n"
|
||||
<< "-f if LODSMRY file exist, this will be replaced. Default behaviour is that existing file is kept.\n"
|
||||
<< "-n Maximum number of threads to be used if mulitple files should be created.\n"
|
||||
<< "-h Print help and exit.\n\n";
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
int c = 0;
|
||||
int max_threads [[maybe_unused]] = -1;
|
||||
bool force = false;
|
||||
|
||||
while ((c = getopt(argc, argv, "fn:h")) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
force = true;
|
||||
break;
|
||||
case 'h':
|
||||
printHelp();
|
||||
return 0;
|
||||
case 'n':
|
||||
max_threads = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
int argOffset = optind;
|
||||
|
||||
#if HAVE_OPENMP
|
||||
int available_threads = omp_get_max_threads();
|
||||
|
||||
if (max_threads < 0)
|
||||
max_threads = available_threads-2;
|
||||
else if (max_threads > (available_threads - 1))
|
||||
max_threads = available_threads-1;
|
||||
|
||||
if (max_threads > (argc-argOffset))
|
||||
max_threads = argc-argOffset;
|
||||
|
||||
omp_set_num_threads(max_threads);
|
||||
#endif
|
||||
|
||||
auto lap0 = std::chrono::system_clock::now();
|
||||
|
||||
#pragma omp parallel for
|
||||
for (int f = argOffset; f < argc; f ++){
|
||||
Opm::filesystem::path inputFileName = argv[f];
|
||||
|
||||
Opm::filesystem::path lodFileName = inputFileName.parent_path() / inputFileName.stem();
|
||||
lodFileName = lodFileName += ".LODSMRY";
|
||||
|
||||
if (Opm::EclIO::fileExists(lodFileName) && (force))
|
||||
remove (lodFileName);
|
||||
|
||||
Opm::EclIO::ESmry smryFile(argv[f]);
|
||||
if (!smryFile.make_lodsmry_file()){
|
||||
std::cout << "\n! Warning, smspec already have one lod file, existing kept use option -f to replace this" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
auto lap1 = std::chrono::system_clock::now();
|
||||
std::chrono::duration<double> elapsed_seconds1 = lap1-lap0;
|
||||
std::cout << "\nruntime for creating " << (argc-argOffset) << " LODSMRY files: " << elapsed_seconds1.count() << " seconds\n" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,135 +0,0 @@
|
||||
/*
|
||||
Copyright 2013, 2020 Equinor ASA.
|
||||
|
||||
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 <fstream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/OpmLog/StreamLog.hpp>
|
||||
#include <opm/common/OpmLog/LogUtil.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
|
||||
inline void createDot(const Opm::Schedule& schedule, const std::string& casename)
|
||||
{
|
||||
std::cout << "Writing " << casename << ".gv .... "; std::cout.flush();
|
||||
std::ofstream os(casename + ".gv");
|
||||
os << "// This file was written by the 'wellgraph' utility from OPM.\n";
|
||||
os << "// Find the source code at github.com/OPM.\n";
|
||||
os << "// Convert output to PDF with 'dot -Tpdf " << casename << ".gv > " << casename << ".pdf'\n";
|
||||
os << "strict digraph \"" << casename << "\"\n{\n";
|
||||
const auto groupnames = schedule.groupNames();
|
||||
const std::size_t last = schedule.getTimeMap().last();
|
||||
// Group -> Group relations.
|
||||
for (const auto& gn : groupnames) {
|
||||
const auto& g = schedule.getGroup(gn, last);
|
||||
const auto& children = g.groups();
|
||||
if (!children.empty()) {
|
||||
os << " \"" << gn << "\" -> {";
|
||||
for (const auto& child : children) {
|
||||
os << " \"" << child << '"';
|
||||
}
|
||||
os << " }\n";
|
||||
}
|
||||
}
|
||||
// Group -> Well relations.
|
||||
os << " node [shape=box]\n";
|
||||
for (const auto& gn : groupnames) {
|
||||
const auto& g = schedule.getGroup(gn, last);
|
||||
const auto& children = g.wells();
|
||||
if (!children.empty()) {
|
||||
os << " \"" << gn << "\" -> {";
|
||||
for (const auto& child : children) {
|
||||
os << " \"" << child << '"';
|
||||
}
|
||||
os << " }\n";
|
||||
}
|
||||
}
|
||||
// Color wells by injector or producer.
|
||||
for (const auto& w : schedule.getWellsatEnd()) {
|
||||
os << " \"" << w.name() << '"';
|
||||
if (w.isProducer() && w.isInjector()) {
|
||||
os << " [color=purple]\n";
|
||||
} else if (w.isProducer()) {
|
||||
os << " [color=red]\n";
|
||||
} else {
|
||||
os << " [color=blue]\n";
|
||||
}
|
||||
}
|
||||
os << "}\n";
|
||||
std::cout << "complete." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
inline Opm::Schedule loadSchedule(const std::string& deck_file)
|
||||
{
|
||||
Opm::ParseContext parseContext({{Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE},
|
||||
{Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN},
|
||||
{Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN},
|
||||
{Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN}});
|
||||
Opm::ErrorGuard errors;
|
||||
Opm::Parser parser;
|
||||
auto python = std::make_shared<Opm::Python>();
|
||||
|
||||
std::cout << "Loading and parsing deck: " << deck_file << " ..... "; std::cout.flush();
|
||||
auto deck = parser.parseFile(deck_file, parseContext, errors);
|
||||
std::cout << "complete.\n";
|
||||
|
||||
std::cout << "Creating EclipseState .... "; std::cout.flush();
|
||||
Opm::EclipseState state( deck );
|
||||
std::cout << "complete.\n";
|
||||
|
||||
std::cout << "Creating Schedule .... "; std::cout.flush();
|
||||
Opm::Schedule schedule( deck, state, python);
|
||||
std::cout << "complete." << std::endl;
|
||||
|
||||
return schedule;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ostringstream os;
|
||||
std::shared_ptr<Opm::StreamLog> string_log = std::make_shared<Opm::StreamLog>(os, Opm::Log::DefaultMessageTypes);
|
||||
Opm::OpmLog::addBackend( "STRING" , string_log);
|
||||
try {
|
||||
for (int iarg = 1; iarg < argc; iarg++) {
|
||||
const std::string filename = argv[iarg];
|
||||
const auto sched = loadSchedule(filename);
|
||||
const auto casename = Opm::filesystem::path(filename).stem();
|
||||
createDot(sched, casename);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
std::cout << "\n\n***** Caught an exception: " << e.what() << std::endl;
|
||||
std::cout << "\n\n***** Printing log: "<< std::endl;
|
||||
std::cout << os.str();
|
||||
std::cout << "\n\n***** Exiting due to errors." << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
#include <opm/output/data/Solution.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
#include <opm/parser/eclipse/Deck/UDAValue.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@ -25,11 +23,6 @@ class ParseContext;
|
||||
class Parser;
|
||||
class Python;
|
||||
class SummaryState;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
}
|
||||
|
||||
class msim {
|
||||
|
||||
public:
|
||||
@ -38,18 +31,16 @@ public:
|
||||
|
||||
msim(const EclipseState& state);
|
||||
|
||||
Opm::UDAValue uda_val();
|
||||
|
||||
void well_rate(const std::string& well, data::Rates::opt rate, std::function<well_rate_function> func);
|
||||
void solution(const std::string& field, std::function<solution_function> func);
|
||||
void run(Schedule& schedule, EclipseIO& io, bool report_only);
|
||||
void post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step);
|
||||
void post_step(Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step);
|
||||
private:
|
||||
|
||||
void run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step, EclipseIO& io) const;
|
||||
void run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step, double dt, EclipseIO& io) const;
|
||||
void output(Action::State& action_state, SummaryState& st, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupValues& group_data, EclipseIO& io) const;
|
||||
void simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step, double seconds_elapsed, double time_step) const;
|
||||
void run_step(const Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, EclipseIO& io) const;
|
||||
void run_step(const Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, double dt, EclipseIO& io) const;
|
||||
void output(SummaryState& st, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, EclipseIO& io) const;
|
||||
void simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, double seconds_elapsed, double time_step) const;
|
||||
|
||||
EclipseState state;
|
||||
std::map<std::string, std::map<data::Rates::opt, std::function<well_rate_function>>> well_rates;
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
@ -45,41 +44,35 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
const double week = 7 * 86400;
|
||||
data::Solution sol;
|
||||
SummaryState st(std::chrono::system_clock::from_time_t(schedule.getStartTime()));
|
||||
Action::State action_state;
|
||||
Python python;
|
||||
|
||||
io.writeInitial();
|
||||
for (size_t report_step = 1; report_step < schedule.size(); report_step++) {
|
||||
data::Wells well_data;
|
||||
data::GroupValues group_data;
|
||||
if (report_only)
|
||||
run_step(schedule, action_state, st, sol, well_data, group_data, report_step, io);
|
||||
run_step(schedule, st, sol, well_data, report_step, io);
|
||||
else {
|
||||
double time_step = std::min(week, 0.5*schedule.stepLength(report_step - 1));
|
||||
run_step(schedule, action_state, st, sol, well_data, group_data, report_step, time_step, io);
|
||||
run_step(schedule, st, sol, well_data, report_step, time_step, io);
|
||||
}
|
||||
post_step(schedule, action_state, st, sol, well_data, group_data, report_step);
|
||||
post_step(schedule, st, sol, well_data, report_step);
|
||||
const auto& exit_status = schedule.exitStatus();
|
||||
if (exit_status.has_value())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
UDAValue msim::uda_val() {
|
||||
return UDAValue();
|
||||
}
|
||||
|
||||
|
||||
void msim::post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& /* sol */, data::Wells& /* well_data */, data::GroupValues& /* group_data */, size_t report_step) {
|
||||
void msim::post_step(Schedule& schedule, SummaryState& st, data::Solution& /* sol */, data::Wells& /* well_data */, size_t report_step) {
|
||||
const auto& actions = schedule.actions(report_step);
|
||||
if (actions.empty())
|
||||
return;
|
||||
|
||||
Action::Context context( st , schedule.getWListManager(report_step));
|
||||
Action::Context context( st );
|
||||
|
||||
auto sim_time = schedule.simTime(report_step);
|
||||
for (const auto& action : actions.pending(action_state, sim_time)) {
|
||||
auto result = action->eval(context);
|
||||
for (const auto& action : actions.pending(sim_time)) {
|
||||
auto result = action->eval(sim_time, context);
|
||||
if (result)
|
||||
schedule.applyAction(report_step, *action, result);
|
||||
}
|
||||
@ -90,12 +83,12 @@ void msim::post_step(Schedule& schedule, Action::State& action_state, SummarySta
|
||||
|
||||
|
||||
|
||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step, EclipseIO& io) const {
|
||||
this->run_step(schedule, action_state, st, sol, well_data, group_data, report_step, schedule.stepLength(report_step - 1), io);
|
||||
void msim::run_step(const Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, EclipseIO& io) const {
|
||||
this->run_step(schedule, st, sol, well_data, report_step, schedule.stepLength(report_step - 1), io);
|
||||
}
|
||||
|
||||
|
||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& group_data, size_t report_step, double dt, EclipseIO& io) const {
|
||||
void msim::run_step(const Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, double dt, EclipseIO& io) const {
|
||||
double start_time = schedule.seconds(report_step - 1);
|
||||
double end_time = schedule.seconds(report_step);
|
||||
double seconds_elapsed = start_time;
|
||||
@ -105,7 +98,9 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
||||
if ((seconds_elapsed + time_step) > end_time)
|
||||
time_step = end_time - seconds_elapsed;
|
||||
|
||||
this->simulate(schedule, st, sol, well_data, group_data, report_step, seconds_elapsed, time_step);
|
||||
this->simulate(schedule, st, sol, well_data, report_step, seconds_elapsed, time_step);
|
||||
|
||||
Opm::data::Group group_data;
|
||||
|
||||
seconds_elapsed += time_step;
|
||||
|
||||
@ -118,24 +113,21 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
||||
group_data,
|
||||
{});
|
||||
|
||||
this->output(action_state,
|
||||
st,
|
||||
this->output(st,
|
||||
report_step,
|
||||
(seconds_elapsed < end_time),
|
||||
seconds_elapsed,
|
||||
sol,
|
||||
well_data,
|
||||
group_data,
|
||||
io);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void msim::output(Action::State& action_state, SummaryState& st, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupValues& group_data, EclipseIO& io) const {
|
||||
RestartValue value(sol, well_data, group_data);
|
||||
io.writeTimeStep(action_state,
|
||||
st,
|
||||
void msim::output(SummaryState& st, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, EclipseIO& io) const {
|
||||
RestartValue value(sol, well_data);
|
||||
io.writeTimeStep(st,
|
||||
report_step,
|
||||
substep,
|
||||
seconds_elapsed,
|
||||
@ -143,7 +135,7 @@ void msim::output(Action::State& action_state, SummaryState& st, size_t report_s
|
||||
}
|
||||
|
||||
|
||||
void msim::simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupValues& /* group_data */, size_t report_step, double seconds_elapsed, double time_step) const {
|
||||
void msim::simulate(const Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, double seconds_elapsed, double time_step) const {
|
||||
for (const auto& sol_pair : this->solutions) {
|
||||
auto func = sol_pair.second;
|
||||
func(this->state, schedule, sol, report_step, seconds_elapsed + time_step);
|
||||
|
@ -43,7 +43,7 @@ namespace Opm
|
||||
{
|
||||
OPM_THROW(std::runtime_error, "Maximum number of iterations exceeded: " << maxiter << "\n"
|
||||
<< "Current interval is [" << std::min(x0, x1) << ", "
|
||||
<< std::max(x0, x1) << "] abs(x0-x1) " << std::abs(x0-x1));
|
||||
<< std::max(x0, x1) << "]");
|
||||
return -1e100; // Never reached.
|
||||
}
|
||||
};
|
||||
@ -64,7 +64,7 @@ namespace Opm
|
||||
OPM_REPORT;
|
||||
std::cerr << "Maximum number of iterations exceeded: " << maxiter
|
||||
<< ", current interval is [" << std::min(x0, x1) << ", "
|
||||
<< std::max(x0, x1) << "] abs(x0-x1) " << std::abs(x0-x1);
|
||||
<< std::max(x0, x1) << "]";
|
||||
return 0.5*(x0 + x1);
|
||||
}
|
||||
};
|
||||
@ -124,7 +124,7 @@ namespace Opm
|
||||
iterations_used = 0;
|
||||
// In every iteraton, x1 is the last point computed,
|
||||
// and x0 is the last point computed that makes it a bracket.
|
||||
while (fabs(x1 - x0) >= eps) {
|
||||
while (fabs(x1 - x0) >= 1e-9*eps) {
|
||||
double xnew = regulaFalsiStep(x0, x1, f0, f1);
|
||||
double fnew = f(xnew);
|
||||
// cout << "xnew = " << xnew << " fnew = " << fnew << endl;
|
||||
@ -221,7 +221,7 @@ namespace Opm
|
||||
iterations_used = 0;
|
||||
// In every iteraton, x1 is the last point computed,
|
||||
// and x0 is the last point computed that makes it a bracket.
|
||||
while (fabs(x1 - x0) >= eps) {
|
||||
while (fabs(x1 - x0) >= 1e-9*eps) {
|
||||
double xnew = regulaFalsiStep(x0, x1, f0, f1);
|
||||
double fnew = f(xnew);
|
||||
// cout << "xnew = " << xnew << " fnew = " << fnew << endl;
|
||||
@ -327,7 +327,7 @@ namespace Opm
|
||||
// and x0 is the last point computed that makes it a bracket.
|
||||
double width = fabs(x1 - x0);
|
||||
double contraction = 1.0;
|
||||
while (width >= eps) {
|
||||
while (width >= 1e-9 * eps) {
|
||||
// If we are contracting sufficiently to at least halve
|
||||
// the interval width in two iterations we use regula
|
||||
// falsi. Otherwise, we take a bisection step to avoid
|
||||
|
@ -57,8 +57,6 @@ public:
|
||||
void LoadData(const std::vector<std::string>& vectList) const;
|
||||
void LoadData() const;
|
||||
|
||||
bool make_lodsmry_file();
|
||||
|
||||
std::chrono::system_clock::time_point startdate() const { return startdat; }
|
||||
|
||||
const std::vector<std::string>& keywordList() const;
|
||||
@ -67,7 +65,7 @@ public:
|
||||
|
||||
int timestepIdxAtReportstepStart(const int reportStep) const;
|
||||
|
||||
size_t numberOfTimeSteps() const { return nTstep; }
|
||||
size_t numberOfTimeSteps() const { return timeStepList.size(); }
|
||||
|
||||
const std::string& get_unit(const std::string& name) const;
|
||||
const std::string& get_unit(const SummaryNode& node) const;
|
||||
@ -76,11 +74,9 @@ public:
|
||||
void write_rsm_file(std::optional<Opm::filesystem::path> = std::nullopt) const;
|
||||
|
||||
private:
|
||||
Opm::filesystem::path inputFileName, lodFileName;
|
||||
Opm::filesystem::path inputFileName;
|
||||
int nI, nJ, nK, nSpecFiles;
|
||||
bool fromSingleRun, lodEnabeled;
|
||||
uint64_t lod_offset, lod_arr_size;
|
||||
size_t nVect, nTstep;
|
||||
size_t nVect;
|
||||
|
||||
std::vector<bool> formattedFiles;
|
||||
std::vector<std::string> dataFileList;
|
||||
@ -133,9 +129,6 @@ private:
|
||||
|
||||
std::vector<std::tuple <std::string, uint64_t>> getListOfArrays(std::string filename, bool formatted);
|
||||
std::vector<int> makeKeywPosVector(int speInd) const;
|
||||
std::string read_string_from_disk(std::fstream& fileH, uint64_t size) const;
|
||||
void inspect_lodsmry();
|
||||
void Load_from_lodsmry(const std::vector<int>& keywIndVect) const;
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
@ -23,8 +23,6 @@
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
@ -33,8 +31,6 @@ namespace Opm { namespace EclIO {
|
||||
float flipEndianFloat(float num);
|
||||
double flipEndianDouble(double num);
|
||||
bool isEOF(std::fstream* fileH);
|
||||
bool fileExists(const std::string& filename);
|
||||
bool isFormatted(const std::string& filename);
|
||||
|
||||
std::tuple<int, int> block_size_data_binary(eclArrType arrType);
|
||||
std::tuple<int, int, int> block_size_data_formatted(eclArrType arrType);
|
||||
@ -53,25 +49,6 @@ namespace Opm { namespace EclIO {
|
||||
void readFormattedHeader(std::fstream& fileH, std::string& arrName,
|
||||
int64_t &num, Opm::EclIO::eclArrType &arrType);
|
||||
|
||||
template<typename T, typename T2>
|
||||
std::vector<T> readBinaryArray(std::fstream& fileH, const int64_t size, Opm::EclIO::eclArrType type,
|
||||
std::function<T(T2)>& flip);
|
||||
|
||||
std::vector<int> readBinaryInteArray(std::fstream &fileH, const int64_t size);
|
||||
std::vector<float> readBinaryRealArray(std::fstream& fileH, const int64_t size);
|
||||
std::vector<double> readBinaryDoubArray(std::fstream& fileH, const int64_t size);
|
||||
std::vector<bool> readBinaryLogiArray(std::fstream &fileH, const int64_t size);
|
||||
std::vector<std::string> readBinaryCharArray(std::fstream& fileH, const int64_t size);
|
||||
|
||||
template<typename T>
|
||||
std::vector<T> readFormattedArray(const std::string& file_str, const int size, int64_t fromPos,
|
||||
std::function<T(const std::string&)>& process);
|
||||
|
||||
std::vector<int> readFormattedInteArray(const std::string& file_str, const int64_t size, int64_t fromPos);
|
||||
std::vector<std::string> readFormattedCharArray(const std::string& file_str, const int64_t size, int64_t fromPos);
|
||||
std::vector<float> readFormattedRealArray(const std::string& file_str, const int64_t size, int64_t fromPos);
|
||||
std::vector<bool> readFormattedLogiArray(const std::string& file_str, const int64_t size, int64_t fromPos);
|
||||
std::vector<double> readFormattedDoubArray(const std::string& file_str, const int64_t size, int64_t fromPos);
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
namespace Opm::EclIO {
|
||||
|
||||
struct SummaryNode {
|
||||
enum class Category {
|
||||
@ -72,6 +72,6 @@ struct SummaryNode {
|
||||
std::optional<std::string> display_number(number_renderer) const;
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
} // namespace Opm::EclIO
|
||||
|
||||
#endif // OPM_IO_SUMMARYNODE_HPP
|
||||
|
@ -94,7 +94,6 @@ struct RstWell {
|
||||
double gas_rate;
|
||||
double liquid_rate;
|
||||
double void_rate;
|
||||
double thp;
|
||||
double flow_bhp;
|
||||
double wct;
|
||||
double gor;
|
||||
|
@ -30,26 +30,12 @@ namespace Json {
|
||||
|
||||
class JsonObject {
|
||||
public:
|
||||
JsonObject();
|
||||
|
||||
explicit JsonObject(const Opm::filesystem::path& jsonFile );
|
||||
explicit JsonObject(const std::string& inline_json);
|
||||
explicit JsonObject(const char * inline_json);
|
||||
explicit JsonObject(cJSON * root);
|
||||
~JsonObject();
|
||||
|
||||
void add(double value);
|
||||
void add(int value);
|
||||
void add(const std::string& value);
|
||||
JsonObject add_array();
|
||||
JsonObject add_object();
|
||||
void add_item(const std::string& key, double value);
|
||||
void add_item(const std::string& key, int value);
|
||||
void add_item(const std::string& key, const std::string& value);
|
||||
JsonObject add_array(const std::string& key);
|
||||
JsonObject add_object(const std::string& key);
|
||||
std::string dump() const;
|
||||
|
||||
bool has_item(const std::string& key) const;
|
||||
JsonObject get_array_item( size_t index ) const;
|
||||
JsonObject get_item(const std::string& key) const;
|
||||
|
@ -36,10 +36,10 @@ namespace data {
|
||||
from the TargetType enum which indicates why they they have been
|
||||
added to the container - and where they are headed.
|
||||
|
||||
RESTART_SOLUTION : Cell-based quantities that are output to the
|
||||
SOLUTION section of the restart file. ECLIPSE-compatible names.
|
||||
Many, but not necessarily all, of these quantities are required
|
||||
for restarting the simulator.
|
||||
RESTART_SOLUTION : Fields which represent primary variables, and
|
||||
are reqired for restart. Typically pressure and
|
||||
suturation. WIll end up in the SOLUTION section of the restart
|
||||
file.
|
||||
|
||||
RESTART_AUXILIARY : Fields with extra information, not required
|
||||
for restart. Examples of this include fluid in place values or
|
||||
@ -52,10 +52,6 @@ namespace data {
|
||||
will not be output anywhere else.
|
||||
|
||||
INIT : Fields which should go to the INIT file.
|
||||
|
||||
RESTART_OPM_EXTENDED: Cell-based quantities that are specific to
|
||||
OPM-Flow. Output only to extended OPM restart files. Specifically
|
||||
not output to ECLIPSE-compatible restart files.
|
||||
*/
|
||||
|
||||
|
||||
@ -64,7 +60,6 @@ namespace data {
|
||||
RESTART_AUXILIARY,
|
||||
SUMMARY,
|
||||
INIT,
|
||||
RESTART_OPM_EXTENDED,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -20,119 +20,63 @@
|
||||
#ifndef OPM_OUTPUT_GROUPS_HPP
|
||||
#define OPM_OUTPUT_GROUPS_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/output/data/GuideRateValue.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
|
||||
namespace Opm { namespace data {
|
||||
namespace Opm {
|
||||
|
||||
struct GroupConstraints {
|
||||
namespace data {
|
||||
|
||||
struct currentGroupConstraints {
|
||||
Opm::Group::ProductionCMode currentProdConstraint;
|
||||
Opm::Group::InjectionCMode currentGasInjectionConstraint;
|
||||
Opm::Group::InjectionCMode currentWaterInjectionConstraint;
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
bool operator==(const GroupConstraints& other) const
|
||||
{
|
||||
return this->currentProdConstraint == other.currentProdConstraint &&
|
||||
this->currentGasInjectionConstraint == other.currentGasInjectionConstraint &&
|
||||
this->currentWaterInjectionConstraint == other.currentWaterInjectionConstraint;
|
||||
}
|
||||
|
||||
inline GroupConstraints& set(Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic);
|
||||
inline currentGroupConstraints& set( Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic);
|
||||
};
|
||||
|
||||
struct GroupGuideRates {
|
||||
GuideRateValue production{};
|
||||
GuideRateValue injection{};
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
this->production.write(buffer);
|
||||
this->injection .write(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
this->production.read(buffer);
|
||||
this->injection .read(buffer);
|
||||
}
|
||||
|
||||
bool operator==(const GroupGuideRates& other) const
|
||||
{
|
||||
return this->production == other.production
|
||||
&& this->injection == other.injection;
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupData {
|
||||
GroupConstraints currentControl;
|
||||
GroupGuideRates guideRates{};
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
this->currentControl.write(buffer);
|
||||
this->guideRates .write(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
this->currentControl.read(buffer);
|
||||
this->guideRates .read(buffer);
|
||||
}
|
||||
|
||||
bool operator==(const GroupData& other) const
|
||||
{
|
||||
return this->currentControl == other.currentControl
|
||||
&& this->guideRates == other.guideRates;
|
||||
}
|
||||
};
|
||||
|
||||
class GroupValues : public std::map<std::string, GroupData> {
|
||||
class Group : public std::map<std::string, Opm::data::currentGroupConstraints> {
|
||||
public:
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
void write(MessageBufferType& buffer) const {
|
||||
unsigned int size = this->size();
|
||||
buffer.write(size);
|
||||
|
||||
for (const auto& [gname, gdata] : *this) {
|
||||
buffer.write(gname);
|
||||
gdata .write(buffer);
|
||||
for (const auto& witr : *this) {
|
||||
const std::string& name = witr.first;
|
||||
buffer.write(name);
|
||||
const auto& pi_constr = witr.second;
|
||||
pi_constr.write(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
unsigned int size;
|
||||
void read(MessageBufferType& buffer) {
|
||||
unsigned int size;
|
||||
buffer.read(size);
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
std::string name;
|
||||
buffer.read(name);
|
||||
|
||||
auto gdata = GroupData{};
|
||||
gdata.read(buffer);
|
||||
|
||||
this->emplace(name, gdata);
|
||||
currentGroupConstraints cgc;
|
||||
cgc.read(buffer);
|
||||
this->emplace(name, cgc);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -140,28 +84,26 @@ namespace Opm { namespace data {
|
||||
/* IMPLEMENTATIONS */
|
||||
|
||||
template <class MessageBufferType>
|
||||
void GroupConstraints::write(MessageBufferType& buffer) const {
|
||||
void currentGroupConstraints::write(MessageBufferType& buffer) const {
|
||||
buffer.write(this->currentProdConstraint);
|
||||
buffer.write(this->currentGasInjectionConstraint);
|
||||
buffer.write(this->currentWaterInjectionConstraint);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void GroupConstraints::read(MessageBufferType& buffer) {
|
||||
void currentGroupConstraints::read(MessageBufferType& buffer) {
|
||||
buffer.read(this->currentProdConstraint);
|
||||
buffer.read(this->currentGasInjectionConstraint);
|
||||
buffer.read(this->currentWaterInjectionConstraint);
|
||||
}
|
||||
|
||||
inline GroupConstraints&
|
||||
GroupConstraints::set(Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic)
|
||||
{
|
||||
|
||||
inline currentGroupConstraints& currentGroupConstraints::set( Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic) {
|
||||
this->currentGasInjectionConstraint = cgic;
|
||||
this->currentWaterInjectionConstraint = cwic;
|
||||
this->currentProdConstraint = cpc;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -1,156 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2020 Equinor ASA
|
||||
|
||||
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_OUTPUT_DATA_GUIDERATEVALUE_HPP
|
||||
#define OPM_OUTPUT_DATA_GUIDERATEVALUE_HPP
|
||||
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace Opm { namespace data {
|
||||
|
||||
class GuideRateValue {
|
||||
public:
|
||||
enum class Item : std::size_t {
|
||||
Oil, Gas, Water, ResV,
|
||||
|
||||
// -- Must be last enumerator --
|
||||
NumItems,
|
||||
};
|
||||
|
||||
void clear()
|
||||
{
|
||||
this->mask_.reset();
|
||||
this->value_.fill(0.0);
|
||||
}
|
||||
|
||||
constexpr bool has(const Item p) const
|
||||
{
|
||||
const auto i = this->index(p);
|
||||
|
||||
return (i < Size) && this->mask_[i];
|
||||
}
|
||||
|
||||
bool operator==(const GuideRateValue& vec) const
|
||||
{
|
||||
return (this->mask_ == vec.mask_)
|
||||
&& (this->value_ == vec.value_);
|
||||
}
|
||||
|
||||
double get(const Item p) const
|
||||
{
|
||||
if (! this->has(p)) {
|
||||
throw std::invalid_argument {
|
||||
"Request for Unset Item Value for " + this->itemName(p)
|
||||
};
|
||||
}
|
||||
|
||||
return this->value_[ this->index(p) ];
|
||||
}
|
||||
|
||||
GuideRateValue& set(const Item p, const double value)
|
||||
{
|
||||
const auto i = this->index(p);
|
||||
|
||||
if (i >= Size) {
|
||||
throw std::invalid_argument {
|
||||
"Cannot Assign Item Value for Unsupported Item '"
|
||||
+ this->itemName(p) + '\''
|
||||
};
|
||||
}
|
||||
|
||||
this->mask_.set(i);
|
||||
this->value_[i] = value;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
GuideRateValue& operator+=(const GuideRateValue& rhs)
|
||||
{
|
||||
for (auto i = 0*Size; i < Size; ++i) {
|
||||
if (rhs.mask_[i]) {
|
||||
this->mask_.set(i);
|
||||
this->value_[i] += rhs.value_[i];
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
auto maskrep = this->mask_.to_ullong();
|
||||
buffer.write(maskrep);
|
||||
|
||||
for (const auto& x : this->value_) {
|
||||
buffer.write(x);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
this->clear();
|
||||
|
||||
{
|
||||
auto mask = 0ull;
|
||||
buffer.read(mask);
|
||||
|
||||
this->mask_ = std::bitset<Size>(mask);
|
||||
}
|
||||
|
||||
for (auto& x : this->value_) {
|
||||
buffer.read(x);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
enum { Size = static_cast<std::size_t>(Item::NumItems) };
|
||||
|
||||
std::bitset<Size> mask_{};
|
||||
std::array<double, Size> value_{};
|
||||
|
||||
constexpr std::size_t index(const Item p) const noexcept
|
||||
{
|
||||
return static_cast<std::size_t>(p);
|
||||
}
|
||||
|
||||
std::string itemName(const Item p) const
|
||||
{
|
||||
switch (p) {
|
||||
case Item::Oil: return "Oil";
|
||||
case Item::Gas: return "Gas";
|
||||
case Item::Water: return "Water";
|
||||
case Item::ResV: return "ResV";
|
||||
|
||||
case Item::NumItems:
|
||||
return "Out of bounds (NumItems)";
|
||||
}
|
||||
|
||||
return "Unknown (" + std::to_string(this->index(p)) + ')';
|
||||
}
|
||||
};
|
||||
|
||||
}} // namespace Opm::data
|
||||
|
||||
#endif // OPM_OUTPUT_DATA_GUIDERATEVALUE_HPP
|
@ -30,8 +30,6 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/output/data/GuideRateValue.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
|
||||
namespace Opm {
|
||||
@ -68,7 +66,6 @@ namespace Opm {
|
||||
well_potential_water = (1 << 14),
|
||||
well_potential_oil = (1 << 15),
|
||||
well_potential_gas = (1 << 16),
|
||||
brine = (1 << 17),
|
||||
};
|
||||
|
||||
using enum_size = std::underlying_type< opt >::type;
|
||||
@ -120,7 +117,6 @@ namespace Opm {
|
||||
double well_potential_water = 0.0;
|
||||
double well_potential_oil = 0.0;
|
||||
double well_potential_gas = 0.0;
|
||||
double brine = 0.0;
|
||||
};
|
||||
|
||||
struct Connection {
|
||||
@ -255,7 +251,6 @@ namespace Opm {
|
||||
std::vector< Connection > connections;
|
||||
std::unordered_map<std::size_t, Segment> segments;
|
||||
CurrentControl current_control;
|
||||
GuideRateValue guide_rates{};
|
||||
|
||||
inline bool flowing() const noexcept;
|
||||
template <class MessageBufferType>
|
||||
@ -296,8 +291,7 @@ namespace Opm {
|
||||
control == well2.control &&
|
||||
connections == well2.connections &&
|
||||
segments == well2.segments &&
|
||||
current_control == well2.current_control &&
|
||||
guide_rates == well2.guide_rates;
|
||||
current_control == well2.current_control;
|
||||
}
|
||||
};
|
||||
|
||||
@ -410,8 +404,7 @@ namespace Opm {
|
||||
productivity_index_oil == rate.productivity_index_oil &&
|
||||
well_potential_water == rate.well_potential_water &&
|
||||
well_potential_oil == rate.well_potential_oil &&
|
||||
well_potential_gas == rate.well_potential_gas &&
|
||||
brine == rate.brine;
|
||||
well_potential_gas == rate.well_potential_gas;
|
||||
}
|
||||
|
||||
|
||||
@ -443,7 +436,6 @@ namespace Opm {
|
||||
case opt::well_potential_water: return this->well_potential_water;
|
||||
case opt::well_potential_oil: return this->well_potential_oil;
|
||||
case opt::well_potential_gas: return this->well_potential_gas;
|
||||
case opt::brine: return this->brine;
|
||||
}
|
||||
|
||||
throw std::invalid_argument(
|
||||
@ -490,7 +482,6 @@ namespace Opm {
|
||||
buffer.write(this->well_potential_water);
|
||||
buffer.write(this->well_potential_oil);
|
||||
buffer.write(this->well_potential_gas);
|
||||
buffer.write(this->brine);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@ -547,7 +538,6 @@ namespace Opm {
|
||||
}
|
||||
|
||||
this->current_control.write(buffer);
|
||||
this->guide_rates.write(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@ -570,7 +560,6 @@ namespace Opm {
|
||||
buffer.read(this->well_potential_water);
|
||||
buffer.read(this->well_potential_oil);
|
||||
buffer.read(this->well_potential_gas);
|
||||
buffer.read(this->brine);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@ -640,7 +629,6 @@ namespace Opm {
|
||||
}
|
||||
|
||||
this->current_control.read(buffer);
|
||||
this->guide_rates.read(buffer);
|
||||
}
|
||||
|
||||
}} // Opm::data
|
||||
|
@ -41,10 +41,6 @@ namespace Opm {
|
||||
class Schedule;
|
||||
class UDQInput;
|
||||
class UDQActive;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
}
|
||||
} // Opm
|
||||
|
||||
|
||||
@ -56,11 +52,10 @@ class AggregateActionxData
|
||||
public:
|
||||
explicit AggregateActionxData(const std::vector<int>& actDims);
|
||||
|
||||
void captureDeclaredActionxData( const Opm::Schedule& sched,
|
||||
const Opm::Action::State& action_state,
|
||||
const Opm::SummaryState& st,
|
||||
const std::vector<int>& actDims,
|
||||
const std::size_t simStep);
|
||||
void captureDeclaredActionxData( const Opm::Schedule& sched,
|
||||
const Opm::SummaryState& st,
|
||||
const std::vector<int>& actDims,
|
||||
const std::size_t simStep);
|
||||
|
||||
const std::vector<int>& getIACT() const
|
||||
{
|
||||
|
@ -74,12 +74,8 @@ public:
|
||||
"GOPT", "GWPT", "GGPT", "GVPT", "GWIT",
|
||||
"GGIT", "GVIT",
|
||||
"GOPTH", "GWPTH", "GGPTH",
|
||||
"GWITH", "GGITH",
|
||||
"GOPGR", "GWPGR", "GGPGR", "GVPGR",
|
||||
"GOIGR", "GWIGR", "GGIGR",
|
||||
};
|
||||
"GWITH", "GGITH"};
|
||||
|
||||
// Note: guide rates don't exist at the FIELD level.
|
||||
const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR",
|
||||
"FVPR", "FWIR", "FGIR", "FWCT", "FGOR",
|
||||
"FOPT", "FWPT", "FGPT", "FVPT", "FWIT",
|
||||
@ -105,13 +101,6 @@ public:
|
||||
{"GVIT", 17},
|
||||
{"GOPP", 22},
|
||||
{"GWPP", 23},
|
||||
{"GOPGR", 85},
|
||||
{"GWPGR", 86},
|
||||
{"GGPGR", 87},
|
||||
{"GVPGR", 88},
|
||||
{"GOIGR", 89},
|
||||
{"GWIGR", 91},
|
||||
{"GGIGR", 93},
|
||||
{"GOPTH", 135},
|
||||
{"GWPTH", 139},
|
||||
{"GWITH", 140},
|
||||
@ -132,26 +121,6 @@ public:
|
||||
{inj_cmode_enum::SALE, 0},
|
||||
};
|
||||
|
||||
// Note: guide rates don't exist at the FIELD level.
|
||||
const std::map<int, inj_cmode_enum> ICntlModeToiCMode = {
|
||||
{0, inj_cmode_enum::NONE},
|
||||
{1, inj_cmode_enum::RATE},
|
||||
{2, inj_cmode_enum::RESV},
|
||||
{3, inj_cmode_enum::REIN},
|
||||
{4, inj_cmode_enum::VREP}, };
|
||||
|
||||
using p_cmode = Opm::Group::ProductionCMode;
|
||||
const std::map<int, p_cmode> PCntlModeToPCMode = {
|
||||
{0, p_cmode::NONE},
|
||||
{1, p_cmode::ORAT},
|
||||
{2, p_cmode::WRAT},
|
||||
{3, p_cmode::GRAT},
|
||||
{4, p_cmode::LRAT},
|
||||
{9, p_cmode::CRAT},
|
||||
{5, p_cmode::RESV},
|
||||
{6, p_cmode::PRBL},
|
||||
};
|
||||
|
||||
const std::map<std::string, size_t> fieldKeyToIndex = {
|
||||
{"FOPR", 0},
|
||||
{"FWPR", 1},
|
||||
|
@ -94,12 +94,12 @@ void captureDeclaredUDQData(const Opm::Schedule& sched,
|
||||
{
|
||||
return this->dUDW_.data();
|
||||
}
|
||||
|
||||
|
||||
const std::vector<double>& getDUDG() const
|
||||
{
|
||||
return this->dUDG_.data();
|
||||
}
|
||||
|
||||
|
||||
const std::vector<double>& getDUDF() const
|
||||
{
|
||||
return this->dUDF_.data();
|
||||
@ -127,10 +127,10 @@ private:
|
||||
|
||||
/// Aggregate 'DUDW' array (Double Precision) for all UDQ data. (Dimension = max no wells * noOfUDQ's)
|
||||
WindowedArray<double> dUDW_;
|
||||
|
||||
|
||||
/// Aggregate 'DUDG' array (Double Precision) for all UDQ data. (Dimension = (max no groups + 1) * noOfUDQ's)
|
||||
WindowedArray<double> dUDG_;
|
||||
|
||||
|
||||
/// Aggregate 'DUDF' array (Double Precision) for all UDQ data. (Dimension = Number of FU - UDQ's, with value equal to the actual constraint)
|
||||
WindowedArray<double> dUDF_;
|
||||
|
||||
|
@ -33,9 +33,6 @@ namespace Opm {
|
||||
class Schedule;
|
||||
class SummaryState;
|
||||
class UnitSystem;
|
||||
namespace Action {
|
||||
class State;
|
||||
}
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace data {
|
||||
@ -43,18 +40,22 @@ namespace Opm { namespace data {
|
||||
}} // Opm::data
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
|
||||
struct ActionResStatus {
|
||||
std::vector<Opm::Action::Result> result;
|
||||
std::vector<std::string> name;
|
||||
};
|
||||
|
||||
class AggregateWellData
|
||||
{
|
||||
public:
|
||||
explicit AggregateWellData(const std::vector<int>& inteHead);
|
||||
|
||||
void captureDeclaredWellData(const Schedule& sched,
|
||||
const UnitSystem& units,
|
||||
const std::size_t sim_step,
|
||||
const ::Opm::Action::State& action_state,
|
||||
const ::Opm::SummaryState& smry,
|
||||
const std::vector<int>& inteHead);
|
||||
void captureDeclaredWellData(const Schedule& sched,
|
||||
const UnitSystem& units,
|
||||
const std::size_t sim_step,
|
||||
const ::Opm::SummaryState& smry,
|
||||
const std::vector<int>& inteHead);
|
||||
|
||||
void captureDynamicWellData(const Opm::Schedule& sched,
|
||||
const std::size_t sim_step,
|
||||
@ -85,8 +86,8 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
return this->zWell_.data();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/// Aggregate 'IWEL' array (Integer) for all wells.
|
||||
WindowedArray<int> iWell_;
|
||||
|
@ -45,7 +45,7 @@ class EclipseState;
|
||||
class Schedule;
|
||||
class SummaryConfig;
|
||||
class SummaryState;
|
||||
namespace Action { class State; }
|
||||
|
||||
/*!
|
||||
* \brief A class to write the reservoir state and the well state of a
|
||||
* blackoil simulation to disk using the Eclipse binary format.
|
||||
@ -174,8 +174,7 @@ public:
|
||||
* hardcoded static map misc_units in Summary.cpp.
|
||||
*/
|
||||
|
||||
void writeTimeStep( const Action::State& action_state,
|
||||
const SummaryState& st,
|
||||
void writeTimeStep( const SummaryState& st,
|
||||
int report_step,
|
||||
bool isSubstep,
|
||||
double seconds_elapsed,
|
||||
@ -221,7 +220,7 @@ public:
|
||||
missing, if the bool is false missing keywords will be ignored
|
||||
(there will *not* be an empty vector in the return value).
|
||||
*/
|
||||
RestartValue loadRestart(Action::State& action_state, SummaryState& summary_state, const std::vector<RestartKey>& solution_keys, const std::vector<RestartKey>& extra_keys = {}) const;
|
||||
RestartValue loadRestart(SummaryState& summary_state, const std::vector<RestartKey>& solution_keys, const std::vector<RestartKey>& extra_keys = {}) const;
|
||||
const out::Summary& summary();
|
||||
|
||||
EclipseIO( const EclipseIO& ) = delete;
|
||||
|
@ -46,12 +46,6 @@ namespace Opm { namespace EclIO { namespace OutputStream {
|
||||
|
||||
}}}
|
||||
|
||||
namespace Opm { namespace Action {
|
||||
|
||||
class State;
|
||||
|
||||
}}
|
||||
|
||||
/*
|
||||
The two free functions RestartIO::save() and RestartIO::load() can
|
||||
be used to save and load reservoir and well state from restart
|
||||
@ -82,14 +76,12 @@ namespace Opm { namespace RestartIO {
|
||||
const EclipseState& es,
|
||||
const EclipseGrid& grid,
|
||||
const Schedule& schedule,
|
||||
const Action::State& action_state,
|
||||
const SummaryState& sumState,
|
||||
bool write_double = false);
|
||||
|
||||
|
||||
RestartValue load(const std::string& filename,
|
||||
int report_step,
|
||||
Action::State& action_state,
|
||||
SummaryState& summary_state,
|
||||
const std::vector<RestartKey>& solution_keys,
|
||||
const EclipseState& es,
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <opm/output/data/Aquifer.hpp>
|
||||
#include <opm/output/data/Solution.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -71,11 +70,10 @@ namespace Opm {
|
||||
using ExtraVector = std::vector<std::pair<RestartKey, std::vector<double>>>;
|
||||
data::Solution solution;
|
||||
data::Wells wells;
|
||||
data::GroupValues groups;
|
||||
ExtraVector extra;
|
||||
std::vector<data::AquiferData> aquifer;
|
||||
|
||||
RestartValue(data::Solution sol, data::Wells wells_arg, data::GroupValues groups_arg);
|
||||
RestartValue(data::Solution sol, data::Wells wells_arg);
|
||||
|
||||
RestartValue() {}
|
||||
|
||||
@ -91,7 +89,6 @@ namespace Opm {
|
||||
{
|
||||
return solution == val2.solution &&
|
||||
wells == val2.wells &&
|
||||
groups == val2.groups &&
|
||||
extra == val2.extra;
|
||||
}
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ namespace Opm {
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class WellRates;
|
||||
class GroupValues;
|
||||
class Group;
|
||||
}} // namespace Opm::data
|
||||
|
||||
namespace Opm { namespace out {
|
||||
@ -65,7 +65,7 @@ public:
|
||||
const EclipseState& es,
|
||||
const Schedule& schedule,
|
||||
const data::WellRates& well_solution,
|
||||
const data::GroupValues& group_solution,
|
||||
const data::Group& group_solution,
|
||||
const GlobalProcessParameters& single_values,
|
||||
const RegionParameters& region_values = {},
|
||||
const BlockValues& block_values = {}) const;
|
||||
|
@ -34,10 +34,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
};
|
||||
|
||||
enum inj_index : std::vector<float>::size_type {
|
||||
oilSurfRateLimit = 10, // Group's oil surface volume injection rate target/limit
|
||||
oilResRateLimit = 11, // Group's oil reservoir volume injection rate target/limit
|
||||
oilReinjectionLimit = 12, // Group's oil reinjection fraction target/limit
|
||||
oilVoidageLimit = 13, // Group's oil voidage injection fraction target/limit
|
||||
waterSurfRateLimit = 15, //i Group's water surface volume injection rate target/limit
|
||||
waterResRateLimit = 16, // Group's water reservoir volume injection rate target/limit
|
||||
waterReinjectionLimit = 17, // Group's water reinjection fraction target/limit
|
||||
@ -78,26 +74,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
OilPrPot = 22, // Group's oil production potential
|
||||
WatPrPot = 23, // Group's water production potential
|
||||
|
||||
OilPrGuideRate = 85, // Group's producer guide rate for oil.
|
||||
WatPrGuideRate = 86, // Group's producer guide rate for water.
|
||||
GasPrGuideRate = 87, // Group's producer guide rate for gas.
|
||||
VoidPrGuideRate = 88, // Group's producer guide rate for reservoir voidage volume.
|
||||
|
||||
OilInjGuideRate = 89, // Group's injection guide rate for oil.
|
||||
WatInjGuideRate = 91, // Group's injection guide rate for water.
|
||||
WatInjGuideRate_2 = 92, // Second copy of group's injection guide rate for water.
|
||||
// Not fully characterised.
|
||||
GasInjGuideRate = 93, // Groups injection guide rate for gas.
|
||||
|
||||
OilPrGuideRate_2 = 127, // Second copy of group's producer guide rate for oil.
|
||||
// Not fully characterised.
|
||||
WatPrGuideRate_2 = 128, // Second copy of group's producer guide rate for water.
|
||||
// Not fully characterised.
|
||||
GasPrGuideRate_2 = 129, // Second copy of group's producer guide rate for gas.
|
||||
// Not fully characterised.
|
||||
VoidPrGuideRate_2 = 130, // Second copy of group's producer guide rate for
|
||||
// reservoir voidage volume. Not fully characterised.
|
||||
|
||||
HistOilPrTotal = 135, // Group's total cumulative oil
|
||||
// production (observed/historical rates)
|
||||
HistWatPrTotal = 139, // Group's total cumulative water
|
||||
|
@ -55,8 +55,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
GasFlowFract = 10, // Normalised Gas flow rate fraction
|
||||
Pressure = 11, // Segment pressure
|
||||
|
||||
item31 = 30, // Very close to Normalised Water flow rate fraction - value used pr today
|
||||
|
||||
item40 = 39, // Unknown
|
||||
|
||||
ValveLength = 40, // Length of valve
|
||||
|
@ -43,7 +43,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
// simulation deck (WCONINJE, WCONPROD).
|
||||
|
||||
item18 = 17, // Unknown
|
||||
XFlow = 22,
|
||||
XFlow = 22,
|
||||
item25 = 24, // Unknown
|
||||
item32 = 31, // Unknown
|
||||
item48 = 47, // Unknown
|
||||
@ -113,11 +113,10 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
BHPTarget = 6, // Well's bottom hole pressure target
|
||||
|
||||
DatumDepth = 9, // Well's reference depth for BHP
|
||||
Alq_value = 10, // Well's artificial lift quantity
|
||||
|
||||
DrainageRadius = 17, // Well's drainage radius - item 7 from WELSPECS
|
||||
EfficiencyFactor1 = 24, // Item2 from WEFAC; this value is repeated at two locations.
|
||||
EfficiencyFactor2 = 31, // Item2 from WEFAC
|
||||
EfficiencyFactor2 = 31, //
|
||||
HistLiqRateTarget = 33, // Well's historical/observed liquid
|
||||
// rate target/limit
|
||||
|
||||
@ -136,7 +135,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
GasPrRate = 2, // Well's gas production rate
|
||||
LiqPrRate = 3, // Well's liquid production rate
|
||||
VoidPrRate = 4, // Well's reservoir voidage production rate
|
||||
TubHeadPr = 5, // Well's tubing head pressure
|
||||
|
||||
FlowBHP = 6, // Well's flowing/producing bottom hole pressure
|
||||
WatCut = 7, // Well's producing water cut
|
||||
GORatio = 8, // Well's producing gas/oil ratio
|
||||
@ -158,12 +157,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
BHPTarget = 41, // Well's current BHP Target/Limit
|
||||
|
||||
PrimGuideRate = 48, // Well's "primary" guide rate (oil for producers,
|
||||
// preferred phase for injectors)
|
||||
WatPrGuideRate = 49, // Well's producer guide rate for water
|
||||
GasPrGuideRate = 50, // Well's producer guide rate for gas
|
||||
VoidPrGuideRate = 68, // Well's producer guide rate for reservoir voidag volume
|
||||
|
||||
HistOilPrTotal = 75, // Well's total cumulative oil production
|
||||
// (observed/historical rates)
|
||||
HistWatPrTotal = 76, // Well's total cumulative water
|
||||
@ -176,15 +169,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
HistGasInjTotal = 82, // Well's total cumulative gas injection
|
||||
// (observed/historical rates)
|
||||
|
||||
PrimGuideRate_2 = 91, // Second copy of well's primary guide rate.
|
||||
// Not fully characterised.
|
||||
WatPrGuideRate_2 = 92, // Second copy of well's producer guide rate for water.
|
||||
// Not fully characterised.
|
||||
GasPrGuideRate_2 = 93, // Second copy of well's producer guide rate for gas
|
||||
// Not fully characterised.
|
||||
VoidPrGuideRate_2 = 94, // Second copy of well's producer guide rate for reservoir voidage
|
||||
// Not fully characterised.
|
||||
|
||||
WatVoidPrRate = 122, // Well's voidage production rate
|
||||
GasVoidPrRate = 123, // Well's voidage production rate
|
||||
};
|
||||
|
@ -26,7 +26,6 @@ namespace Opm {
|
||||
|
||||
class Schedule;
|
||||
class EclipseGrid;
|
||||
class UnitSystem;
|
||||
|
||||
namespace RptIO {
|
||||
|
||||
@ -36,13 +35,12 @@ namespace Opm {
|
||||
unsigned value,
|
||||
const Schedule& schedule,
|
||||
const EclipseGrid& grid,
|
||||
const UnitSystem& unit_system,
|
||||
std::size_t time_step
|
||||
);
|
||||
|
||||
namespace workers {
|
||||
|
||||
void write_WELSPECS(std::ostream&, unsigned, const Schedule&, const EclipseGrid& grid, const UnitSystem&, std::size_t);
|
||||
void write_WELSPECS(std::ostream&, unsigned, const Schedule&, const EclipseGrid& grid, std::size_t);
|
||||
|
||||
} } }
|
||||
#endif // OPM_WRITE_RPT_HPP
|
||||
|
@ -54,9 +54,6 @@ public:
|
||||
double getSI() const;
|
||||
bool zero() const;
|
||||
|
||||
//epsilon limit = 1.E-20 (~= 0.)
|
||||
double epsilonLimit() const;
|
||||
|
||||
template<typename T>
|
||||
bool is() const;
|
||||
|
||||
@ -68,7 +65,6 @@ public:
|
||||
bool operator!=(const UDAValue& other) const;
|
||||
UDAValue& operator=(double value);
|
||||
UDAValue& operator=(const std::string& value);
|
||||
void update_value(const UDAValue& other);
|
||||
|
||||
bool is_numeric() { return numeric_value; }
|
||||
|
||||
|
@ -38,10 +38,9 @@ namespace Opm {
|
||||
|
||||
static EclipseConfig serializeObject();
|
||||
|
||||
InitConfig& init();
|
||||
const InitConfig& init() const;
|
||||
IOConfig& io();
|
||||
const IOConfig& io() const;
|
||||
const InitConfig& init() const;
|
||||
const InitConfig& getInitConfig() const;
|
||||
|
||||
bool operator==(const EclipseConfig& data) const;
|
||||
|
@ -77,8 +77,6 @@ namespace Opm {
|
||||
IOConfig& getIOConfig();
|
||||
|
||||
const InitConfig& getInitConfig() const;
|
||||
InitConfig& getInitConfig();
|
||||
|
||||
const SimulationConfig& getSimulationConfig() const;
|
||||
virtual const EclipseGrid& getInputGrid() const;
|
||||
|
||||
|
@ -110,7 +110,6 @@ namespace Opm {
|
||||
double getPinchThresholdThickness( ) const;
|
||||
PinchMode::ModeEnum getPinchOption( ) const;
|
||||
PinchMode::ModeEnum getMultzOption( ) const;
|
||||
PinchMode::ModeEnum getPinchGapMode( ) const;
|
||||
|
||||
MinpvMode::ModeEnum getMinpvMode() const;
|
||||
const std::vector<double>& getMinpvVector( ) const;
|
||||
@ -197,7 +196,6 @@ namespace Opm {
|
||||
Value<double> m_pinch;
|
||||
PinchMode::ModeEnum m_pinchoutMode;
|
||||
PinchMode::ModeEnum m_multzMode;
|
||||
PinchMode::ModeEnum m_pinchGapMode;
|
||||
|
||||
bool m_circle = false;
|
||||
|
||||
|
@ -28,9 +28,7 @@ namespace Opm {
|
||||
enum ModeEnum {
|
||||
ALL = 1,
|
||||
TOPBOT = 2,
|
||||
TOP = 3,
|
||||
GAP = 4,
|
||||
NOGAP = 5,
|
||||
TOP = 3
|
||||
};
|
||||
|
||||
const std::string PinchMode2String(const ModeEnum enumValue);
|
||||
|
@ -19,50 +19,227 @@
|
||||
#ifndef ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
|
||||
#define ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Phases;
|
||||
class TableManager;
|
||||
}
|
||||
|
||||
namespace Opm { namespace satfunc {
|
||||
namespace satfunc {
|
||||
|
||||
struct RawTableEndPoints
|
||||
{
|
||||
struct {
|
||||
std::vector<double> gas;
|
||||
std::vector<double> water;
|
||||
} connate;
|
||||
std::vector<double> SGLEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
struct {
|
||||
std::vector<double> oil_in_gas;
|
||||
std::vector<double> oil_in_water;
|
||||
std::vector<double> gas;
|
||||
std::vector<double> water;
|
||||
} critical;
|
||||
std::vector<double> ISGLEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
struct {
|
||||
std::vector<double> gas;
|
||||
std::vector<double> water;
|
||||
} maximum;
|
||||
};
|
||||
std::vector<double> SGUEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::shared_ptr<RawTableEndPoints>
|
||||
getRawTableEndpoints(const Opm::TableManager& tm,
|
||||
const Opm::Phases& phases,
|
||||
const double tolcrit);
|
||||
std::vector<double> ISGUEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SWLEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISWLEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SWUEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISWUEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SGCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISGCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SOWCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISOWCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SOGCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISOGCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> SWCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> ISWCREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> PCWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IPCWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> PCGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IPCGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRWREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRWREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KROEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKROEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRORWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRORWEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRORGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRORGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRGEndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> KRGREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> IKRGREndpoint(const TableManager&,
|
||||
const Phases&,
|
||||
const std::vector<double>&,
|
||||
const std::vector<int>&,
|
||||
const std::vector<int>&);
|
||||
|
||||
std::vector<double> init(const std::string& kewyord,
|
||||
const TableManager& tables,
|
||||
const Phases& phases,
|
||||
const RawTableEndPoints& ep,
|
||||
const std::vector<double>& cell_depth,
|
||||
const std::vector<int>& num,
|
||||
const std::vector<int>& endnum);
|
||||
|
||||
}} // namespace Opm::satfunc
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
|
||||
|
@ -165,7 +165,7 @@ namespace Opm {
|
||||
const std::string& getEclipseInputPath() const;
|
||||
|
||||
void overrideNOSIM(bool nosim);
|
||||
void consistentFileFlags();
|
||||
|
||||
|
||||
std::string getRestartFileName(const std::string& restart_base, int report_step, bool output) const;
|
||||
|
||||
|
@ -278,7 +278,6 @@ public:
|
||||
const EclHysterConfig& hysterPar() const noexcept;
|
||||
const Actdims& actdims() const noexcept;
|
||||
const SatFuncControls& saturationFunctionControls() const noexcept;
|
||||
int nupcol() const noexcept;
|
||||
|
||||
bool operator==(const Runspec& data) const;
|
||||
|
||||
@ -306,7 +305,6 @@ private:
|
||||
EclHysterConfig hystpar;
|
||||
Actdims m_actdims;
|
||||
SatFuncControls m_sfuncctrl;
|
||||
int m_nupcol;
|
||||
};
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <map>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Action {
|
||||
@ -38,7 +37,7 @@ namespace Action {
|
||||
|
||||
class Context {
|
||||
public:
|
||||
explicit Context(const SummaryState& summary_state, const WListManager& wlm);
|
||||
explicit Context(const SummaryState& summary_state);
|
||||
|
||||
/*
|
||||
The get methods will first check the internal storage in the 'values' map
|
||||
@ -51,11 +50,9 @@ public:
|
||||
void add(const std::string& func, double value);
|
||||
|
||||
std::vector<std::string> wells(const std::string& func) const;
|
||||
const WListManager& wlist_manager() const;
|
||||
|
||||
private:
|
||||
const SummaryState& summary_state;
|
||||
const WListManager& wlm;
|
||||
std::map<std::string, double> values;
|
||||
};
|
||||
}
|
||||
|
@ -101,9 +101,9 @@ public:
|
||||
void add_well(const std::string& well);
|
||||
|
||||
Result& operator|=(const Result& other);
|
||||
Result& operator=(const Result& src);
|
||||
Result& operator=(const Result& src);
|
||||
Result& operator&=(const Result& other);
|
||||
|
||||
|
||||
private:
|
||||
void assign(bool value);
|
||||
bool result;
|
||||
|
@ -36,7 +36,6 @@ namespace Opm {
|
||||
class DeckKeyword;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
|
||||
/*
|
||||
The ActionX class internalizes the ACTIONX keyword. This keyword represents a
|
||||
@ -72,15 +71,13 @@ public:
|
||||
static ActionX serializeObject();
|
||||
|
||||
void addKeyword(const DeckKeyword& kw);
|
||||
bool ready(const State& state, std::time_t sim_time) const;
|
||||
Action::Result eval(const Action::Context& context) const;
|
||||
bool ready(std::time_t sim_time) const;
|
||||
Action::Result eval(std::time_t sim_time, const Action::Context& context) const;
|
||||
|
||||
|
||||
std::string name() const { return this->m_name; }
|
||||
size_t max_run() const { return this->m_max_run; }
|
||||
double min_wait() const { return this->m_min_wait; }
|
||||
std::size_t id() const;
|
||||
void update_id(std::size_t id);
|
||||
std::time_t start_time() const { return this->m_start_time; }
|
||||
std::vector<DeckKeyword>::const_iterator begin() const;
|
||||
std::vector<DeckKeyword>::const_iterator end() const;
|
||||
@ -102,10 +99,11 @@ public:
|
||||
serializer(m_max_run);
|
||||
serializer(m_min_wait);
|
||||
serializer(m_start_time);
|
||||
serializer(m_id);
|
||||
serializer.vector(keywords);
|
||||
condition.serializeOp(serializer);
|
||||
serializer.vector(m_conditions);
|
||||
serializer(run_count);
|
||||
serializer(last_run);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -113,11 +111,12 @@ private:
|
||||
size_t m_max_run = 0;
|
||||
double m_min_wait = 0.0;
|
||||
std::time_t m_start_time;
|
||||
std::size_t m_id = 0;
|
||||
|
||||
std::vector<DeckKeyword> keywords;
|
||||
Action::AST condition;
|
||||
std::vector<Condition> m_conditions;
|
||||
mutable size_t run_count = 0;
|
||||
mutable std::time_t last_run = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -31,8 +31,6 @@
|
||||
namespace Opm {
|
||||
namespace Action {
|
||||
|
||||
class State;
|
||||
|
||||
/*
|
||||
The Actions class is a container of ACTIONX keywords. The main functionality
|
||||
is to provide a list of ACTIONX keywords which are ready to be evaluated.
|
||||
@ -50,10 +48,10 @@ public:
|
||||
bool empty() const;
|
||||
void add(const ActionX& action);
|
||||
void add(const PyAction& pyaction);
|
||||
bool ready(const State& state, std::time_t sim_time) const;
|
||||
bool ready(std::time_t sim_time) const;
|
||||
const ActionX& get(const std::string& name) const;
|
||||
const ActionX& get(std::size_t index) const;
|
||||
std::vector<const ActionX *> pending(const State& state, std::time_t sim_time) const;
|
||||
std::vector<const ActionX *> pending(std::time_t sim_time) const;
|
||||
std::vector<const PyAction *> pending_python() const;
|
||||
|
||||
std::vector<ActionX>::const_iterator begin() const;
|
||||
|
@ -1,59 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 ACTION_STATE_HPP
|
||||
#define ACTION_STATE_HPP
|
||||
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
|
||||
namespace Opm {
|
||||
namespace Action {
|
||||
|
||||
class ActionX;
|
||||
class State {
|
||||
|
||||
struct RunState {
|
||||
RunState(std::time_t sim_time) :
|
||||
run_count(1),
|
||||
last_run(sim_time)
|
||||
{}
|
||||
|
||||
void add_run(std::time_t sim_time) {
|
||||
this->last_run = sim_time;
|
||||
this->run_count += 1;
|
||||
}
|
||||
|
||||
|
||||
std::size_t run_count;
|
||||
std::time_t last_run;
|
||||
};
|
||||
|
||||
public:
|
||||
void add_run(const ActionX& action, std::time_t sim_time);
|
||||
std::size_t run_count(const ActionX& action) const;
|
||||
std::time_t run_time(const ActionX& action) const;
|
||||
private:
|
||||
std::map<std::pair<std::string, std::size_t>, RunState> run_state;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,253 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 GAS_LIFT_OPT_HPP
|
||||
#define GAS_LIFT_OPT_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class GasLiftOpt {
|
||||
public:
|
||||
|
||||
class Group {
|
||||
public:
|
||||
Group() = default;
|
||||
|
||||
Group(const std::string& name) :
|
||||
m_name(name)
|
||||
{}
|
||||
|
||||
const std::optional<double>& max_lift_gas() const {
|
||||
return this->m_max_lift_gas;
|
||||
}
|
||||
|
||||
void max_lift_gas(double value) {
|
||||
if (value >= 0)
|
||||
this->m_max_lift_gas = value;
|
||||
}
|
||||
|
||||
const std::optional<double>& max_total_gas() const {
|
||||
return this->m_max_total_gas;
|
||||
}
|
||||
|
||||
void max_total_gas(double value) {
|
||||
if (value >= 0)
|
||||
this->m_max_total_gas = value;
|
||||
}
|
||||
|
||||
const std::string& name() const {
|
||||
return this->m_name;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_max_lift_gas);
|
||||
serializer(m_max_total_gas);
|
||||
}
|
||||
|
||||
|
||||
static Group serializeObject() {
|
||||
Group group;
|
||||
group.m_name = "GR";
|
||||
group.m_max_lift_gas = 100;
|
||||
group.m_max_total_gas = 200;
|
||||
return group;
|
||||
}
|
||||
|
||||
|
||||
bool operator==(const Group& other) const {
|
||||
return this->m_name == other.m_name &&
|
||||
this->m_max_lift_gas == other.m_max_lift_gas &&
|
||||
this->m_max_total_gas == other.m_max_total_gas;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
std::optional<double> m_max_lift_gas;
|
||||
std::optional<double> m_max_total_gas;
|
||||
};
|
||||
|
||||
|
||||
class Well {
|
||||
public:
|
||||
Well() = default;
|
||||
Well(const std::string& name, bool use_glo) :
|
||||
m_name(name),
|
||||
m_use_glo(use_glo)
|
||||
{}
|
||||
|
||||
const std::string& name() const {
|
||||
return this->m_name;
|
||||
}
|
||||
|
||||
bool use_glo() const {
|
||||
return this->m_use_glo;
|
||||
}
|
||||
|
||||
void max_rate(double value) {
|
||||
this->m_max_rate = value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
The semantics of the max_rate is quite complicated:
|
||||
|
||||
1. If the std::optional<double> has a value that value should be
|
||||
used as the maximum rate and all is fine.
|
||||
|
||||
2. If the std::optional<double> does not a have well we must check
|
||||
the value of Well::use_glo():
|
||||
|
||||
False: The maximum gas lift should have been set with WCONPROD /
|
||||
WELTARG - this code does not provide a value in that case.
|
||||
|
||||
True: If the well should be controlled with gas lift optimization
|
||||
the value to use should be the largest ALQ value in the wells
|
||||
VFP table.
|
||||
*/
|
||||
const std::optional<double>& max_rate() const {
|
||||
return this->m_max_rate;
|
||||
}
|
||||
|
||||
void weight_factor(double value) {
|
||||
if (this->m_use_glo)
|
||||
this->m_weight = value;
|
||||
}
|
||||
|
||||
double weight_factor() const {
|
||||
return this->m_weight;
|
||||
}
|
||||
|
||||
void inc_weight_factor(double value) {
|
||||
if (this->m_use_glo)
|
||||
this->m_inc_weight = value;
|
||||
}
|
||||
|
||||
double inc_weight_factor() const {
|
||||
return this->m_inc_weight;
|
||||
}
|
||||
|
||||
void min_rate(double value) {
|
||||
if (this->m_use_glo)
|
||||
this->m_min_rate = value;
|
||||
}
|
||||
|
||||
double min_rate() const {
|
||||
return this->m_min_rate;
|
||||
}
|
||||
|
||||
void alloc_extra_gas(bool value) {
|
||||
if (this->m_use_glo)
|
||||
this->m_alloc_extra_gas = value;
|
||||
}
|
||||
|
||||
bool alloc_extra_gas() const {
|
||||
return this->m_alloc_extra_gas;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_use_glo);
|
||||
serializer(m_max_rate);
|
||||
serializer(m_min_rate);
|
||||
serializer(m_weight);
|
||||
serializer(m_inc_weight);
|
||||
serializer(m_alloc_extra_gas);
|
||||
}
|
||||
|
||||
static Well serializeObject() {
|
||||
Well well;
|
||||
well.m_name = "WELL";
|
||||
well.m_max_rate = 2000;
|
||||
well.m_min_rate = 56;
|
||||
well.m_use_glo = true;
|
||||
well.m_weight = 1.25;
|
||||
well.m_inc_weight = 0.25;
|
||||
well.m_alloc_extra_gas = false;
|
||||
return well;
|
||||
}
|
||||
|
||||
bool operator==(const Well& other) const {
|
||||
return this->m_name == other.m_name &&
|
||||
this->m_max_rate == other.m_max_rate &&
|
||||
this->m_min_rate == other.m_min_rate &&
|
||||
this->m_use_glo == other.m_use_glo &&
|
||||
this->m_weight == other.m_weight &&
|
||||
this->m_inc_weight == other.m_inc_weight &&
|
||||
this->m_alloc_extra_gas == other.m_alloc_extra_gas;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
std::optional<double> m_max_rate;
|
||||
double m_min_rate = 0;
|
||||
bool m_use_glo;
|
||||
double m_weight = 1;
|
||||
double m_inc_weight = 0;
|
||||
bool m_alloc_extra_gas = false;
|
||||
};
|
||||
|
||||
GasLiftOpt() = default;
|
||||
|
||||
const Group& group(const std::string& gname) const;
|
||||
const Well& well(const std::string& wname) const;
|
||||
|
||||
double gaslift_increment() const;
|
||||
void gaslift_increment(double gaslift_increment);
|
||||
double min_eco_gradient() const;
|
||||
void min_eco_gradient(double min_eco_gradient);
|
||||
void min_wait(double min_wait);
|
||||
void all_newton(double all_newton);
|
||||
void add_group(const Group& group);
|
||||
void add_well(const Well& well);
|
||||
bool active() const;
|
||||
|
||||
static GasLiftOpt serializeObject();
|
||||
bool operator==(const GasLiftOpt& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_increment);
|
||||
serializer(m_min_eco_gradient);
|
||||
serializer(m_min_wait);
|
||||
serializer(m_all_newton);
|
||||
serializer.map(m_groups);
|
||||
serializer.map(m_wells);
|
||||
}
|
||||
private:
|
||||
double m_increment = 0;
|
||||
double m_min_eco_gradient;
|
||||
double m_min_wait;
|
||||
bool m_all_newton = true;
|
||||
|
||||
std::map<std::string, GasLiftOpt::Group> m_groups;
|
||||
std::map<std::string, GasLiftOpt::Well> m_wells;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -1,75 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 GPMAINT_HPP
|
||||
#define GPMAINT_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckRecord;
|
||||
|
||||
class GPMaint {
|
||||
public:
|
||||
|
||||
enum class FlowTarget {
|
||||
RESV_PROD = 0,
|
||||
RESV_OINJ = 1,
|
||||
RESV_WINJ = 2,
|
||||
RESV_GINJ = 3,
|
||||
SURF_OINJ = 4,
|
||||
SURF_WINJ = 5,
|
||||
SURF_GINJ = 6,
|
||||
};
|
||||
|
||||
GPMaint() = default;
|
||||
explicit GPMaint(const DeckRecord& record);
|
||||
static GPMaint serializeObject();
|
||||
|
||||
double pressure_target() const;
|
||||
double prop_constant() const;
|
||||
double time_constant() const;
|
||||
std::optional<std::pair<std::string, int>> region() const;
|
||||
FlowTarget flow_target() const;
|
||||
bool operator==(const GPMaint& other) const;
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_flow_target);
|
||||
serializer(m_region_number);
|
||||
serializer(m_region_name);
|
||||
serializer(m_pressure_target);
|
||||
serializer(m_prop_constant);
|
||||
serializer(m_time_constant);
|
||||
}
|
||||
|
||||
private:
|
||||
static FlowTarget FlowTargetFromString(const std::string& stringvalue);
|
||||
FlowTarget m_flow_target;
|
||||
int m_region_number;
|
||||
std::string m_region_name;
|
||||
double m_pressure_target;
|
||||
double m_prop_constant;
|
||||
double m_time_constant;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -41,8 +41,6 @@ public:
|
||||
const std::string& parent_name() const;
|
||||
|
||||
const Group& group() const;
|
||||
std::size_t level() const;
|
||||
std::vector<const GTNode*> all_nodes() const;
|
||||
private:
|
||||
const Group m_group;
|
||||
std::size_t m_level;
|
||||
|
@ -24,19 +24,15 @@
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/UDAValue.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/IOrderSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class SummaryState;
|
||||
class UDQConfig;
|
||||
class UDQActive;
|
||||
class Group {
|
||||
public:
|
||||
|
||||
@ -118,7 +114,7 @@ struct GroupInjectionProperties {
|
||||
UDAValue target_void_fraction;
|
||||
std::string reinj_group;
|
||||
std::string voidage_group;
|
||||
bool available_group_control = true;
|
||||
bool available_group_control;
|
||||
|
||||
static GroupInjectionProperties serializeObject();
|
||||
|
||||
@ -156,12 +152,6 @@ struct InjectionControls {
|
||||
};
|
||||
|
||||
struct GroupProductionProperties {
|
||||
GroupProductionProperties() = default;
|
||||
GroupProductionProperties(const std::string& gname) :
|
||||
name(gname)
|
||||
{}
|
||||
|
||||
std::string name;
|
||||
ProductionCMode cmode = ProductionCMode::NONE;
|
||||
ExceedAction exceed_action = ExceedAction::NONE;
|
||||
UDAValue oil_target;
|
||||
@ -169,7 +159,7 @@ struct GroupProductionProperties {
|
||||
UDAValue gas_target;
|
||||
UDAValue liquid_target;
|
||||
double guide_rate;
|
||||
GuideRateTarget guide_rate_def = GuideRateTarget::NO_GUIDE_RATE;
|
||||
GuideRateTarget guide_rate_def;
|
||||
double resv_target = 0;
|
||||
bool available_group_control = true;
|
||||
static GroupProductionProperties serializeObject();
|
||||
@ -177,12 +167,10 @@ struct GroupProductionProperties {
|
||||
int production_controls = 0;
|
||||
bool operator==(const GroupProductionProperties& other) const;
|
||||
bool operator!=(const GroupProductionProperties& other) const;
|
||||
bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(name);
|
||||
serializer(cmode);
|
||||
serializer(exceed_action);
|
||||
oil_target.serializeOp(serializer);
|
||||
@ -206,7 +194,7 @@ struct ProductionControls {
|
||||
double gas_target;
|
||||
double liquid_target;
|
||||
double guide_rate;
|
||||
GuideRateTarget guide_rate_def = GuideRateTarget::NO_GUIDE_RATE;
|
||||
GuideRateTarget guide_rate_def;
|
||||
double resv_target = 0;
|
||||
int production_controls = 0;
|
||||
bool has_control(ProductionCMode control) const;
|
||||
@ -265,9 +253,6 @@ struct ProductionControls {
|
||||
bool has_control(InjectionCMode control) const;
|
||||
bool productionGroupControlAvailable() const;
|
||||
bool injectionGroupControlAvailable(const Phase phase) const;
|
||||
const std::optional<GPMaint>& gpmaint() const;
|
||||
void set_gpmaint(GPMaint gpmaint);
|
||||
void set_gpmaint();
|
||||
|
||||
bool operator==(const Group& data) const;
|
||||
const Phase& topup_phase() const;
|
||||
@ -291,7 +276,6 @@ struct ProductionControls {
|
||||
serializer.map(injection_properties);
|
||||
production_properties.serializeOp(serializer);
|
||||
serializer(m_topup_phase);
|
||||
serializer(m_gpmaint);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -313,9 +297,8 @@ private:
|
||||
IOrderSet<std::string> m_groups;
|
||||
|
||||
std::map<Phase, GroupInjectionProperties> injection_properties;
|
||||
GroupProductionProperties production_properties;
|
||||
GroupProductionProperties production_properties{};
|
||||
std::pair<Phase, bool> m_topup_phase{Phase::WATER, false};
|
||||
std::optional<GPMaint> m_gpmaint;
|
||||
};
|
||||
|
||||
Group::GroupType operator |(Group::GroupType lhs, Group::GroupType rhs);
|
||||
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 AICD_HPP_HEADER_INCLUDED
|
||||
#define AICD_HPP_HEADER_INCLUDED
|
||||
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckRecord;
|
||||
class DeckKeyword;
|
||||
|
||||
class AutoICD : public SICD {
|
||||
public:
|
||||
AutoICD() = default;
|
||||
AutoICD(const DeckRecord& record);
|
||||
|
||||
static AutoICD serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, aicd1>, <seg2, aicd2> ...]
|
||||
// ....
|
||||
static std::map<std::string, std::vector<std::pair<int, AutoICD> > >
|
||||
fromWSEGAICD(const DeckKeyword& wsegaicd);
|
||||
|
||||
bool operator==(const AutoICD& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
AutoICD::serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
double m_flow_rate_exponent;
|
||||
double m_visc_exponent;
|
||||
double m_oil_density_exponent;
|
||||
double m_water_density_exponent;
|
||||
double m_gas_density_exponent;
|
||||
double m_oil_viscosity_exponent;
|
||||
double m_water_viscosity_exponent;
|
||||
double m_gas_viscosity_exponent;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -20,16 +20,13 @@
|
||||
#ifndef SEGMENT_HPP_HEADER_INCLUDED
|
||||
#define SEGMENT_HPP_HEADER_INCLUDED
|
||||
|
||||
#include <optional>
|
||||
#include <variant>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/AICD.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
class SpiralICD;
|
||||
class Valve;
|
||||
|
||||
namespace RestartIO {
|
||||
struct RstSegment;
|
||||
}
|
||||
@ -37,29 +34,6 @@ namespace Opm {
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*
|
||||
The current serialization of std::variant<> requires that all the types in
|
||||
the variant have serializeOp() method, that is why this RegularSegment
|
||||
type is introduced, ideally the icd variant should just have
|
||||
std::monostate to represent the regular non ICD segment.
|
||||
*/
|
||||
struct RegularSegment : std::monostate {
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer&) {
|
||||
}
|
||||
|
||||
static RegularSegment serializeObject() {
|
||||
return RegularSegment();
|
||||
}
|
||||
|
||||
|
||||
bool operator==(const RegularSegment& ) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class Segment {
|
||||
public:
|
||||
|
||||
@ -76,7 +50,7 @@ namespace Opm {
|
||||
Segment(const Segment& src, double new_depth, double new_length);
|
||||
Segment(const Segment& src, double new_volume);
|
||||
Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in,
|
||||
double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in);
|
||||
double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in, SegmentType segment_type_in);
|
||||
Segment(const RestartIO::RstSegment& rst_segment);
|
||||
|
||||
static Segment serializeObject();
|
||||
@ -84,7 +58,6 @@ namespace Opm {
|
||||
int segmentNumber() const;
|
||||
int branchNumber() const;
|
||||
int outletSegment() const;
|
||||
double perfLength() const;
|
||||
double totalLength() const;
|
||||
double depth() const;
|
||||
double internalDiameter() const;
|
||||
@ -105,37 +78,13 @@ namespace Opm {
|
||||
bool operator==( const Segment& ) const;
|
||||
bool operator!=( const Segment& ) const;
|
||||
|
||||
const SICD& spiralICD() const;
|
||||
const AutoICD& autoICD() const;
|
||||
const Valve& valve() const;
|
||||
const std::shared_ptr<SpiralICD>& spiralICD() const;
|
||||
const Valve* valve() const;
|
||||
|
||||
void updatePerfLength(double perf_length);
|
||||
void updateSpiralICD(const SICD& spiral_icd);
|
||||
void updateAutoICD(const AutoICD& aicd);
|
||||
void updateSpiralICD(const SpiralICD& spiral_icd);
|
||||
void updateValve(const Valve& valve, const double segment_length);
|
||||
void updateValve(const Valve& valve);
|
||||
void addInletSegment(const int segment_number);
|
||||
|
||||
bool isRegular() const
|
||||
{
|
||||
return std::holds_alternative<RegularSegment>(this->m_icd);
|
||||
}
|
||||
|
||||
inline bool isSpiralICD() const
|
||||
{
|
||||
return std::holds_alternative<SICD>(this->m_icd);
|
||||
}
|
||||
|
||||
inline bool isAICD() const
|
||||
{
|
||||
return std::holds_alternative<AutoICD>(this->m_icd);
|
||||
}
|
||||
|
||||
inline bool isValve() const
|
||||
{
|
||||
return std::holds_alternative<Valve>(this->m_icd);
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
@ -150,12 +99,12 @@ namespace Opm {
|
||||
serializer(m_cross_area);
|
||||
serializer(m_volume);
|
||||
serializer(m_data_ready);
|
||||
serializer(m_perf_length);
|
||||
serializer(m_icd);
|
||||
serializer(m_segment_type);
|
||||
serializer(m_spiral_icd);
|
||||
serializer(m_valve);
|
||||
}
|
||||
|
||||
private:
|
||||
void updateValve__(Valve& valve, const double segment_length);
|
||||
// segment number
|
||||
// it should work as a ID.
|
||||
int m_segment_number;
|
||||
@ -201,8 +150,17 @@ namespace Opm {
|
||||
// the volume will be updated at a final step.
|
||||
bool m_data_ready;
|
||||
|
||||
std::optional<double> m_perf_length;
|
||||
std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
|
||||
// indicate the type of the segment
|
||||
// regular, spiral ICD, or Valve.
|
||||
SegmentType m_segment_type;
|
||||
|
||||
// information related to SpiralICD. It is nullptr for segments are not
|
||||
// spiral ICD type
|
||||
std::shared_ptr<SpiralICD> m_spiral_icd;
|
||||
|
||||
// information related to sub-critical valve. It is nullptr for segments are not
|
||||
// of type of Valve
|
||||
std::shared_ptr<Valve> m_valve;
|
||||
|
||||
// We are not handling the length of segment projected onto the X-axis and Y-axis.
|
||||
// They are not used in the simulations and we are not supporting the plotting.
|
||||
@ -210,6 +168,20 @@ namespace Opm {
|
||||
// while they are not supported by the keyword at the moment.
|
||||
};
|
||||
|
||||
inline bool isRegular(const Segment& segment)
|
||||
{
|
||||
return segment.segmentType() == Segment::SegmentType::REGULAR;
|
||||
}
|
||||
|
||||
inline bool isSpiralICD(const Segment& segment)
|
||||
{
|
||||
return segment.segmentType() == Segment::SegmentType::SICD;
|
||||
}
|
||||
|
||||
inline bool isValve(const Segment& segment)
|
||||
{
|
||||
return segment.segmentType() == Segment::SegmentType::VALVE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -27,17 +27,18 @@
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class SICD {
|
||||
class DeckRecord;
|
||||
class DeckKeyword;
|
||||
|
||||
class SpiralICD {
|
||||
public:
|
||||
|
||||
SICD();
|
||||
explicit SICD(const DeckRecord& record);
|
||||
SICD(double strength,
|
||||
SpiralICD();
|
||||
explicit SpiralICD(const DeckRecord& record);
|
||||
SpiralICD(double strength,
|
||||
double length,
|
||||
double densityCalibration,
|
||||
double viscosityCalibration,
|
||||
@ -49,13 +50,13 @@ namespace Opm {
|
||||
ICDStatus status,
|
||||
double scalingFactor);
|
||||
|
||||
static SICD serializeObject();
|
||||
static SpiralICD serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, sicd1>, <seg2, sicd2> ...]
|
||||
// ....
|
||||
static std::map<std::string, std::vector<std::pair<int, SICD> > >
|
||||
static std::map<std::string, std::vector<std::pair<int, SpiralICD> > >
|
||||
fromWSEGSICD(const DeckKeyword& wsegsicd);
|
||||
|
||||
double maxAbsoluteRate() const;
|
||||
@ -72,7 +73,7 @@ namespace Opm {
|
||||
void updateScalingFactor(const double segment_length, const double completion_length);
|
||||
double scalingFactor() const;
|
||||
int ecl_status() const;
|
||||
bool operator==(const SICD& data) const;
|
||||
bool operator==(const SpiralICD& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
@ -90,33 +91,6 @@ namespace Opm {
|
||||
serializer(m_scaling_factor);
|
||||
}
|
||||
|
||||
template<class ICD>
|
||||
static std::map<std::string, std::vector<std::pair<int, ICD> > >
|
||||
fromWSEG(const DeckKeyword& wseg) {
|
||||
std::map<std::string, std::vector<std::pair<int, ICD> > > res;
|
||||
|
||||
for (const DeckRecord &record : wseg) {
|
||||
const std::string well_name = record.getItem("WELL").getTrimmedString(0);
|
||||
|
||||
const int start_segment = record.getItem("SEG1").get<int>(0);
|
||||
const int end_segment = record.getItem("SEG2").get<int>(0);
|
||||
|
||||
if (start_segment < 2 || end_segment < 2 || end_segment < start_segment) {
|
||||
const std::string message = "Segment numbers " + std::to_string(start_segment) + " and "
|
||||
+ std::to_string(end_segment) + " specified in WSEGSICD for well " +
|
||||
well_name
|
||||
+ " are illegal ";
|
||||
throw std::invalid_argument(message);
|
||||
}
|
||||
|
||||
const ICD spiral_icd(record);
|
||||
for (int seg = start_segment; seg <= end_segment; seg++) {
|
||||
res[well_name].push_back(std::make_pair(seg, spiral_icd));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private:
|
||||
double m_strength;
|
||||
double m_length;
|
@ -20,16 +20,14 @@
|
||||
#ifndef SEGMENTSET_HPP_HEADER_INCLUDED
|
||||
#define SEGMENTSET_HPP_HEADER_INCLUDED
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class SICD;
|
||||
class SpiralICD;
|
||||
class Valve;
|
||||
class WellConnections;
|
||||
}
|
||||
|
||||
namespace Opm {
|
||||
@ -86,7 +84,6 @@ namespace Opm {
|
||||
|
||||
const Segment& operator[](size_t idx) const;
|
||||
void orderSegments();
|
||||
void updatePerfLength(const WellConnections& connections);
|
||||
|
||||
bool operator==( const WellSegments& ) const;
|
||||
bool operator!=( const WellSegments& ) const;
|
||||
@ -94,10 +91,9 @@ namespace Opm {
|
||||
double segmentLength(const int segment_number) const;
|
||||
double segmentDepthChange(const int segment_number) const;
|
||||
std::vector<Segment> branchSegments(int branch) const;
|
||||
std::set<int> branches() const;
|
||||
|
||||
// it returns true if there is no error encountered during the update
|
||||
bool updateWSEGSICD(const std::vector<std::pair<int, SICD> >& sicd_pairs);
|
||||
bool updateWSEGSICD(const std::vector<std::pair<int, SpiralICD> >& sicd_pairs);
|
||||
|
||||
bool updateWSEGVALV(const std::vector<std::pair<int, Valve> >& valve_pairs);
|
||||
const std::vector<Segment>::const_iterator begin() const;
|
||||
|
@ -28,6 +28,13 @@ enum class ICDStatus {
|
||||
SHUT
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
T from_int(int int_status);
|
||||
|
||||
template<typename T>
|
||||
int to_int(T status);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
|
||||
|
||||
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 UPDATING_CONNECTIONS_WITH_SEGMENTS
|
||||
#define UPDATING_CONNECTIONS_WITH_SEGMENTS
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/WellSegments.hpp>
|
||||
|
||||
namespace Opm {
|
||||
WellConnections * newConnectionsWithSegments(const DeckKeyword& compsegs, const WellConnections& input_connections,
|
||||
const WellSegments& segments, const EclipseGrid& grid,
|
||||
const ParseContext& parseContext, ErrorGuard& errors);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 NETWORK_BRANCH_HPP
|
||||
#define NETWORK_BRANCH_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
namespace Network {
|
||||
|
||||
class Branch {
|
||||
public:
|
||||
|
||||
enum class AlqEQ {
|
||||
OIL_DENSITY,
|
||||
GAS_DENSITY,
|
||||
ALQ_INPUT
|
||||
};
|
||||
|
||||
|
||||
static AlqEQ AlqEqfromString(const std::string& input_string);
|
||||
|
||||
Branch() = default;
|
||||
Branch(const std::string& downtree_node, const std::string& uptree_node, int vfp_table, double alq);
|
||||
Branch(const std::string& downtree_node, const std::string& uptree_node, int vfp_table, AlqEQ alq_eq);
|
||||
|
||||
const std::string& downtree_node() const;
|
||||
const std::string& uptree_node() const;
|
||||
std::optional<int> vfp_table() const;
|
||||
AlqEQ alq_eq() const;
|
||||
std::optional<double> alq_value() const;
|
||||
|
||||
static Branch serializeObject();
|
||||
bool operator==(const Branch& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_downtree_node);
|
||||
serializer(m_uptree_node);
|
||||
serializer(m_vfp_table);
|
||||
serializer(m_alq_value);
|
||||
serializer(m_alq_eq);
|
||||
}
|
||||
private:
|
||||
std::string m_downtree_node;
|
||||
std::string m_uptree_node;
|
||||
int m_vfp_table;
|
||||
std::optional<double> m_alq_value;
|
||||
AlqEQ m_alq_eq;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 EXT_NETWORK_HPP
|
||||
#define EXT_NETWORK_HPP
|
||||
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Network/Branch.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Network/Node.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Network {
|
||||
|
||||
|
||||
class ExtNetwork {
|
||||
public:
|
||||
ExtNetwork() = default;
|
||||
bool active() const;
|
||||
bool has_node(const std::string& name) const;
|
||||
void add_node(Node node);
|
||||
void add_branch(Branch branch);
|
||||
void drop_branch(const std::string& uptree_node, const std::string& downtree_node);
|
||||
const Node& node(const std::string& name) const;
|
||||
const Node& root() const;
|
||||
std::vector<Branch> downtree_branches(const std::string& node) const;
|
||||
std::optional<Branch> uptree_branch(const std::string& node) const;
|
||||
|
||||
|
||||
bool operator==(const ExtNetwork& other) const;
|
||||
static ExtNetwork serializeObject();
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_branches);
|
||||
serializer.map(m_nodes);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Branch> m_branches;
|
||||
std::map<std::string, Node> m_nodes;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
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 NETWORK_NODE_HPP
|
||||
#define NETWORK_NODE_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
namespace Network {
|
||||
|
||||
class Node {
|
||||
public:
|
||||
Node() = default;
|
||||
Node(const std::string& name);
|
||||
|
||||
const std::string& name() const;
|
||||
const std::optional<double>& terminal_pressure() const;
|
||||
bool as_choke() const;
|
||||
bool add_gas_lift_gas() const;
|
||||
const std::optional<std::string>& target_group() const;
|
||||
|
||||
void terminal_pressure(double pressure);
|
||||
void add_gas_lift_gas(bool add_gas);
|
||||
void as_choke(const std::string& target_group);
|
||||
|
||||
static Node serializeObject();
|
||||
bool operator==(const Node& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_terminal_pressure);
|
||||
serializer(m_add_gas_lift_gas);
|
||||
serializer(m_choke_target_group);
|
||||
}
|
||||
private:
|
||||
std::string m_name;
|
||||
std::optional<double> m_terminal_pressure;
|
||||
std::optional<std::string> m_choke_target_group;
|
||||
bool m_add_gas_lift_gas = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
@ -41,7 +40,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
|
||||
@ -202,16 +200,6 @@ namespace Opm
|
||||
std::vector<std::string> groupNames(size_t timeStep) const;
|
||||
std::vector<std::string> groupNames(const std::string& pattern) const;
|
||||
std::vector<std::string> groupNames() const;
|
||||
/*
|
||||
The restart_groups function returns a vector of groups pointers which
|
||||
is organized as follows:
|
||||
|
||||
1. The number of elements is WELLDIMS::MAXGROUPS + 1
|
||||
2. The elements are sorted according to group.insert_index().
|
||||
3. If there are less than WELLDIMS::MAXGROUPS nullptr is used.
|
||||
4. The very last element corresponds to the FIELD group.
|
||||
*/
|
||||
std::vector<const Group*> restart_groups(size_t timeStep) const;
|
||||
|
||||
void updateWell(std::shared_ptr<Well> well, size_t reportStep);
|
||||
std::vector<std::string> changed_wells(size_t reportStep) const;
|
||||
@ -275,10 +263,6 @@ namespace Opm
|
||||
void applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result);
|
||||
int getNupcol(size_t reportStep) const;
|
||||
|
||||
|
||||
const Network::ExtNetwork& network(std::size_t report_step) const;
|
||||
const GasLiftOpt& glo(std::size_t report_step) const;
|
||||
|
||||
bool operator==(const Schedule& data) const;
|
||||
std::shared_ptr<const Python> python() const;
|
||||
|
||||
@ -321,8 +305,6 @@ namespace Opm
|
||||
gconsump.serializeOp(serializer);
|
||||
global_whistctl_mode.template serializeOp<Serializer, false>(serializer);
|
||||
m_actions.serializeOp(serializer);
|
||||
m_network.serializeOp(serializer);
|
||||
m_glo.serializeOp(serializer);
|
||||
rft_config.serializeOp(serializer);
|
||||
m_nupcol.template serializeOp<Serializer, false>(serializer);
|
||||
restart_config.serializeOp(serializer);
|
||||
@ -358,8 +340,6 @@ namespace Opm
|
||||
DynamicState<std::shared_ptr<GConSump>> gconsump;
|
||||
DynamicState<Well::ProducerCMode> global_whistctl_mode;
|
||||
DynamicState<std::shared_ptr<Action::Actions>> m_actions;
|
||||
DynamicState<std::shared_ptr<Network::ExtNetwork>> m_network;
|
||||
DynamicState<std::shared_ptr<GasLiftOpt>> m_glo;
|
||||
RFTConfig rft_config;
|
||||
DynamicState<int> m_nupcol;
|
||||
RestartConfig restart_config;
|
||||
@ -387,8 +367,6 @@ namespace Opm
|
||||
const UnitSystem& unit_system);
|
||||
|
||||
DynamicState<std::shared_ptr<RPTConfig>> rpt_config;
|
||||
void updateNetwork(std::shared_ptr<Network::ExtNetwork> network, std::size_t report_step);
|
||||
|
||||
GTNode groupTree(const std::string& root_node, std::size_t report_step, std::size_t level, const std::optional<std::string>& parent_name) const;
|
||||
void updateGroup(std::shared_ptr<Group> group, size_t reportStep);
|
||||
bool checkGroups(const ParseContext& parseContext, ErrorGuard& errors);
|
||||
@ -440,15 +418,9 @@ namespace Opm
|
||||
void handleLINCOM( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWEFAC( const DeckKeyword& keyword, size_t currentStep, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
|
||||
void handleBRANPROP( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleNODEPROP( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleLIFTOPT(const DeckKeyword& keyword, std::size_t currentStep);
|
||||
void handleGLIFTOPT(const DeckKeyword& keyword, std::size_t currentStep, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleWLIFTOPT(const DeckKeyword& keyword, std::size_t currentStep, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleTUNING( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handlePYACTION( std::shared_ptr<const Python> python, const std::string& input_path, const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleNUPCOL( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleGPMAINT( const DeckKeyword& keyword, size_t currentStep, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep, const UnitSystem& unit_system, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
void handleGRUPNET( const DeckKeyword& keyword, size_t currentStep, const UnitSystem& unit_system);
|
||||
void handleWRFT( const DeckKeyword& keyword, size_t currentStep);
|
||||
|
@ -20,13 +20,12 @@
|
||||
#ifndef SUMMARY_STATE_H
|
||||
#define SUMMARY_STATE_H
|
||||
|
||||
#include <chrono>
|
||||
#include <iosfwd>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace Opm{
|
||||
|
||||
@ -63,8 +62,6 @@ namespace Opm{
|
||||
st.has_well_var("OPY", "WGOR") => False
|
||||
*/
|
||||
|
||||
class UDQSet;
|
||||
|
||||
class SummaryState {
|
||||
public:
|
||||
typedef std::unordered_map<std::string, double>::const_iterator const_iterator;
|
||||
@ -76,10 +73,6 @@ public:
|
||||
*/
|
||||
void set(const std::string& key, double value);
|
||||
|
||||
bool erase(const std::string& key);
|
||||
bool erase_well_var(const std::string& well, const std::string& var);
|
||||
bool erase_group_var(const std::string& group, const std::string& var);
|
||||
|
||||
bool has(const std::string& key) const;
|
||||
bool has_well_var(const std::string& well, const std::string& var) const;
|
||||
bool has_group_var(const std::string& group, const std::string& var) const;
|
||||
@ -88,19 +81,15 @@ public:
|
||||
void update_well_var(const std::string& well, const std::string& var, double value);
|
||||
void update_group_var(const std::string& group, const std::string& var, double value);
|
||||
void update_elapsed(double delta);
|
||||
void update_udq(const UDQSet& udq_set);
|
||||
|
||||
double get(const std::string&) const;
|
||||
double get(const std::string&, double) const;
|
||||
double get_elapsed() const;
|
||||
double get_well_var(const std::string& well, const std::string& var) const;
|
||||
double get_group_var(const std::string& group, const std::string& var) const;
|
||||
double get_well_var(const std::string& well, const std::string& var, double) const;
|
||||
double get_group_var(const std::string& group, const std::string& var, double) const;
|
||||
|
||||
const std::vector<std::string>& wells() const;
|
||||
std::vector<std::string> wells() const;
|
||||
std::vector<std::string> wells(const std::string& var) const;
|
||||
const std::vector<std::string>& groups() const;
|
||||
std::vector<std::string> groups() const;
|
||||
std::vector<std::string> groups(const std::string& var) const;
|
||||
std::vector<char> serialize() const;
|
||||
void deserialize(const std::vector<char>& buffer);
|
||||
@ -116,12 +105,10 @@ private:
|
||||
// The first key is the variable and the second key is the well.
|
||||
std::unordered_map<std::string, std::unordered_map<std::string, double>> well_values;
|
||||
std::unordered_set<std::string> m_wells;
|
||||
mutable std::optional<std::vector<std::string>> well_names;
|
||||
|
||||
// The first key is the variable and the second key is the group.
|
||||
std::unordered_map<std::string, std::unordered_map<std::string, double>> group_values;
|
||||
std::unordered_set<std::string> m_groups;
|
||||
mutable std::optional<std::vector<std::string>> group_names;
|
||||
};
|
||||
|
||||
|
||||
|
@ -48,10 +48,10 @@ public:
|
||||
udq(udq_arg),
|
||||
input_index(input_index_arg),
|
||||
use_index(use_index_arg),
|
||||
wgname(wgname_arg),
|
||||
control(control_arg),
|
||||
uad_code(UDQ::uadCode(control_arg)),
|
||||
use_count(1),
|
||||
wgname(wgname_arg)
|
||||
use_count(1)
|
||||
{}
|
||||
|
||||
bool operator==(const Record& other) const {
|
||||
@ -85,16 +85,12 @@ public:
|
||||
std::string udq;
|
||||
std::size_t input_index;
|
||||
std::size_t use_index = 0;
|
||||
std::string wgname;
|
||||
UDAControl control;
|
||||
int uad_code;
|
||||
std::string wg_name() const;
|
||||
std::size_t use_count;
|
||||
private:
|
||||
// The wgname is need in the update process, but it should
|
||||
// not be exported out.
|
||||
std::string wgname;
|
||||
};
|
||||
|
||||
|
||||
class InputRecord {
|
||||
public:
|
||||
InputRecord() :
|
||||
|
@ -38,7 +38,6 @@ namespace Opm {
|
||||
|
||||
class DeckRecord;
|
||||
class Deck;
|
||||
class SummaryState;
|
||||
class UDQConfig {
|
||||
public:
|
||||
UDQConfig() = default;
|
||||
@ -56,7 +55,6 @@ namespace Opm {
|
||||
void add_assign(const std::string& quantity, const std::vector<std::string>& selector, double value);
|
||||
void add_define(const std::string& quantity, const std::vector<std::string>& expression);
|
||||
|
||||
void eval(SummaryState& st) const;
|
||||
std::vector<UDQDefine> definitions() const;
|
||||
std::vector<UDQDefine> definitions(UDQVarType var_type) const;
|
||||
std::vector<UDQInput> input() const;
|
||||
|
@ -179,8 +179,6 @@ namespace UDQ {
|
||||
std::string typeName(UDQVarType var_type);
|
||||
UDAKeyword keyword(UDAControl control);
|
||||
int uadCode(UDAControl control);
|
||||
|
||||
constexpr double restart_default = -0.3E+21;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,6 @@ public:
|
||||
std::vector<double> defined_values() const;
|
||||
std::size_t defined_size() const;
|
||||
const std::string& name() const;
|
||||
void name(const std::string& name);
|
||||
UDQVarType var_type() const;
|
||||
private:
|
||||
UDQSet() = default;
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/Value.hpp>
|
||||
@ -95,6 +94,8 @@ namespace RestartIO {
|
||||
const Direction direction,
|
||||
const CTFKind ctf_kind,
|
||||
const std::size_t sort_value,
|
||||
const double segDistStart,
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId);
|
||||
|
||||
Connection(const RestartIO::RstConnection& rst_connection, const EclipseGrid& grid, const FieldPropsManager& fp);
|
||||
@ -128,11 +129,13 @@ namespace RestartIO {
|
||||
void updateSegment(int segment_number_arg,
|
||||
double center_depth_arg,
|
||||
std::size_t compseg_insert_index,
|
||||
const std::pair<double,double>& perf_range);
|
||||
double start,
|
||||
double end);
|
||||
std::size_t sort_value() const;
|
||||
const bool& getDefaultSatTabId() const;
|
||||
void setDefaultSatTabId(bool id);
|
||||
const std::optional<std::pair<double, double>>& perf_range() const;
|
||||
const double& getSegDistStart() const;
|
||||
const double& getSegDistEnd() const;
|
||||
std::string str() const;
|
||||
bool ctfAssignedFromInput() const
|
||||
{
|
||||
@ -159,7 +162,8 @@ namespace RestartIO {
|
||||
serializer(m_global_index);
|
||||
serializer(m_ctfkind);
|
||||
serializer(m_sort_value);
|
||||
serializer(m_perf_range);
|
||||
serializer(m_segDistStart);
|
||||
serializer(m_segDistEnd);
|
||||
serializer(m_defaultSatTabId);
|
||||
serializer(segment_number);
|
||||
}
|
||||
@ -232,7 +236,8 @@ namespace RestartIO {
|
||||
*/
|
||||
|
||||
std::size_t m_sort_value;
|
||||
std::optional<std::pair<double,double>> m_perf_range;
|
||||
double m_segDistStart;
|
||||
double m_segDistEnd;
|
||||
bool m_defaultSatTabId;
|
||||
|
||||
// related segment number
|
||||
|
@ -16,9 +16,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef WLIST_HPP
|
||||
#define WLIST_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
@ -54,5 +51,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -16,9 +16,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef WLISTMANAGER_HPP
|
||||
#define WLISTMANAGER_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@ -41,7 +38,7 @@ public:
|
||||
void delWell(const std::string& well);
|
||||
|
||||
bool operator==(const WListManager& data) const;
|
||||
std::vector<std::string> wells(const std::string& wlist_pattern) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
@ -53,4 +50,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -49,7 +49,6 @@ struct WellInjectionProperties;
|
||||
class WellProductionProperties;
|
||||
class UDQActive;
|
||||
class UDQConfig;
|
||||
class SICD;
|
||||
|
||||
namespace RestartIO {
|
||||
struct RstWell;
|
||||
@ -251,7 +250,7 @@ public:
|
||||
|
||||
static WellInjectionProperties serializeObject();
|
||||
|
||||
void handleWELTARG(WELTARGCMode cmode, const UDAValue& new_arg, double SIFactorP);
|
||||
void handleWELTARG(WELTARGCMode cmode, double newValue, double SIFactorP);
|
||||
void handleWCONINJE(const DeckRecord& record, bool availableForGroupControl, const std::string& well_name);
|
||||
void handleWCONINJH(const DeckRecord& record, bool is_producer, const std::string& well_name);
|
||||
bool hasInjectionControl(InjectorCMode controlModeArg) const {
|
||||
@ -382,7 +381,7 @@ public:
|
||||
static bool effectiveHistoryProductionControl(ProducerCMode cmode);
|
||||
void handleWCONPROD( const std::string& well, const DeckRecord& record);
|
||||
void handleWCONHIST( const DeckRecord& record);
|
||||
void handleWELTARG( WELTARGCMode cmode, const UDAValue& new_arg, double SiFactorP);
|
||||
void handleWELTARG( WELTARGCMode cmode, double newValue, double SiFactorP);
|
||||
void resetDefaultBHPLimit();
|
||||
void clearControls();
|
||||
ProductionControls controls(const SummaryState& st, double udq_default) const;
|
||||
@ -539,7 +538,7 @@ public:
|
||||
bool updateEconLimits(std::shared_ptr<WellEconProductionLimits> econ_limits);
|
||||
bool updateProduction(std::shared_ptr<WellProductionProperties> production);
|
||||
bool updateInjection(std::shared_ptr<WellInjectionProperties> injection);
|
||||
bool updateWSEGSICD(const std::vector<std::pair<int, SICD> >& sicd_pairs);
|
||||
bool updateWSEGSICD(const std::vector<std::pair<int, SpiralICD> >& sicd_pairs);
|
||||
bool updateWSEGVALV(const std::vector<std::pair<int, Valve> >& valve_pairs);
|
||||
|
||||
bool handleWELSEGS(const DeckKeyword& keyword);
|
||||
|
@ -54,6 +54,8 @@ namespace Opm {
|
||||
const Connection::Direction direction = Connection::Direction::Z,
|
||||
const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
|
||||
const std::size_t seqIndex = 0,
|
||||
const double segDistStart= 0.0,
|
||||
const double segDistEnd= 0.0,
|
||||
const bool defaultSatTabId = true);
|
||||
void loadCOMPDAT(const DeckRecord& record, const EclipseGrid& grid, const FieldPropsManager& field_properties);
|
||||
|
||||
@ -66,7 +68,6 @@ namespace Opm {
|
||||
const Connection& getFromIJK(const int i, const int j, const int k) const;
|
||||
const Connection& lowest() const;
|
||||
Connection& getFromIJK(const int i, const int j, const int k);
|
||||
double segment_perf_length(int segment) const;
|
||||
|
||||
const_iterator begin() const { return this->m_connections.begin(); }
|
||||
const_iterator end() const { return this->m_connections.end(); }
|
||||
@ -116,6 +117,8 @@ namespace Opm {
|
||||
const Connection::Direction direction = Connection::Direction::Z,
|
||||
const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
|
||||
const std::size_t seqIndex = 0,
|
||||
const double segDistStart= 0.0,
|
||||
const double segDistEnd= 0.0,
|
||||
const bool defaultSatTabId = true);
|
||||
|
||||
void loadCOMPDAT(const DeckRecord& record,
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 by Equinor.
|
||||
Copyright (C) 2020 by TNO.
|
||||
|
||||
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_PERMFACT_TABLE_HPP
|
||||
#define OPM_PARSER_PERMFACT_TABLE_HPP
|
||||
|
||||
#include "SimpleTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckItem;
|
||||
|
||||
class PermfactTable : public SimpleTable {
|
||||
public:
|
||||
PermfactTable( const DeckItem& item );
|
||||
|
||||
const TableColumn& getPorosityChangeColumn() const;
|
||||
const TableColumn& getPermeabilityMultiplierColumn() const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 by Equinor
|
||||
Copyright (C) 2020 by TNO
|
||||
|
||||
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_PVTGW_TABLE_HPP
|
||||
#define OPM_PARSER_PVTGW_TABLE_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckKeyword;
|
||||
|
||||
class PvtgwTable : public PvtxTable {
|
||||
public:
|
||||
PvtgwTable() = default;
|
||||
PvtgwTable( const DeckKeyword& keyword, size_t tableIdx);
|
||||
|
||||
static PvtgwTable serializeObject();
|
||||
|
||||
bool operator==(const PvtgwTable& data) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 by Equinor
|
||||
Copyright (C) 2020 by TNO
|
||||
|
||||
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_PVTGWO_TABLE_HPP
|
||||
#define OPM_PARSER_PVTGWO_TABLE_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckKeyword;
|
||||
|
||||
class PvtgwoTable : public PvtxTable {
|
||||
public:
|
||||
PvtgwoTable() = default;
|
||||
PvtgwoTable( const DeckKeyword& keyword, size_t tableIdx);
|
||||
|
||||
static PvtgwoTable serializeObject();
|
||||
|
||||
bool operator==(const PvtgwoTable& data) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 by Equinor
|
||||
Copyright (C) 2020 by TNO
|
||||
|
||||
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_RWGSALT_TABLE_HPP
|
||||
#define OPM_PARSER_RWGSALT_TABLE_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckKeyword;
|
||||
|
||||
class RwgsaltTable {
|
||||
public:
|
||||
RwgsaltTable();
|
||||
|
||||
static RwgsaltTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record1);
|
||||
size_t size() const;
|
||||
std::vector<double> getPressureColumn() const;
|
||||
std::vector<double> getSaltConcentrationColumn() const;
|
||||
std::vector<double> getVaporizedWaterGasRatioColumn() const;
|
||||
const std::vector<double>& getTableValues() const;
|
||||
|
||||
bool operator==(const RwgsaltTable& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_tableValues);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
std::vector <double> m_tableValues;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 by Equinor.
|
||||
Copyright (C) 2020 by TNO.
|
||||
|
||||
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_SALTPVD_TABLE_HPP
|
||||
#define OPM_PARSER_SALTPVD_TABLE_HPP
|
||||
|
||||
#include "SimpleTable.hpp"
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckItem;
|
||||
|
||||
class SaltpvdTable : public SimpleTable {
|
||||
public:
|
||||
SaltpvdTable( const DeckItem& item );
|
||||
|
||||
const TableColumn& getDepthColumn() const;
|
||||
const TableColumn& getSaltpColumn() const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,81 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2020 Statoil ASA
|
||||
|
||||
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 TLMIXPAR_HPP
|
||||
#define TLMIXPAR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
|
||||
struct TLMixRecord {
|
||||
double viscosity_parameter;
|
||||
double density_parameter;
|
||||
|
||||
TLMixRecord() = default;
|
||||
TLMixRecord(double v, double d) :
|
||||
viscosity_parameter(v),
|
||||
density_parameter(d)
|
||||
{};
|
||||
|
||||
|
||||
bool operator==(const TLMixRecord& other) const {
|
||||
return this->viscosity_parameter == other.viscosity_parameter &&
|
||||
this->density_parameter == other.density_parameter;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(viscosity_parameter);
|
||||
serializer(density_parameter);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
class TLMixpar {
|
||||
public:
|
||||
|
||||
TLMixpar() = default;
|
||||
TLMixpar(const Deck& deck);
|
||||
static TLMixpar serializeObject();
|
||||
std::size_t size() const;
|
||||
bool empty() const;
|
||||
const TLMixRecord& operator[](const std::size_t index) const;
|
||||
|
||||
bool operator==(const TLMixpar& other) const {
|
||||
return this->data == other.data;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(data);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<TLMixRecord> data;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
@ -33,15 +33,12 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/DenT.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/StandardCond.hpp>
|
||||
@ -60,7 +57,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/SkprpolyTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Regdims.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TLMixpar.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@ -81,7 +77,7 @@ namespace Opm {
|
||||
const Eqldims& getEqldims() const;
|
||||
const Aqudims& getAqudims() const;
|
||||
const Regdims& getRegdims() const;
|
||||
const TLMixpar& getTLMixpar() const;
|
||||
|
||||
/*
|
||||
WIll return max{ Tabdims::NTFIP , Regdims::NTFIP }.
|
||||
*/
|
||||
@ -101,8 +97,6 @@ namespace Opm {
|
||||
const TableContainer& getPbvdTables() const;
|
||||
const TableContainer& getPdvdTables() const;
|
||||
const TableContainer& getSaltvdTables() const;
|
||||
const TableContainer& getSaltpvdTables() const;
|
||||
const TableContainer& getPermfactTables() const;
|
||||
const TableContainer& getEnkrvdTables() const;
|
||||
const TableContainer& getEnptvdTables() const;
|
||||
const TableContainer& getImkrvdTables() const;
|
||||
@ -137,8 +131,6 @@ namespace Opm {
|
||||
const JFunc& getJFunc() const;
|
||||
|
||||
const std::vector<PvtgTable>& getPvtgTables() const;
|
||||
const std::vector<PvtgwTable>& getPvtgwTables() const;
|
||||
const std::vector<PvtgwoTable>& getPvtgwoTables() const;
|
||||
const std::vector<PvtoTable>& getPvtoTables() const;
|
||||
const std::vector<Rock2dTable>& getRock2dTables() const;
|
||||
const std::vector<Rock2dtrTable>& getRock2dtrTables() const;
|
||||
@ -152,7 +144,6 @@ namespace Opm {
|
||||
std::size_t gas_comp_index() const;
|
||||
const PvtwTable& getPvtwTable() const;
|
||||
const std::vector<PvtwsaltTable>& getPvtwSaltTables() const;
|
||||
const std::vector<RwgsaltTable>& getRwgSaltTables() const;
|
||||
const std::vector<BrineDensityTable>& getBrineDensityTables() const;
|
||||
const std::vector<SolventDensityTable>& getSolventDensityTables() const;
|
||||
|
||||
@ -164,6 +155,7 @@ namespace Opm {
|
||||
const PlmixparTable& getPlmixparTable() const;
|
||||
const ShrateTable& getShrateTable() const;
|
||||
const Stone1exTable& getStone1exTable() const;
|
||||
const TlmixparTable& getTlmixparTable() const;
|
||||
const WatdentTable& getWatdentTable() const;
|
||||
const std::map<int, PlymwinjTable>& getPlymwinjTables() const;
|
||||
const std::map<int, SkprwatTable>& getSkprwatTables() const;
|
||||
@ -200,8 +192,6 @@ namespace Opm {
|
||||
serializer(split.rockMax);
|
||||
serializer.map(split.rockMap);
|
||||
serializer.vector(m_pvtgTables);
|
||||
serializer.vector(m_pvtgwTables);
|
||||
serializer.vector(m_pvtgwoTables);
|
||||
serializer.vector(m_pvtoTables);
|
||||
serializer.vector(m_rock2dTables);
|
||||
serializer.vector(m_rock2dtrTables);
|
||||
@ -213,10 +203,10 @@ namespace Opm {
|
||||
m_plmixparTable.serializeOp(serializer);
|
||||
m_shrateTable.serializeOp(serializer);
|
||||
m_stone1exTable.serializeOp(serializer);
|
||||
m_tlmixparTable.serializeOp(serializer);
|
||||
m_viscrefTable.serializeOp(serializer);
|
||||
m_watdentTable.serializeOp(serializer);
|
||||
serializer.vector(m_pvtwsaltTables);
|
||||
serializer.vector(m_rwgsaltTables);
|
||||
serializer.vector(m_bdensityTables);
|
||||
serializer.vector(m_sdensityTables);
|
||||
serializer.map(m_plymwinjTables);
|
||||
@ -237,7 +227,6 @@ namespace Opm {
|
||||
stcond.serializeOp(serializer);
|
||||
serializer(m_gas_comp_index);
|
||||
serializer(m_rtemp);
|
||||
m_tlmixpar.serializeOp(serializer);
|
||||
if (!serializer.isSerializing()) {
|
||||
m_simpleTables = simpleTables;
|
||||
if (split.plyshMax > 0) {
|
||||
@ -331,22 +320,6 @@ namespace Opm {
|
||||
assert(regionIdx == numTables);
|
||||
}
|
||||
|
||||
template <class TableType>
|
||||
void initRwgsaltTables(const Deck& deck, std::vector<TableType>& rwgtables ) {
|
||||
|
||||
size_t numTables = m_tabdims.getNumPVTTables();
|
||||
rwgtables.resize(numTables);
|
||||
|
||||
const auto& keyword = deck.getKeyword("RWGSALT");
|
||||
size_t regionIdx = 0;
|
||||
for (const auto& record : keyword) {
|
||||
rwgtables[regionIdx].init(record);
|
||||
++regionIdx;
|
||||
}
|
||||
assert(regionIdx == numTables);
|
||||
}
|
||||
|
||||
|
||||
template <class TableType>
|
||||
void initBrineTables(const Deck& deck, std::vector<TableType>& brinetables ) {
|
||||
|
||||
@ -491,8 +464,6 @@ namespace Opm {
|
||||
|
||||
std::map<std::string , TableContainer> m_simpleTables;
|
||||
std::vector<PvtgTable> m_pvtgTables;
|
||||
std::vector<PvtgwTable> m_pvtgwTables;
|
||||
std::vector<PvtgwoTable> m_pvtgwoTables;
|
||||
std::vector<PvtoTable> m_pvtoTables;
|
||||
std::vector<Rock2dTable> m_rock2dTables;
|
||||
std::vector<Rock2dtrTable> m_rock2dtrTables;
|
||||
@ -504,10 +475,10 @@ namespace Opm {
|
||||
PlmixparTable m_plmixparTable;
|
||||
ShrateTable m_shrateTable;
|
||||
Stone1exTable m_stone1exTable;
|
||||
TlmixparTable m_tlmixparTable;
|
||||
ViscrefTable m_viscrefTable;
|
||||
WatdentTable m_watdentTable;
|
||||
std::vector<PvtwsaltTable> m_pvtwsaltTables;
|
||||
std::vector<RwgsaltTable> m_rwgsaltTables;
|
||||
std::vector<BrineDensityTable> m_bdensityTables;
|
||||
std::vector<SolventDensityTable> m_sdensityTables;
|
||||
std::map<int, PlymwinjTable> m_plymwinjTables;
|
||||
@ -518,7 +489,6 @@ namespace Opm {
|
||||
Regdims m_regdims;
|
||||
Eqldims m_eqldims;
|
||||
Aqudims m_aqudims;
|
||||
TLMixpar m_tlmixpar;
|
||||
|
||||
bool hasImptvd = false;// if deck has keyword IMPTVD
|
||||
bool hasEnptvd = false;// if deck has keyword ENPTVD
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Utility/Stringview.hpp>
|
||||
|
||||
namespace Json {
|
||||
class JsonObject;
|
||||
@ -84,8 +85,8 @@ namespace Opm {
|
||||
bool hasKeyword( const std::string& ) const;
|
||||
const ParserKeyword& getKeyword(const std::string& name) const;
|
||||
|
||||
bool isRecognizedKeyword( const std::string_view& deckKeywordName) const;
|
||||
const ParserKeyword& getParserKeywordFromDeckName(const std::string_view& deckKeywordName) const;
|
||||
bool isRecognizedKeyword( const string_view& deckKeywordName) const;
|
||||
const ParserKeyword& getParserKeywordFromDeckName(const string_view& deckKeywordName) const;
|
||||
std::vector<std::string> getAllDeckNames () const;
|
||||
|
||||
void loadKeywords(const Json::JsonObject& jsonKeywords);
|
||||
@ -134,18 +135,18 @@ namespace Opm {
|
||||
|
||||
private:
|
||||
bool hasWildCardKeyword(const std::string& keyword) const;
|
||||
const ParserKeyword* matchingKeyword(const std::string_view& keyword) const;
|
||||
const ParserKeyword* matchingKeyword(const string_view& keyword) const;
|
||||
void addDefaultKeywords();
|
||||
|
||||
// std::vector< std::unique_ptr< const ParserKeyword > > keyword_storage;
|
||||
std::list<ParserKeyword> keyword_storage;
|
||||
|
||||
// associative map of deck names and the corresponding ParserKeyword object
|
||||
std::map< std::string_view, const ParserKeyword* > m_deckParserKeywords;
|
||||
std::map< string_view, const ParserKeyword* > m_deckParserKeywords;
|
||||
|
||||
// associative map of the parser internal names and the corresponding
|
||||
// ParserKeyword object for keywords which match a regular expression
|
||||
std::map< std::string_view, const ParserKeyword* > m_wildCardKeywords;
|
||||
std::map< string_view, const ParserKeyword* > m_wildCardKeywords;
|
||||
|
||||
std::vector<std::pair<std::string,std::string>> code_keywords;
|
||||
};
|
||||
|
@ -39,6 +39,7 @@ namespace Opm {
|
||||
class ErrorGuard;
|
||||
class ParserDoubleItem;
|
||||
class RawKeyword;
|
||||
class string_view;
|
||||
class ErrorGuard;
|
||||
|
||||
/*
|
||||
@ -90,10 +91,10 @@ namespace Opm {
|
||||
|
||||
|
||||
static bool validInternalName(const std::string& name);
|
||||
static bool validDeckName(const std::string_view& name);
|
||||
static bool validDeckName(const string_view& name);
|
||||
bool hasMatchRegex() const;
|
||||
void setMatchRegex(const std::string& deckNameRegexp);
|
||||
bool matches(const std::string_view& ) const;
|
||||
bool matches(const string_view& ) const;
|
||||
bool hasDimension() const;
|
||||
void addRecord( ParserRecord );
|
||||
void addDataRecord( ParserRecord );
|
||||
@ -158,7 +159,7 @@ namespace Opm {
|
||||
bool double_records = false;
|
||||
std::string code_end;
|
||||
|
||||
static bool validNameStart(const std::string_view& name);
|
||||
static bool validNameStart(const string_view& name);
|
||||
void initDeckNames( const Json::JsonObject& jsonConfig );
|
||||
void initSectionNames( const Json::JsonObject& jsonConfig );
|
||||
void initMatchRegex( const Json::JsonObject& jsonObject );
|
||||
|
@ -74,7 +74,6 @@ namespace Opm {
|
||||
gas_productivity_index,
|
||||
energy,
|
||||
icd_strength,
|
||||
polymer_density,
|
||||
_count // New entries must be added *before* this
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user