Compare commits

..

1063 Commits

Author SHA1 Message Date
Arne Morten Kvarving
ab6a92a1d9 Merge pull request #1529 from akva2/internalize_tlmixpar
internalize TLMIXPAR
2020-03-04 09:58:16 +01:00
Joakim Hove
85ddd2e2e8 Merge pull request #1527 from joakim-hove/move-well-injectortype
Move enum Well:InjectorType to new file ScheduleTypes
2020-03-03 16:36:49 +01:00
Joakim Hove
a02811ed63 Merge pull request #1526 from joakim-hove/wells-rst-units
Wells rst units
2020-03-03 16:35:26 +01:00
Arne Morten Kvarving
7ac9b6cf88 internalize TLMIXPAR 2020-03-03 15:59:08 +01:00
Arne Morten Kvarving
ab757c4a1c Merge pull request #1528 from akva2/internalize_surface_conditions
internalize StandardConditions
2020-03-03 13:46:01 +01:00
Arne Morten Kvarving
f77bef4774 internalize StCond keyword 2020-03-03 12:14:13 +01:00
Joakim Hove
1b2fadcdc4 Move enum Well:InjectorType to new file ScheduleTypes 2020-03-03 09:09:11 +01:00
Joakim Hove
6af2bcdb6f Use named public item for CFInDeck functionality 2020-03-03 08:34:47 +01:00
Joakim Hove
e6af67e897 Well datum depth is loaded from SWEL 2020-03-03 08:34:04 +01:00
Joakim Hove
e1bf7b2298 Well rates which should go to UDA are loaded with input units 2020-03-03 08:33:07 +01:00
Joakim Hove
e3a9174aa3 Merge pull request #1523 from akva2/simplify_oilvap
changed: simplify OilVaporizationProperties
2020-03-03 08:22:36 +01:00
Joakim Hove
e04d10494d Merge pull request #1525 from joakim-hove/opmpack-fixup
Fix bug/problem in copy_file in opmpack
2020-03-03 08:21:59 +01:00
Joakim Hove
ca245136fa Fix bug/problem in copy_file in opmpack 2020-03-02 21:17:14 +01:00
Joakim Hove
0b884fc977 Merge pull request #1521 from tskille/pybind_deckitem
Python bindings for DeckItem, adding support for UDA type
2020-03-02 20:57:54 +01:00
Torbjørn Skille
07a8c5b015 python bindings, adding support for UDA type 2020-03-02 13:50:57 +01:00
Arne Morten Kvarving
710a94709e changed: simplify OilVaporizationProperties
there is no vappars per pvt region. do not store it as such either.
2020-03-02 09:32:40 +01:00
Bård Skaflestad
8a4240b2fe Merge pull request #1518 from joakim-hove/remove-wtype-unknown
Remove opm specific well type WTUnk
2020-03-01 22:39:12 -06:00
Arne Morten Kvarving
bafa28ed76 Merge pull request #1443 from akva2/noecl_virtualize
Add virtual hooks to enable parallel frontends in opm-simulators
2020-02-28 12:29:27 +01:00
Arne Morten Kvarving
dcbf764b41 add a GridDims member in EclipseState
while this is already in the EclipseGrid, we need a
separate copy that we can serialize and broadcast
2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
84e5f7ccbf add equality operator to GridDims
also make it default constructible
2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
e747ce86b7 added: virtual method globalFieldProps to EclipseState
this will always return the global field props, even in parallel.
necessary since certain operations related to IO need to full global
view on the root process, even when running in parallel

also virtualize the EclipseGrid accessor to add assert in parallel
to ensure only root-process access
2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
8cb923bbd8 virtualize some methods in fieldpropsmanager
to allow putting a parallel layer on top in opm-simulators
2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
af4e41943a make EclipseState default constructible 2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
45af93cd93 make Value default constructible 2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
38ede33576 make eclipsegrid default constructible 2020-02-28 10:25:10 +01:00
Arne Morten Kvarving
3b44ee137b changed: make data members in EclipseState protected
to allow subclass access
2020-02-28 10:25:10 +01:00
Atgeirr Flø Rasmussen
dbb78a509b Merge pull request #1520 from atgeirr/add-group-availability
Add Group::isAvailableForGroupControl() method.
2020-02-28 10:03:04 +01:00
Atgeirr Flø Rasmussen
1a0f47f274 Add Group::isAvailableForGroupControl() method.
The method has very similar intended usage as the method of the
same name in the Well class.
2020-02-27 14:56:31 +01:00
Arne Morten Kvarving
406cf45064 Merge pull request #1517 from akva2/internalize_sdensity
added: internalize SDENSITY table
2020-02-27 13:37:25 +01:00
Arne Morten Kvarving
ac2907a876 added: internalize SDENSITY table 2020-02-27 11:52:31 +01:00
Joakim Hove
0f41c73c8e Remove opm specific well type WTUnk 2020-02-27 11:01:15 +01:00
Arne Morten Kvarving
8233ae200c Merge pull request #1515 from akva2/python_debian_packaging
Add debian packaging of python bindings
2020-02-26 12:22:01 +01:00
Joakim Hove
10c2705c07 Merge pull request #1516 from akva2/janitoring
remove unused cmake option
2020-02-26 12:00:37 +01:00
Arne Morten Kvarving
6e0a581764 remove unused cmake option 2020-02-26 11:57:37 +01:00
Arne Morten Kvarving
a9c1c8dedd added: debian packaging for python bindings 2020-02-26 11:56:02 +01:00
Arne Morten Kvarving
585eb609ee fixed: only try around the ccache code
build failed without ccache available
2020-02-26 11:56:02 +01:00
Arne Morten Kvarving
9eec147616 fixed: respect DESTDIR in python binding installation script 2020-02-26 11:56:02 +01:00
Arne Morten Kvarving
c765b769fa fixed: set LD_LIBRARY_PATH so python tests can find the library
necessary when building shared lib
2020-02-26 11:56:02 +01:00
Arne Morten Kvarving
bdca9d9a0d Merge pull request #1514 from akva2/fix_relative_gcc7
changed: use constructs available in filesystem TS to obtain relative path
2020-02-26 11:11:43 +01:00
Arne Morten Kvarving
2994b80a57 changed: use constructs available in filesystem TS to obtain relative path
fixes build with gcc 7
2020-02-26 10:13:21 +01:00
Joakim Hove
8cb65a77a6 Merge pull request #1507 from joakim-hove/dent-keywords
Add simple POD class to internalize keywords xxxDENT
2020-02-26 09:55:58 +01:00
Joakim Hove
3bfef790c6 Merge pull request #1512 from joakim-hove/add-rst-info
Add restart info to TimeMap() constructor
2020-02-25 15:34:25 +01:00
Joakim Hove
a5d396f1fb Merge pull request #1511 from joakim-hove/extract-timestepping
Extracted timestepnning keywords from the regular handleKeyword()
2020-02-25 15:34:14 +01:00
Joakim Hove
964b707b0d Merge pull request #1510 from joakim-hove/invalid-name-report-step
Add report_step argument to Schedule::invalidNamePattern()
2020-02-25 15:34:01 +01:00
Joakim Hove
5797ebd23d Add member gas_comp_index to TableManager 2020-02-25 15:06:34 +01:00
Joakim Hove
24528ea607 Add simple POD class to internalize keywords xxxDENT 2020-02-25 15:06:34 +01:00
Joakim Hove
40dec6bd54 Add restart info to TimeMap() constructor 2020-02-25 09:23:55 +01:00
Joakim Hove
1cdb4aa579 Extracted timestepnning keywords from the regular handleKeyword() 2020-02-25 09:17:47 +01:00
Joakim Hove
b6aea46115 Add report_step argument to Schedule::invalidNamePattern() 2020-02-25 09:10:45 +01:00
Arne Morten Kvarving
989d643140 Merge pull request #1509 from blattms/fix-g++-versioncheck-fs
Fix compiler version check for -lstdc++fs
2020-02-25 08:55:07 +01:00
Joakim Hove
09595b98ad Merge pull request #1495 from joakim-hove/opmpack-copy-restart
The opmpack utility can also copy restart and import files
2020-02-25 08:32:06 +01:00
Joakim Hove
3a69bcbf4a Merge pull request #1503 from joakim-hove/wellsegments-alt-cons
Simplify WellSegments serialization construction
2020-02-25 08:31:30 +01:00
Joakim Hove
e1b4b64497 Merge pull request #1506 from atgeirr/guide-rate-generic
Add overloads to eval() and get() for simpler generic usage.
2020-02-25 08:30:26 +01:00
Bård Skaflestad
df21acfc49 Merge pull request #1492 from akva2/conditional_test_suite
changed: disable building of test suite if Boost::test is not found
2020-02-24 20:30:53 -06:00
Markus Blatt
31e6f316db Fix compiler version check for -lstdc++fs
There was a typo in the if condition which probably always
made it true. Linking to to -lstdc++fs is needed until
g++-9, see e.g. https://gitlab.kitware.com/cmake/cmake/issues/17834
2020-02-24 22:00:10 +01:00
Atgeirr Flø Rasmussen
8b110916e6 Add overloads to eval() and get() for simpler generic usage. 2020-02-24 16:05:48 +01:00
Atgeirr Flø Rasmussen
dae7b2f331 Merge pull request #1504 from akva2/remove_opmfil
remove unused enum entry OpmFIL
2020-02-24 13:31:29 +01:00
Arne Morten Kvarving
aceb3b443a remove unused enum entry OpmFIL 2020-02-24 11:41:50 +01:00
Joakim Hove
815969a7d1 Simplify WellSegments serialization construction 2020-02-22 10:57:57 +01:00
Bård Skaflestad
561a594365 Merge pull request #1501 from goncalvesmachadoc/patch-2
Add SALTVD table to CMake List
2020-02-21 11:44:21 -06:00
Joakim Hove
95d1cc29ff Merge pull request #1500 from goncalvesmachadoc/goncalvesmachadoc-addSaltKeywords
add Keywords for Salt
2020-02-21 18:44:13 +01:00
Cintia Goncalves Machado
80da943b36 Add SALTVD table to CMake 2020-02-21 16:45:07 +01:00
Cintia Goncalves Machado
452a49d56f add Keywords for Salt 2020-02-21 13:47:10 +01:00
Joakim Hove
ae504bcb45 Merge pull request #1499 from totto82/addControlWELTARG
Add production control from WELTARG
2020-02-21 13:25:20 +01:00
Tor Harald Sandve
83a8a9f4fe add test for production control from WELTARG 2020-02-21 12:39:58 +01:00
Joakim Hove
9d1cf2482f Merge pull request #1498 from atgeirr/silence-warnings
Silence warnings.
2020-02-21 11:57:04 +01:00
Tor Harald Sandve
df14e0d66a Add production control from WELTARG 2020-02-21 11:15:18 +01:00
Atgeirr Flø Rasmussen
f35529d7ff Silence warnings.
- One class vs struct declaration.
 - Unused variables in a test.
2020-02-21 10:49:41 +01:00
Joakim Hove
7b145e360f Merge pull request #1497 from joakim-hove/use-size_t
Use std::size_t instead of int for size
2020-02-21 09:30:58 +01:00
Joakim Hove
c11d0bb4cc Use std::size_t instead of int for size 2020-02-21 07:43:25 +01:00
Joakim Hove
1a5cf27418 The opmpack utility can also copy restart and import files 2020-02-20 15:12:38 +01:00
Joakim Hove
4816777700 Merge pull request #1494 from joakim-hove/use-size_t
Use std::size_t instead of int for size
2020-02-20 13:57:16 +01:00
Joakim Hove
412909fa3a Use std::size_t instead of int for size 2020-02-20 11:54:40 +01:00
Joakim Hove
a3c634b1f8 Merge pull request #1458 from joakim-hove/eclstate-aquifer-config
Eclstate aquifer config
2020-02-20 08:25:25 +01:00
Joakim Hove
6a87be8512 Merge pull request #1490 from joakim-hove/use-complnum
Store complnum value directly without taking std::abs()
2020-02-20 08:24:28 +01:00
Joakim Hove
6a0785b172 Merge pull request #1477 from joakim-hove/move-restart-config
Move RestartConfig to Schedule
2020-02-20 07:06:58 +01:00
Joakim Hove
aed8c78af5 Move RestartConfig from EclipseState to Schedule 2020-02-19 12:35:07 +01:00
Joakim Hove
269802ae48 Add comment about locating shared library while testing Python 2020-02-19 12:33:50 +01:00
Joakim Hove
59f6cc7c11 Remove moot test 2020-02-19 12:33:50 +01:00
Joakim Hove
89cf50e0d5 Remove hack for Python 3D testing 2020-02-19 12:33:50 +01:00
Joakim Hove
b3601c7357 Merge pull request #1489 from akva2/more_boost_prune
Continue replacing boost usage
2020-02-19 12:29:06 +01:00
Arne Morten Kvarving
f76daabbb4 changed: disable building of test suite if Boost::test is not found 2020-02-19 12:25:32 +01:00
Joakim Hove
36e40040a0 Merge pull request #1491 from atgeirr/accept-mixed-case-months
Use upper case to look up month numbers.
2020-02-19 11:38:46 +01:00
Arne Morten Kvarving
36d4fa2923 replace boost with std in comment 2020-02-19 09:53:01 +01:00
Arne Morten Kvarving
3d83512f09 get rid of usage of boost::join 2020-02-19 09:51:57 +01:00
Arne Morten Kvarving
26c9a1e3f1 changed: get rid of boost::lexical_cast
replace with std::strtoul. not as pretty, but boost is not popular in
here
2020-02-19 09:51:57 +01:00
Arne Morten Kvarving
83a7cd04c3 remove unused boost includes
and deal with missing include fallout
2020-02-19 09:51:46 +01:00
Atgeirr Flø Rasmussen
4a16f6022d Use upper case to look up month numbers.
This means we accept strings such as "Sep" and "oCT" as valid months,
not just "SEP" and "OCT".
2020-02-19 09:37:28 +01:00
Arne Morten Kvarving
2b6754151f add internal replacement for boost::split and use it 2020-02-19 09:29:25 +01:00
Joakim Hove
20afa1ed31 Store complnum value directly without taking std::abs() 2020-02-19 07:16:03 +01:00
Joakim Hove
01aa3692fa Add AquiferConfig to EclipseState 2020-02-18 18:07:02 +01:00
Joakim Hove
7daf77ef59 Added AquiferConfig class 2020-02-18 15:30:09 +01:00
Joakim Hove
a4d745b895 Merge pull request #1484 from joakim-hove/brine-table-size
Add size() method to BrineDesityTable
2020-02-18 15:11:25 +01:00
Arne Morten Kvarving
57d88dea7e add a replacement for boost::replace_all and use it 2020-02-18 14:48:40 +01:00
Arne Morten Kvarving
82491aaf2e changed: use internal method to uppercase a string instead of boost 2020-02-18 14:31:41 +01:00
Arne Morten Kvarving
c8458049e8 changed: use internal trim methods instead of boost 2020-02-18 14:31:03 +01:00
Arne Morten Kvarving
ec1dabf80e Merge pull request #1488 from akva2/less_boost_debian
remove libboost-regex-dev, libboost-filesystem-dev from debian packaging
2020-02-18 12:03:04 +01:00
Arne Morten Kvarving
ee90d5f094 Merge pull request #1487 from akva2/redhat_dt8
Use devtoolset-8 in redhat packaging
2020-02-18 12:02:06 +01:00
Joakim Hove
fc82988c9c Merge pull request #1475 from joakim-hove/schedule-addwell-refactor
Add new Schedule::addWell() overload + update Well constructor args
2020-02-18 11:58:37 +01:00
Joakim Hove
084ff09e78 Merge pull request #1476 from joakim-hove/timemap-skiprest
Internalize the existence of SKIPREST in the TimeMap
2020-02-18 11:57:24 +01:00
Arne Morten Kvarving
14548852d7 remove libboost-regex-dev, libboost-filesystem-dev from debian packaging 2020-02-18 11:08:32 +01:00
Kai Bao
e2b4759b23 Merge pull request #1452 from joakim-hove/eclstate-aquifer-aquancon
Eclstate aquifer aquancon
2020-02-18 11:08:14 +01:00
Joakim Hove
c5e1826498 Add size() method to BrineDesityTable 2020-02-18 07:49:48 +01:00
Joakim Hove
32227236fa Refactor AQUANCON implementation 2020-02-18 07:33:05 +01:00
Arne Morten Kvarving
3f20edbfcb Merge pull request #1482 from akva2/fix_brine
fixed: add begin/end members to BrineDensityTable
2020-02-17 16:08:56 +01:00
Arne Morten Kvarving
c2aca49a2a fixed: add begin/end members to BrineDensityTable 2020-02-17 15:13:36 +01:00
Joakim Hove
91c886465a Merge pull request #1478 from akva2/vfp_boost_prune
Drop use of boost::multi_array in VFP classes
2020-02-17 13:57:32 +01:00
Arne Morten Kvarving
a43062ed7f go back to boost 1.48 on rhel6 and rhel7 2020-02-17 13:34:09 +01:00
Arne Morten Kvarving
a594483d02 bump to devtoolset-8 in redhat packaging 2020-02-17 13:34:04 +01:00
Joakim Hove
dd04b1d9df Merge pull request #1467 from joakim-hove/rst-units
Add units to rst classes
2020-02-17 13:23:01 +01:00
Arne Morten Kvarving
fa572188fa changed: avoid use of boost::multi_array in VFPProdTable 2020-02-17 13:08:14 +01:00
Arne Morten Kvarving
143c8ec3bf changed: avoid use of boost::multi_array in VFPInjTable 2020-02-17 13:08:14 +01:00
Joakim Hove
dbf1929349 Merge pull request #1481 from akva2/remove_stale_flag
remove stale cmake options from jenkins scripts
2020-02-17 13:06:24 +01:00
Arne Morten Kvarving
f152ac1127 remove stale cmake options from jenkins scripts 2020-02-17 11:59:58 +01:00
Arne Morten Kvarving
de39bb5a7c Merge pull request #1479 from akva2/fix_cxx17_rh6
fixed: guess -std=c++17 flag if cmake version is too old
2020-02-17 11:30:59 +01:00
Arne Morten Kvarving
2b5a21085c fixed: guess -std=c++17 flag if cmake version is too old
to aid compilation on rhel6
2020-02-17 11:30:26 +01:00
Joakim Hove
cad54feafb Internalize the existence of SKIPREST in the TimeMap 2020-02-16 17:53:27 +01:00
Bård Skaflestad
13fa36f63b Merge pull request #1472 from akva2/fix_gcc_check
fixed: wrong preprocessor check for gcc7
2020-02-14 10:32:38 -06:00
Arne Morten Kvarving
e0939b69f1 fixed: gcc8+ filesystem will collapse the multiple slashes 2020-02-14 16:14:15 +01:00
Joakim Hove
1b0af2954d Add new Schedule::addWell() overload + update Well constructor args 2020-02-14 14:21:08 +01:00
Atgeirr Flø Rasmussen
fa5050f18a Merge pull request #1474 from joakim-hove/schedule-add-rst-argument
Schedule add rst argument
2020-02-14 14:00:20 +01:00
Joakim Hove
15861f1dde Merge pull request #1473 from joakim-hove/rm-rst-load-test
Remove rst_load based test
2020-02-14 12:51:52 +01:00
Joakim Hove
0b3f885b33 Started to add skeleton load_rst function 2020-02-14 12:51:26 +01:00
Joakim Hove
5399c4f37f Add optional RstState * argument to Schedule constructors 2020-02-14 12:05:24 +01:00
Joakim Hove
a50efdf7da Remove rst_load based test 2020-02-14 11:59:24 +01:00
Atgeirr Flø Rasmussen
4516b23a14 Merge pull request #1410 from joakim-hove/group-multiple-phases
Support multiple phases in group injection
2020-02-14 11:10:37 +01:00
Arne Morten Kvarving
a049cd5b03 fixed: wrong preprocessor check for gcc7 2020-02-14 09:42:31 +01:00
Tor Harald Sandve
e9318b1457 continue the work of allowing for phase dependent injection control 2020-02-14 09:30:58 +01:00
Joakim Hove
45dfd4ffe0 Change UDQ restart data for injection groups
The code changes required to support multiple phases in a UDQ controlled
injection group is an educated guess.
2020-02-14 09:30:58 +01:00
Joakim Hove
0b2dbf7fc2 GroupInjection is a map over phases + implement topup_phase 2020-02-14 09:30:58 +01:00
Joakim Hove
ecd8d98aab Merge pull request #1469 from atgeirr/fix-fmap-comparison
Fix operator==() of UDQFunctionTable.
2020-02-14 09:06:39 +01:00
Joakim Hove
9ce0e6783d Add datum_depth as member to RstWell 2020-02-14 07:27:05 +01:00
Joakim Hove
e4955d3d94 Merge pull request #1468 from joakim-hove/connection-segment
Connection segment
2020-02-14 06:49:43 +01:00
Joakim Hove
9e72cd3c82 Restart well - store allow xlflow in bool 2020-02-14 06:43:25 +01:00
Joakim Hove
7da79ae532 Convert rst quantities to SI units 2020-02-14 06:43:25 +01:00
Joakim Hove
50d1108e61 Merge pull request #1455 from joakim-hove/boost-remove
Boost remove
2020-02-13 22:46:42 +01:00
Joakim Hove
36662b2734 Use internal string trim functions instead of boost algorithm 2020-02-13 18:25:37 +01:00
Joakim Hove
1205e8c03c Avoid use of raw pointer 2020-02-13 17:08:36 +01:00
Joakim Hove
1c07a8f251 Code to connect segment <-> connection in *one* function call 2020-02-13 16:02:21 +01:00
Joakim Hove
9ac9e53d68 Remove unused include 2020-02-13 15:29:52 +01:00
Atgeirr Flø Rasmussen
5ab15783e2 Fix operator==() of UDQFunctionTable. 2020-02-13 15:04:02 +01:00
Arne Morten Kvarving
4f63172dc9 Merge pull request #1461 from akva2/use_std_filesystem
Replace boost::filesystem with std::filesystem
2020-02-13 15:01:02 +01:00
Kai Bao
8ddf71a67f Merge pull request #1460 from joakim-hove/wellsegments-state
Wellsegments state
2020-02-13 14:39:29 +01:00
Joakim Hove
349fb1f4f5 White space 2020-02-13 13:54:27 +01:00
Arne Morten Kvarving
fb75bcd4e2 changed: use std::filesystem instead of boost::filesystem
since we still support g++-7, where filesystem is marked experimental,
we introduce a wrapper header and expose the namespace to use
as Opm::filesystem.

for gcc we unconditionally link with libstdc++fs in the python bindings.
the setup.py stuff links as c code, not c++ code, so it is not
automatically added on any gcc version. this might prove unportable
later.
2020-02-13 12:34:19 +01:00
Joakim Hove
9099c8a12a Merge pull request #1466 from joakim-hove/segments-updates2
Segments updates2
2020-02-13 11:45:05 +01:00
Joakim Hove
899f698f73 Add message on stdout 2020-02-13 11:05:35 +01:00
Joakim Hove
ac2cac9f16 Remove member multiphase model from WellSegments 2020-02-13 11:03:14 +01:00
Joakim Hove
121386914b WellSegments - remove member length_depth 2020-02-13 11:03:14 +01:00
Joakim Hove
8657d59696 Remove name member from WellSegments class 2020-02-13 11:03:14 +01:00
Joakim Hove
b5d3af49e9 Remove variables: depth, length and volume from WellSegmentSet 2020-02-13 11:03:14 +01:00
Joakim Hove
185c715cff Remove WellSegments::operator<<() 2020-02-13 11:03:14 +01:00
Joakim Hove
bd688edfde Wellsegments are created with constructor 2020-02-13 11:03:14 +01:00
Joakim Hove
cac1dac893 Remove unused bool flag 2020-02-13 11:03:14 +01:00
Joakim Hove
b3d306482c Use const ref argument 2020-02-13 11:03:14 +01:00
Joakim Hove
ade0a78a06 Remove mutable accessors to set volume, depth and length 2020-02-13 11:03:14 +01:00
Joakim Hove
dd49f359f5 Grouped mutable accessors 2020-02-13 11:03:14 +01:00
Joakim Hove
95bda6f3f1 Merge pull request #1465 from atgeirr/fix-warnings
Silence a few warnings, remove some end-of-line whitespace.
2020-02-13 11:02:10 +01:00
Joakim Hove
b0fbb794d2 Remove WellSegments::operator<< 2020-02-13 09:23:33 +01:00
Joakim Hove
0525ea52a9 White space reformatting 2020-02-13 09:23:33 +01:00
Joakim Hove
7829895b3b Use raw pointer 2020-02-13 09:23:33 +01:00
Joakim Hove
2d858c43e3 Use proper SegmentType enum in RstSegment class 2020-02-13 09:23:33 +01:00
Atgeirr Flø Rasmussen
74129a2866 Silence a few warnings, remove some end-of-line whitespace. 2020-02-13 09:13:29 +01:00
Joakim Hove
921a68fc73 Merge pull request #1463 from joakim-hove/segment-updates
Segment updates
2020-02-13 07:47:27 +01:00
Joakim Hove
9bed25f035 Use common ICDStatus class for both Valve and SpiralICD 2020-02-12 15:09:26 +01:00
Joakim Hove
e2b58cecda Inetrnalize segment type in proper enum 2020-02-12 14:18:24 +01:00
Joakim Hove
f80160e6c0 Add icd file with status enum common to SpiralICD and Valve 2020-02-12 14:15:13 +01:00
Joakim Hove
963387da56 Removed invalid_value as member variable 2020-02-12 10:01:45 +01:00
Joakim Hove
cd990599b4 The type of a segment must be explicitly initialized 2020-02-12 10:00:31 +01:00
Arne Morten Kvarving
679c7a2a5c remove locale workaround for older boost versions 2020-02-12 09:14:30 +01:00
Markus Blatt
c7eb410309 Merge pull request #1456 from akva2/bump_to_cxx17
changed: remove the CXX11Features module
2020-02-11 17:51:18 +01:00
Joakim Hove
425769712e Merge pull request #1459 from akva2/janitoring
changed: initialize members to avoid potential unused warnings downstream
2020-02-11 13:30:01 +01:00
Bård Skaflestad
978ab75d3a Merge pull request #1026 from akva2/use_cxx11
changed: use std::regex instead of boost::regex
2020-02-11 05:39:52 -06:00
Arne Morten Kvarving
8d3ded8eb3 changed: initialize members to avoid potential unused warnings downstream 2020-02-11 10:51:42 +01:00
Arne Morten Kvarving
0f31f83483 changed: simplify seqnumFromSeparateFilename by using a regex 2020-02-11 08:49:08 +01:00
Arne Morten Kvarving
7876f530a1 changed: use std::regex instead of boost::regex 2020-02-11 08:49:08 +01:00
Arne Morten Kvarving
44f2af0589 changed: do not mess with flags in config file
abi is ensured in other ways now
2020-02-10 11:45:06 +01:00
Arne Morten Kvarving
c272ebba62 fixed: build python bindings as c++17 2020-02-10 11:36:56 +01:00
Arne Morten Kvarving
d8aae55837 changed: remove the CXX11Features module
instead use standard CMake mechanism to set cxx standard to 17
move some of the tests to a OpmCompilerChecks.cmake file
2020-02-10 11:36:56 +01:00
Joakim Hove
01b0dcaedf Merge pull request #1454 from joakim-hove/fix-switch
Fix bug in switch default case
2020-02-07 17:32:42 +01:00
Arne Morten Kvarving
28c9db0dcd Merge pull request #1453 from tskille/compareECL
Disable checking of DOUBHEAD[1] with compareECL
2020-02-07 15:25:21 +01:00
Joakim Hove
a396b9004a Remove problematic test 2020-02-07 15:12:24 +01:00
Joakim Hove
2b0e06994d Fix bug in switch default case 2020-02-07 15:10:48 +01:00
Joakim Hove
07cb2fe0d6 Merge pull request #1451 from joakim-hove/eclstate-aquifer
Eclstate aquifer
2020-02-07 14:27:56 +01:00
Torbjørn Skille
bfca7c9fe8 Disable checking of DOUBHEAD[1] with compareECL 2020-02-07 12:53:45 +01:00
Joakim Hove
1a1b796cb6 Refactor Aquifetp class
- Make constructor and operator== for struct
- Make constructor and accessor for serialization
- Initial pressure stored in std::pair<bool, double>
- Add size() and begin() and end()
- Remove unused memmbers cell_id and inftableID
- Use ParserKeywords::AQUIFETP class instead of string lookup
2020-02-07 07:30:22 +01:00
Joakim Hove
140a1c0bf3 Add accessor and constructor for serialization 2020-02-07 07:30:22 +01:00
Joakim Hove
f91630a62d Add operator== to AQuiferCT
Initial pressure is stored as std::pair<bool, double> instead of
std::shared_ptr<double>.
2020-02-07 07:30:22 +01:00
Joakim Hove
f666ab0544 Refactored the AquiferCT class to construct AQUCT_data struct 2020-02-07 07:30:22 +01:00
Joakim Hove
a505f59096 Add begin(), end() and size() to AquiferCT class 2020-02-07 07:30:22 +01:00
Joakim Hove
ca4c10f810 Use TableManager in AquiferCT constructor 2020-02-07 07:30:22 +01:00
Joakim Hove
b57a4a39a3 Merge pull request #1448 from joakim-hove/rst-testing
Rst testing
2020-02-07 07:29:40 +01:00
Joakim Hove
9f18d86a5e Merge pull request #1446 from bska/currctrl-restart-support
Add Restart Infrastructure for Well's Active Control
2020-02-06 16:35:46 +01:00
Bård Skaflestad
38f458a672 Add Restart Infrastructure for Well's Active Control
This commit introduces a new protocol for communicating a well's
active constraint (i.e., its current target control mode) between
the running simulator and the restart file.  In particular, we add a
new type

    Opm::data::CurrentControl

whose data members indicate if the well is a producer or injector
and, depending on that state, carries information about the
pertinent active control mode.  The 'prod' member should be defined
for producing wells and the 'inj' member should be defined for
injectors.  Default-constructed objects of this type are 'invalid'
and not output to the restart file.  Add a CurrentControl member to
the Opm::data::Well type to enable communicating this information
using existing restart interfaces.

Expand existing unit tests to exercise the new data member.
2020-02-06 12:01:41 +01:00
Joakim Hove
112a0d1f2d Add test for testing of restart loaded well and connection 2020-02-06 11:59:10 +01:00
Joakim Hove
42fc0666be Rst connection - use proper enums for direction and state 2020-02-06 11:59:10 +01:00
Joakim Hove
b3dc5483f1 Rst connection insert_index has offset 0 2020-02-06 11:59:10 +01:00
Joakim Hove
de471c8244 Shift RstConnection::segment to offset 0 2020-02-06 11:59:10 +01:00
Joakim Hove
6afd05db1b Add group mamber to RstWell 2020-02-06 11:59:10 +01:00
Joakim Hove
6d3cb49c11 Add method get_well() to RstState 2020-02-06 11:59:10 +01:00
Joakim Hove
c69ff506d8 Merge pull request #1432 from joakim-hove/python-rpath
Pass RPATH to the python setup.py based build system
2020-02-06 10:54:10 +01:00
Joakim Hove
833933e954 Remove superfluous extra extension 2020-02-06 10:18:07 +01:00
Joakim Hove
22787eea61 Add boost_system to the list of libraries in setup.py 2020-02-06 10:16:43 +01:00
Joakim Hove
6b0073455b Pass RPATH to the python setup.py based build system 2020-02-06 10:15:40 +01:00
Bård Skaflestad
8225ea87d4 Merge pull request #1450 from joakim-hove/unitsystem-ecl-id
Add UnitSystem functionality to handle eclipse integer id
2020-02-05 20:42:51 +01:00
Joakim Hove
8f213b19d6 Merge pull request #1447 from akva2/simplify_tuning
changed: simplify Tuning handling
2020-02-05 07:50:41 +01:00
Joakim Hove
35a580f610 Add UnitSystem functionality to handle eclipse integer id
Writing of INTEHEAD keyword uses UnitSystem class instead of intermediate enum
UnitSystem.
2020-02-05 07:38:00 +01:00
Arne Morten Kvarving
dab3ba807a changed: simpify Tuning handling
make Tuning a simple struct, and store as a DynamicState<Tuning>.

in the process the unused setTuningInitialValue is removed. it was
only used in unit tests and seem like a leftover
2020-02-04 10:42:43 +01:00
Joakim Hove
378431024e Merge pull request #1445 from joakim-hove/addwell-refactor
Add Schedule::addWell() overload which does not take Deck arguments
2020-02-02 09:37:35 +01:00
Joakim Hove
3c5ae4bf44 Add Schedule::addWell() overload which does not take Deck arguments 2020-01-30 10:38:41 +01:00
Bård Skaflestad
b8386eb7bf Merge pull request #1444 from joakim-hove/rst-schedule-prep
Rst schedule prep
2020-01-30 10:26:43 +01:00
Joakim Hove
78f4e59fc8 Add output of missing date when TimeMap::TimeMap() fails 2020-01-30 10:20:01 +01:00
Joakim Hove
cdbccce62a Ensure base restart file is written before loading restarted case 2020-01-30 10:20:01 +01:00
Joakim Hove
9456d05ec4 Fix keyword inconsistency in test data 2020-01-30 10:20:01 +01:00
Joakim Hove
fc20150336 Use time points from Schedule in restart testing 2020-01-30 10:20:01 +01:00
Joakim Hove
993511e347 Merge pull request #1417 from bska/filleps
INIT File: Reenable FILLEPS for Two-Phase Systems
2020-01-29 21:25:17 +01:00
Bård Skaflestad
79a3ec6e84 INIT File: Reenable FILLEPS for Two-Phase Systems
This reverts commit c736e71e46.
2020-01-29 16:34:15 +01:00
Bård Skaflestad
19ecc3d30e Consider Active Phases When Initializing Satfunc Endpoints
This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties.  In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).

Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords.  These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
2020-01-29 16:34:15 +01:00
Joakim Hove
847182c25a Merge pull request #1442 from joakim-hove/use-set
Fixup
2020-01-29 15:28:15 +01:00
Joakim Hove
2b4f6bc73d Fixup 2020-01-29 15:11:42 +01:00
Joakim Hove
60abde0ffe Merge pull request #1433 from joakim-hove/rock-config
Rock config
2020-01-29 15:05:40 +01:00
Joakim Hove
936f142233 Add class RockConfig under SimulationConfig 2020-01-29 15:04:31 +01:00
Bård Skaflestad
41417c9d6a Merge pull request #1441 from joakim-hove/restart-fixup
Restart fixup
2020-01-29 14:11:16 +01:00
Joakim Hove
a33108dee0 Properly differentiate between base case and restart case in test 2020-01-29 12:45:42 +01:00
Joakim Hove
1d8ea3c92e Remove unused inline test data 2020-01-29 11:35:28 +01:00
Joakim Hove
d7a0693d08 Merge pull request #1440 from joakim-hove/ecl-config-cleanup
Ecl config cleanup
2020-01-29 08:05:41 +01:00
Joakim Hove
ae80f4521c Merge pull request #1439 from bska/tolcrit-for-sfunc-output
Make Saturation Function Output Aware of TOLCRIT
2020-01-29 00:46:42 +01:00
Joakim Hove
76229f95be Made IOConfig a member of RestartConfig 2020-01-29 00:27:35 +01:00
Joakim Hove
7036c3ee45 Remove unused constructor 2020-01-29 00:27:35 +01:00
Joakim Hove
3730cadcd8 Minor reorder 2020-01-29 00:27:35 +01:00
Joakim Hove
0b19eb7ffb Remove unused method declarations 2020-01-29 00:27:35 +01:00
Bård Skaflestad
c8d23c8d0a Merge pull request #1438 from joakim-hove/timemap-schedule-only
TimeMap iterate only over SCHEDULE section

Closes OPM/opm-simulators#2306
2020-01-29 00:08:06 +01:00
Joakim Hove
86367a78b8 Fix typo in json defintion of ENDSCALE 2020-01-28 20:40:42 +01:00
Joakim Hove
d36b6fa287 TimeMap iterate only over SCHEDULE section 2020-01-28 20:38:45 +01:00
Bård Skaflestad
fee20972b4 Make Saturation Function Output Aware of TOLCRIT
This commit switches to outputting all relative permeability values
less than TOLCRIT (default 1.0E-6) as zero when writing saturation
function tables to the INIT file's TAB vector.  Doing so also
nominally affects the relative permeability function derivatives for
small values of Kr.

Update the SPE1-based unit test since this has very low Kr values
for water and some of the nodes now fall below the 1.0e-6 threshold.
2020-01-28 16:38:29 +01:00
Arne Morten Kvarving
5e546086fb Merge pull request #1435 from akva2/hide_fprops_ifaces
changed: hide the templated 'has' and 'get' interfaces in FieldPropsManager
2020-01-28 15:33:49 +01:00
Joakim Hove
084b4721f9 Merge pull request #1437 from joakim-hove/schedule-testdata
Schedule testdata
2020-01-28 14:35:31 +01:00
Arne Morten Kvarving
9e8a765b93 quell warning when building without python
anonymize the parameter like is done for the rest of them
2020-01-28 14:32:27 +01:00
Arne Morten Kvarving
ae10af208f changed: hide the templated 'has' and 'get' interfaces in FieldPropsManager
motivation: an upcoming parallel frontend to the field props manager.
templated functions cannot be virtualized, and thus having these exposed
would give a great chance of confusing the users in the downstream
code, where properties would be caught from the (potentially) empty
backend instead of from the frontend.
2020-01-28 14:31:25 +01:00
Joakim Hove
79a75eba2a Add public accessor TimeMap::restart_offset() 2020-01-28 12:49:27 +01:00
Joakim Hove
8480e37975 Add header member to RstState 2020-01-28 12:49:27 +01:00
Joakim Hove
dcc52eb225 Add testdata 2020-01-28 12:46:18 +01:00
Joakim Hove
d1608ea2cf Merge pull request #1430 from joakim-hove/ecl-bc
Add class to internalize BC keyword - and add to SimulationConfig
2020-01-28 11:03:43 +01:00
Joakim Hove
c9f6326dc5 Add class to internalize BC keyword - and add to SimulationConfig 2020-01-27 11:55:15 +01:00
Joakim Hove
eed3c290b3 Merge pull request #1431 from bska/expose-tolcrit
Internalise TOLCRIT Keyword
2020-01-27 09:45:05 +01:00
Bård Skaflestad
7c1b77ec5d Internalise TOLCRIT Keyword
This commit internalises the TOLCRIT keyword into the EclipseState
for subsequent use in determining critical saturations when
processing saturation function keywords such as SGOF and SOF3.
Specifically, we add a new type

    Opm::SatFuncControls

that, at present, stores only the TOLCRIT data item (defaulted to
the keyword's default value).  Client code can then retrieve the
value by calling the

    SatFuncControls::minimumRelpermMobilityThreshold()

member function.

Add a new data member of this type to the Opm::Runspec class so that
we complete the chain from EclipseState, and a few simple unit tests
to exercise the expected functionality.
2020-01-24 20:58:38 +01:00
Bård Skaflestad
4094e4957a Merge pull request #1427 from joakim-hove/time-map-restart
Time map restart
2020-01-24 20:25:44 +01:00
Joakim Hove
db8ded1f09 Pass restart info to TimeMap constructor 2020-01-24 19:27:53 +01:00
Joakim Hove
0ba3a65d16 Merge pull request #1429 from akva2/remove_ioconfig_member
Fix TimeMap constructor and remove IOConfig member
2020-01-24 15:15:02 +01:00
Joakim Hove
c7023ab3c6 Merge pull request #1428 from atgeirr/avoid-repeated-warnings
Remove duplicate warnings for unhandled summary keywords.
2020-01-24 14:09:45 +01:00
Arne Morten Kvarving
1c2a284ee8 remove unused member m_first_restart_step from IOConfig 2020-01-24 13:13:22 +01:00
Arne Morten Kvarving
d885c09ffd fixed: add additional members also in std::vector<std::time_t> constructor
this is done in the deck based constructor, so we have to do the same
2020-01-24 13:13:21 +01:00
Atgeirr Flø Rasmussen
3ee092792c Remove duplicate warnings for unhandled summary keywords. 2020-01-24 12:27:32 +01:00
Joakim Hove
67fbdd3102 Merge pull request #1426 from joakim-hove/time-map-rm-cons
Time map rm cons
2020-01-23 09:15:20 +01:00
Joakim Hove
fd698139f5 Remove special code for serialization 2020-01-22 18:50:59 +01:00
Bård Skaflestad
2539a0d0e9 Merge pull request #1425 from joakim-hove/time-map-immutable
Time map immutable
2020-01-22 18:45:34 +01:00
Joakim Hove
fc9958bb0c Remove TimeMap( start_time ) constructor 2020-01-22 16:56:42 +01:00
Joakim Hove
63e99fb807 Make mutable accessors in TimeMap private 2020-01-22 16:23:37 +01:00
Joakim Hove
2d8151808f Add TimeMap(std::vector<std::time_t>& ) constructor 2020-01-22 16:23:37 +01:00
Joakim Hove
dd4a68b0a2 Merge pull request #1424 from akva2/add_gravity_flag
added: gravity flag to InitConfig
2020-01-22 14:15:59 +01:00
Joakim Hove
1cc2293c05 Merge pull request #1419 from joakim-hove/rst-state
POD classes for restart info
2020-01-22 13:33:26 +01:00
Arne Morten Kvarving
448ea5f3ab added: gravity flag to InitConfig 2020-01-22 12:47:39 +01:00
Joakim Hove
69822e880f Add POD struct for state with wells and groups from restart file 2020-01-22 12:23:26 +01:00
Joakim Hove
51daf43cef Merge pull request #1422 from akva2/noecl_flush_prestate
More serialization preparation
2020-01-22 06:30:57 +01:00
Arne Morten Kvarving
6a1acc15b8 make FaultCollection constructible from variables
also add accessor and equality operator
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
d5d5a01503 make Fault constructible from variables
also add default constructor and accessor
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
86b3566229 make FaultFace constructible from variables
also add default constructor and equality operator
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
be799586c8 make TransMult constructible from variables
also add default constructor and equality operator
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
43fae042b1 make EclipseConfig constructible from variables
also add default constructor and equality operator
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
4c49aea83e allow construction MULTREGTScanner from variables
also add accessors, equality operator, copy constructor,
assignment operator and make it default constructible
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
48bca722f5 changed: store reference to FieldPropsManager as a pointer
default initialization required for serialization
is not possible with a const ref member
2020-01-21 15:22:10 +01:00
Arne Morten Kvarving
83b3b5bab6 add equality operator to MULTREGTRecord 2020-01-21 14:36:00 +01:00
Joakim Hove
9c6a74043c Merge pull request #1420 from joakim-hove/remove-eclipse-3dproperties
Remove old 3D property implementation
2020-01-20 11:35:08 +01:00
Joakim Hove
ce9d325719 Merge pull request #1418 from joakim-hove/trim-padded-string
Add trim method to PaddedOutputString<N>
2020-01-20 08:37:40 +01:00
Joakim Hove
28d77dacd8 Add templated method create trimmed copy of string with c_str() 2020-01-19 23:18:49 +01:00
Joakim Hove
691296f91a Remove old 3D property implementation 2020-01-19 23:04:46 +01:00
Bård Skaflestad
1132857324 Merge pull request #1407 from akva2/noecl_flush_schedule
More serialization effort
2020-01-17 15:35:51 +01:00
Arne Morten Kvarving
6986436073 make TimeStampUTC constructible from variables
also add accessor
2020-01-17 10:08:50 +01:00
Arne Morten Kvarving
df5baad233 fixed: return by const ref 2020-01-17 10:08:50 +01:00
Arne Morten Kvarving
13db196c5c fixed: missing CTFKind parameter in Connection 2020-01-17 10:08:50 +01:00
Arne Morten Kvarving
c4936d55e1 fixed: update UDAValue constructors for new dim member 2020-01-17 10:08:50 +01:00
Arne Morten Kvarving
7ac2febae2 changed: allow disabling sanity check in Dimension constructor
while this makes sense to do in general, it causes issues
when reconstructing after deserialization.
we have dimensions with '/' and '*' in the name that was
constructed through newComposite.
2020-01-17 10:08:50 +01:00
Arne Morten Kvarving
828cd2ee9a fixed: add missing initializer 2020-01-17 10:08:50 +01:00
Bård Skaflestad
33fdacea54 Merge pull request #1415 from berland/wconhist-fix
Clean up item names in json for WCONHIST
2020-01-16 16:56:50 +01:00
Bård Skaflestad
7fb66a589e Merge pull request #1416 from akva2/janitoring
quell signed/unsigned comparison warnings
2020-01-16 15:48:25 +01:00
Arne Morten Kvarving
2951bf01d4 quell signed/unsigned comparison warnings 2020-01-16 14:54:48 +01:00
Håvard Berland
81701b72ba Clean up item names in json for WCONHIST
Consistency with other keywords
Change corresponding code that reads this.
2020-01-16 13:45:02 +01:00
Bård Skaflestad
a8d05385e6 Merge pull request #1387 from bska/dont-output-rft-unless-requested
Don't Output RFT Files Unless Specifically Requested
2020-01-15 12:45:40 +01:00
Bård Skaflestad
8440ac3bd1 Don't Output RFT Files Unless Specifically Requested
This commit ensures that we do not create RFT output files unless
the simulation model specifically requests such output (e.g.,
through keywords WRFT or WRFTPLT).  Notably, the OutputStream::RFT
constructor will also create the file so we must take care not to
form an object of this type unless actually needed.
2020-01-15 09:33:21 +01:00
Bård Skaflestad
3d94dc7e63 Merge pull request #1411 from joakim-hove/rst-connectin
Simple POD class for connection info loaded from restart file
2020-01-15 00:48:20 +01:00
Joakim Hove
66fd1d39e9 Small POD class for connections loaded from restart file 2020-01-14 23:04:57 +01:00
Joakim Hove
75b64025a3 Merge pull request #1412 from bska/first-rft-output-event
Rework RFT Config to Handle More Cases
2020-01-14 17:39:57 +01:00
Bård Skaflestad
8f182db27a Rework RFT Config to Handle More Cases
Generally, this commit captures more of the surrounding context of
calls to the updateRFT() and updatePLT() member functions.  We need
this additional context in order to handle the conflicting semantics
of output requests WRFT and WRFTPLT:FOPN.  The former generates RFT
output when the well opens if this event does not happen earlier in
the simulation schedule than the output request.  Otherwise no RFT
data is emitted.  The latter outputs RFT data at request time if
well opens no later than the request; otherwise at well-open time.

To this end, switch the well_open_rft_name data member from an
unordered_set of well names into an unordered_map from well names to
RFT output request times.  With this additional information we can
use well_open_rft_time to infer the appropriate response to whether
or not to activate RFT output at well open time.  Moreover, we now
guarantee that no RFT output is ever activated before the first RFT
output request.

Switching the type of the well_open_rft_name data member also begets
an API update to the serialization related RFTConfig constructor and
to the return type of RFTConfig::wellOpenRftName().

We furthermore switch to caching the first RFT output event in a new
scalar data member, first_rft_event.  This caching, coupled with the
additional calling context mentioned earlier, means we are now able
to report a high-fidelity, constant time answer to the

    RFTConfig::firstRFTOutput()

request.  This, in turn, is very useful for the RFT output code.
Finally, we also add a couple of new, private member functions to
simplify updating first_rft_event depending on context.

As part of this update, member function

    RFTConfig::setWellOpenRFT(report_step)

will now use the minimum of all 'report_step' values to support the
WRFT keyword being specified more than once.

Finally, add a set of unit tests to exercise the various RFT output
request combinations.

While here, also switch to using unordered_map::find() and emplace()
where possible to limit repeated look-up of the same keys.
2020-01-14 15:58:34 +01:00
Joakim Hove
ecb5fce19b Only active cells (#1298)
Use FieldProps implementation for 3D properties
2020-01-13 15:46:06 +01:00
Joakim Hove
13b3d1e17b Merge pull request #1395 from joakim-hove/use-pyaction
Use pyaction
2020-01-13 15:16:24 +01:00
Joakim Hove
a6ddce5d92 Add basic Python exec of PYACTION 2020-01-13 15:15:21 +01:00
Arne Morten Kvarving
e2719f02b6 Merge pull request #1409 from akva2/fix_python_superbuild
fixed: use PROJECT_XXX instead of CMAKE_XXX
2020-01-13 15:08:54 +01:00
Arne Morten Kvarving
8cf1497ccb fixed: use PROJECT_XXX instead of CMAKE_XXX
make it work fine with the 'super-build' CMakeLists.txt
2020-01-13 13:38:47 +01:00
Joakim Hove
b9c3df5f42 Add has_xxx and __contains__ to Python SummaryState 2020-01-13 11:43:58 +01:00
Joakim Hove
9ae007ddc9 Merge pull request #1405 from joakim-hove/well-warning
Add default: clause in switch
2020-01-13 11:42:23 +01:00
Joakim Hove
8bda586eee Merge pull request #1406 from atgeirr/silence-warnings
Silence some warnings.
2020-01-13 11:42:09 +01:00
Atgeirr Flø Rasmussen
b3f8209542 Silence some warnings. 2020-01-13 10:07:33 +01:00
Joakim Hove
83966eb565 Add default: clause in switch 2020-01-13 08:41:21 +01:00
Joakim Hove
1985f094a3 Merge pull request #1394 from joakim-hove/schedule-update-well
Schedule update well
2020-01-11 17:03:56 +01:00
Bård Skaflestad
17815f7487 Merge pull request #1400 from joakim-hove/rst-header
Rst header
2020-01-11 09:17:33 +01:00
Joakim Hove
7d1d08d4a8 Merge pull request #1399 from joakim-hove/py-code-records
Py code records
2020-01-11 06:57:45 +01:00
Joakim Hove
35619721a3 Well::updateStatus can optionally update status of connections 2020-01-11 06:55:22 +01:00
Joakim Hove
67f95e8548 Add Schedule::xxx_well() for well status manipulations from Python 2020-01-11 06:54:25 +01:00
Joakim Hove
5fb03ec44f Make POD class RestartIO::Header which internalizes restart header 2020-01-11 06:54:01 +01:00
Joakim Hove
16f0869bc0 Expose more indices in the INTEHEAD vector publicly 2020-01-11 06:54:01 +01:00
Joakim Hove
aa9bab75d9 Merge pull request #1391 from totto82/trinemykk-smartwater
Rebased brine module
2020-01-11 06:50:29 +01:00
Joakim Hove
0f29249478 Merge pull request #1402 from bska/record-all-wellopen-events
Schedule: Record RFT Well Open Events on Status Changes
2020-01-10 19:57:39 +01:00
Bård Skaflestad
33ef89487b Schedule: Record RFT Well Open Events on Status Changes
This commit ensures that we record a "well open" event whenever

    Schedule::updateWellStatus

switches a well's status to OPEN.  We need this information in order
to correctly output RFT data configured with WRFT or the FOPN option
of keyword WRFTPLT.  Previously, we recorded such events only in the
context of the WELOPEN keyword.
2020-01-10 18:21:19 +01:00
Bård Skaflestad
8cb1d62f29 Merge pull request #1398 from joakim-hove/py-refactor
Use 'PYEND' instead of '<<<' to terminate PYACTION and PYINPUT
2020-01-09 17:01:51 +01:00
Joakim Hove
9c99c681c9 Add ParseRecord::end_string member 2020-01-09 16:35:22 +01:00
Joakim Hove
5ea70d256d Extract ParserKeyword and ParserRecord 2020-01-09 15:48:25 +01:00
Joakim Hove
c025754834 Add size() method to RawKeyword 2020-01-09 09:42:16 +01:00
Joakim Hove
f3797e8877 Python code must be properly terminated 2020-01-09 09:26:35 +01:00
Joakim Hove
6199b81e60 Use 'PYEND' instead of '<<<' to terminate PYACTION and PYINPUT 2020-01-09 08:21:59 +01:00
Arne Morten Kvarving
ff156fd53c make BrineDensityTable constructible from variables
also add equality operator
2020-01-08 15:31:35 +01:00
Arne Morten Kvarving
763c931726 add equality operator to WellBrineProperties 2020-01-08 15:31:35 +01:00
Arne Morten Kvarving
eb6159fceb make PvtwsaltTable constructible from variables
also add accessor and equality operator
2020-01-08 15:31:35 +01:00
Arne Morten Kvarving
bc67976cb3 update TableManager constructor, assignment and equality operator
due to brine additions
2020-01-08 15:31:35 +01:00
Arne Morten Kvarving
affbfe3bae update well constructor for BrineProperties addition 2020-01-08 15:31:35 +01:00
Tor Harald Sandve
c5e68b82e8 Fix rebase smartwater 2020-01-08 15:31:35 +01:00
Trine S. Mykkeltvedt
b85871c4e8 renamed saltwater-->brine and edited BDENSITY 2020-01-08 15:31:35 +01:00
Trine S. Mykkeltvedt
aa19f38a54 Added keywords PVTWSALT and modified SALTVD, WSALT and BDENSITY for a simple salt/brine implementation 2020-01-08 15:31:35 +01:00
Bård Skaflestad
5fd756699e Merge pull request #1393 from akva2/noecl_flush
make SummaryConfig constructible from variables
2020-01-08 13:11:23 +01:00
Arne Morten Kvarving
8fbff44d22 make SummaryConfig constructible from variables
also add accessors and equality operator
2020-01-08 09:58:20 +01:00
Arne Morten Kvarving
d9c7260784 make SummaryNode default constructible 2020-01-08 09:58:10 +01:00
Joakim Hove
d127173ce2 Merge pull request #1392 from berland/opmioport
Port python examples from sunbeam to opm.io
2020-01-07 19:06:17 +01:00
Håvard Berland
62c97b8ca2 Port python examples from sunbeam to opm.io 2020-01-07 17:14:44 +01:00
Joakim Hove
b65e5547aa Merge pull request #1386 from joakim-hove/uda-raw-data
Uda raw data
2020-01-07 15:04:29 +01:00
Joakim Hove
bf697180d7 Merge pull request #1388 from tskille/pybind_eclipse_grid
additional python bindings for eclipse_grid
2020-01-07 07:10:34 +01:00
Joakim Hove
d2260e60b9 Merge pull request #1389 from joakim-hove/alternating-records
Fixup of alternating records special case
2020-01-06 18:12:29 +01:00
Joakim Hove
dfa318ec4d Merge pull request #1390 from joakim-hove/split-codegen-fixup
Fixup: leftover from code generation refactor
2020-01-06 18:12:03 +01:00
Torbjørn Skille
4136868592 additional python bindings for eclipse_grid 2020-01-06 17:43:32 +01:00
Joakim Hove
b72fd84e24 Fixup: leftover from code generation refactor 2020-01-06 16:20:16 +01:00
Joakim Hove
6f330a7482 Fixup of alternating records special case 2020-01-06 15:50:36 +01:00
Joakim Hove
b7cebb1907 Refactored the handling of BHP / THP 2020-01-06 15:28:04 +01:00
Joakim Hove
0d08986a06 Remove unit version when handling WELTARG
The WELTARG keyword will write into UDA instances, and they assume that the
internal data is in raw deck units.
2020-01-06 12:05:51 +01:00
Joakim Hove
ecd3ffdb49 Add method UDAValue::zero() 2020-01-06 12:05:51 +01:00
Joakim Hove
8f6c2c70f6 UDAalue::get<double>() will return raw value - not SI.
Add new function UDAValue::getSI() which will return SI value of numerical
input, and throw an exception if internal state is not numeric.
2020-01-06 12:05:51 +01:00
Joakim Hove
40ea92ac81 Reenable BHP testing 2020-01-06 12:05:51 +01:00
Joakim Hove
c2b4d30be5 Merge pull request #1377 from joakim-hove/pyaction
Add PyAction skeleton code
2020-01-06 12:04:26 +01:00
Joakim Hove
d2392c4ea4 Add PyAction skeleton code 2020-01-06 10:28:19 +01:00
Joakim Hove
4e899503e2 Merge pull request #1380 from joakim-hove/split-codegen
Split codegen
2020-01-06 10:27:14 +01:00
Joakim Hove
3c29d4c410 Merge pull request #1385 from akva2/noecl_flush
More serialization preparation
2020-01-03 20:15:31 +01:00
Arne Morten Kvarving
f8bf446d45 make Schedule constructible from variables
also add accessors and equality operator
2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
2ca198d687 add equality operator to DynamicVector 2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
9d74b51024 make Action::Actions constructible from variables
also add accessor and equality operator
2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
e0502a1970 make Action::ActionX constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
24bfa2e75b add equality operator to Action::Condition
also make it default constructible
2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
65b958cbcd add equality operator to Action::Quantity 2020-01-03 13:20:36 +01:00
Arne Morten Kvarving
e7e2458951 make Action::AST constructible from variables
also add accessors and equality operator
2020-01-03 13:20:36 +01:00
Bård Skaflestad
5fb4d355ec Merge pull request #1383 from joakim-hove/fp-section
Fp section
2020-01-03 11:33:54 +01:00
Arne Morten Kvarving
73001501f0 make ASTNode constructible from variables
also add accessors and equality operator
2020-01-03 08:34:28 +01:00
Arne Morten Kvarving
9c187ad0c1 changed: make ASTNode part of public API
required for serialization
2020-01-03 08:34:28 +01:00
Arne Morten Kvarving
fda4862bb7 make Tuning constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-03 08:32:54 +01:00
Arne Morten Kvarving
b0f262374e make Deck constructible from variables
also make it default constructible, add accessors
assignment operator and equality operator
2020-01-03 08:30:42 +01:00
Arne Morten Kvarving
2d750b1b0b make DeckKeyword constructible from variables
also make it default constructible and add accessors
2020-01-03 08:28:07 +01:00
Arne Morten Kvarving
3cf79037e2 add equality operator to Location
also put it in Opm namespace
2020-01-03 08:24:33 +01:00
Joakim Hove
5e10c94f9f Merge pull request #1375 from joakim-hove/actionx-bug
Actionx bug
2020-01-02 21:27:20 +01:00
Joakim Hove
b7fcded7ef Merge pull request #1378 from joakim-hove/wrap-summarystate
python wrapper for summarystate
2020-01-02 20:54:48 +01:00
Joakim Hove
c42be3d345 Fixed bug in SORTA and SORTD functions 2020-01-02 20:18:19 +01:00
Joakim Hove
b1dc69d8a6 Refactored internals of UDQSet 2020-01-02 20:16:37 +01:00
Joakim Hove
0ea6f93074 Merge pull request #1384 from akva2/noecl_flush
More serialization preparation
2020-01-02 20:01:11 +01:00
Arne Morten Kvarving
bd3923ad1d add accessor to DeckRecord 2020-01-02 15:33:41 +01:00
Arne Morten Kvarving
3105799f0f make DeckItem constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:31:27 +01:00
Arne Morten Kvarving
55c8d69890 make RFTConfig constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:28:45 +01:00
Joakim Hove
087aec6e01 Refactored generated keyword test to reduce compilation time 2020-01-02 15:27:54 +01:00
Joakim Hove
3c6a60c4a9 Code genereator will create many source files 2020-01-02 15:27:54 +01:00
Joakim Hove
aaee287dac Code generation file update routines are void 2020-01-02 15:27:54 +01:00
Joakim Hove
c3a038c2b6 Refactor code generation to facilitate multiple source files 2020-01-02 15:27:54 +01:00
Joakim Hove
141000b750 FieldProps parsing is section aware - handle MULT in EDIT 2020-01-02 15:27:22 +01:00
Joakim Hove
8cba2777cd Add Section enum 2020-01-02 15:27:22 +01:00
Joakim Hove
90d30e3bc9 Rename class Section -> DeckSection 2020-01-02 15:27:22 +01:00
Arne Morten Kvarving
97319d4831 make GConSump constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:25:42 +01:00
Arne Morten Kvarving
e7d7e2e232 make GConSale constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:22:59 +01:00
Arne Morten Kvarving
01dd29278a make GuideRateConfig constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:20:16 +01:00
Arne Morten Kvarving
e803f97374 make GuideRateModel constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 15:17:08 +01:00
Joakim Hove
9363905e03 Merge pull request #1382 from akva2/noecl_flush
More serialization preparation
2020-01-02 15:08:22 +01:00
Arne Morten Kvarving
2a8f944b6f make UDQActive constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:17:26 +01:00
Arne Morten Kvarving
5c203e29b5 make UDQConfig constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:12:59 +01:00
Arne Morten Kvarving
763bc69211 add equality operator to UDQIndex 2020-01-02 12:11:28 +01:00
Arne Morten Kvarving
ec907c22c1 make UDQAssign constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:10:00 +01:00
Arne Morten Kvarving
426ee94a75 add equality operator to UDQAssign::AssignRecord 2020-01-02 12:10:00 +01:00
Arne Morten Kvarving
5d6046fdae make UDQDefine constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:08:27 +01:00
Arne Morten Kvarving
45aad7e7fd remove unused member variable from UDQDefine 2020-01-02 12:08:27 +01:00
Arne Morten Kvarving
6720e6a6cb make UDQASTNode constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:06:34 +01:00
Arne Morten Kvarving
9c991241c0 changed: make UDQASTNode part of public API
needed for serialization
2020-01-02 12:06:34 +01:00
Arne Morten Kvarving
dab5f226e1 make UDQFunctionTable constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:04:05 +01:00
Arne Morten Kvarving
c0183ae78a make UDQFunction constructible from variables
also make it default constructible and add equality operator
2020-01-02 12:02:31 +01:00
Arne Morten Kvarving
4c626c2265 make WListManager constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 12:00:15 +01:00
Arne Morten Kvarving
12f87578d6 make WList constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 11:59:09 +01:00
Joakim Hove
af477900b9 Merge pull request #1381 from akva2/noecl_flush
More serialization preparation
2020-01-02 11:50:03 +01:00
Arne Morten Kvarving
c8c5102e9d make Group constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 09:17:33 +01:00
Arne Morten Kvarving
0fc57a2bd8 make IOrderSet constructible from variables
also make it default constructible, add accessors
and equality operator
2020-01-02 09:17:33 +01:00
Arne Morten Kvarving
a58fd61fdd allow constructing Well from variables
also add accessors
2020-01-02 09:17:33 +01:00
Arne Morten Kvarving
d1d2414f4e make WellSegments constructible from variables
also add accessors and equality operator
2020-01-02 08:31:22 +01:00
Arne Morten Kvarving
6ea8dd8104 make UnitSystem constructible from variables
also make it default constructible and add accessors
2020-01-02 08:27:31 +01:00
Arne Morten Kvarving
7c3f89b0a1 add non-throwing accessor for si scaling factor in Dimension 2020-01-02 08:25:51 +01:00
Arne Morten Kvarving
8b33a0e36a allow constructing Segment from variables 2020-01-02 08:22:42 +01:00
Arne Morten Kvarving
7f570d1404 make Valve constructible from variables
also make it default constructible and equality operator
2020-01-02 08:19:31 +01:00
Arne Morten Kvarving
a4f97e84b6 allow constructing SpiralICD from variables
also make it default constructible and add equality operator
2020-01-02 08:17:36 +01:00
Joakim Hove
20c5a2b50e python wrapper for summarystate 2019-12-27 10:08:46 +01:00
Joakim Hove
a2def0ea5b Merge pull request #1372 from stefoss23/python_field_props
Python: added class FieldProperties.
2019-12-23 23:06:05 +01:00
Joakim Hove
4528109245 Merge pull request #1374 from joakim-hove/isolnum
Add integer property ISOLNUM
2019-12-23 13:29:02 +01:00
Joakim Hove
b95f7bd6bf Add integer property ISOLNUM 2019-12-23 12:23:41 +01:00
Steinar Foss
dc8acb494c python FieldProperties can return numpy int arrays. 2019-12-23 11:58:05 +01:00
Steinar Foss
d3a4b536d2 python FieldProperties can return numpy double arrays. 2019-12-23 11:35:52 +01:00
Joakim Hove
99791032b3 Merge pull request #1373 from joakim-hove/fp-cache-valid
Add internal flag to check if all FieldProps values have been set
2019-12-23 10:54:58 +01:00
Joakim Hove
ce49db8438 Add internal flag to check if all FieldProps values have been set 2019-12-23 10:11:39 +01:00
Joakim Hove
5060813c4e Merge pull request #1371 from joakim-hove/opmi-time
Add time summaries to opmi
2019-12-23 08:01:33 +01:00
Steinar Foss
d6c1d64ba0 Python: added class FieldProperties.
test_props.py: added check for 3d_properties/field_props extraction.

cxx/eclipse_state.cpp: adding function field_props.

added python class FieldProperties.

python FieldProps: added __contains__.

python FieldProps: added __getitem__.

python field_props: images all 3dprops tests.
2019-12-22 15:25:16 +01:00
Joakim Hove
4048b8774e Add time summaries to opmi 2019-12-22 12:42:56 +01:00
Bård Skaflestad
2438e46d8a Merge pull request #1370 from joakim-hove/init-speedup
Init speedup
2019-12-20 23:08:13 +01:00
Joakim Hove
c8b0da82c0 Merge pull request #1366 from joakim-hove/fp-spoly
Fp spoly
2019-12-20 17:24:08 +01:00
Bård Skaflestad
4b8152d8e1 Merge pull request #1367 from akva2/noecl_flush
More serialization preparation
2019-12-20 17:06:55 +01:00
Kai Bao
8284634cc5 Merge pull request #1239 from GitPaean/removing_whitespace_test_ERst.cpp
[PR to update_data] removing whitespaces from test_ERst.cpp
2019-12-20 16:43:53 +01:00
Joakim Hove
fbe3d34acb Merge pull request #1369 from stefoss23/udt
Parser will skip keyword UDT.
2019-12-20 16:30:24 +01:00
Bård Skaflestad
188d6ca179 Merge pull request #1361 from joakim-hove/multregp
Multregp
2019-12-20 16:04:00 +01:00
Arne Morten Kvarving
40e09f9169 Merge pull request #1368 from akva2/fix_no_data_to_update
fixed: do not open a issue/PR if no tests failed
2019-12-20 16:01:14 +01:00
Arne Morten Kvarving
a060cb2d17 make WellProductionProperties constructible from variables
also make it default constructible and add an accessor
2019-12-20 15:47:13 +01:00
Arne Morten Kvarving
84eb1542ef fixed: do not open a issue/PR if no tests failed 2019-12-20 15:20:49 +01:00
Joakim Hove
f03aeabc38 Refactored cell volume calculations for speed 2019-12-20 14:24:31 +01:00
Steinar Foss
e2e8d1eb22 Parser will skip keyword UDT.
Parser will skip UDT.
2019-12-20 12:40:20 +01:00
Joakim Hove
3fd9b20cd7 White space changes 2019-12-20 12:23:14 +01:00
Arne Morten Kvarving
69f4b72b3a make WellConnections constructible from variables
also make it default constructible and add accessors
2019-12-20 11:54:02 +01:00
Arne Morten Kvarving
cc4c5c1fbd add equality operator to WellGuideRate 2019-12-20 11:51:56 +01:00
Arne Morten Kvarving
7eeadd8cb5 make WellEconProductionLimit constructible from variables 2019-12-20 11:48:57 +01:00
Arne Morten Kvarving
80702dba06 make WellInjectionProperties constructible from variables
also make it default constructible
2019-12-20 11:41:54 +01:00
Arne Morten Kvarving
e4361cd1e0 make Connection constructible from variables
also make default constructible
2019-12-20 11:40:58 +01:00
Arne Morten Kvarving
e6f2bd0eac allow constructing WelltracerProperties from variables
also add accessor and convenience type alias
2019-12-20 11:39:24 +01:00
Arne Morten Kvarving
0e8ae81440 add equality operator to WellFoamProperties 2019-12-20 11:39:24 +01:00
Arne Morten Kvarving
72cd4cf1ad allow constructing WellPolymerProperties from variables 2019-12-20 11:39:24 +01:00
Bård Skaflestad
30773db877 Merge pull request #1365 from akva2/noecl_flush
More serialization preparation
2019-12-20 10:41:44 +01:00
Joakim Hove
cf3a4ffe25 Add keyword SSOL to FieldProps 2019-12-20 09:09:35 +01:00
Joakim Hove
e50f05ca9a Add keyword SPOLYMW to FieldProps 2019-12-20 09:09:35 +01:00
Joakim Hove
33bcbb26e6 Add RS and RV to FieldProps 2019-12-20 09:09:35 +01:00
Joakim Hove
b3dfe95b43 Add SPOLY keyword to FieldProps 2019-12-20 09:09:35 +01:00
Arne Morten Kvarving
4c331ae655 allow constructing MessageLimits from data
also add default constructor, equality operator and accessor
2019-12-20 08:20:15 +01:00
Arne Morten Kvarving
a91ce46ca3 allow constructing WellTestConfig from variables
also add accessor and equality operator
2019-12-20 08:15:22 +01:00
Arne Morten Kvarving
f0786fb88a add equality operator to WTestWell 2019-12-20 08:15:22 +01:00
Arne Morten Kvarving
9050bdb08e allow constructing VFPProdTable from data
also add default constructor, assignment operator
and equality operator
2019-12-20 08:14:43 +01:00
Arne Morten Kvarving
3e46908041 allow constructing VFPInjTable from data
also add default constructor, assignment operator
and equality operator
2019-12-20 08:13:01 +01:00
Arne Morten Kvarving
ae13dd1867 allow constructing Events from data
also add default constructor, equality operator and accessor
2019-12-20 08:10:54 +01:00
Arne Morten Kvarving
eadca769a0 allow constructing DynamicVector for data
also add default constructor and accessor
2019-12-20 08:10:03 +01:00
Arne Morten Kvarving
74e57deac2 allow constructing OilVaporizationProperties from data
also add default constructor and accessors
2019-12-20 08:08:32 +01:00
Joakim Hove
067fcd636c Merge pull request #1362 from joakim-hove/python-has-alue
Python has alue
2019-12-20 07:31:13 +01:00
Joakim Hove
4f11b7846c Add support for MULTREGP in FieldProps::porv implementation 2019-12-20 07:28:48 +01:00
Joakim Hove
fde5c0b096 Merge pull request #1359 from joakim-hove/fp-comments
Fp comments
2019-12-20 07:27:17 +01:00
Joakim Hove
5cf0d0393b Merge pull request #1363 from stefoss23/add_some_uknown_size_keywords
keyword ROCK: size->UNKNOWN. Added keyword ADSORP.
2019-12-19 20:14:36 +01:00
Steinar Foss
a5c245bc6c keyword ROCK: size->UNKNOWN. Added keyword ADSORP.
added keyword ADSOPR w/ test.

keyword ADSORP: size set to NTSFUN, TABDIMS.

keyword ADSORP size shift:1.

ParserTests: added test for kw ROCK.
2019-12-19 15:27:55 +01:00
Joakim Hove
465b2b6a1d Add Python methods DeckItem.has_value() and DeckItem.defaulted() 2019-12-19 15:22:16 +01:00
Joakim Hove
378d5c120b Remove trailing whitespace 2019-12-19 15:20:15 +01:00
Joakim Hove
46999f418f Refactored FieldProps
- The lowest level get method is called init_get() - this will unconditionally
  create new keyword. The init_get() method is private.

- Introduced FieldDataManager which keeps track of data pointer and status.

- Refactored get( ) implementation
2019-12-19 15:06:20 +01:00
Joakim Hove
ce5b9b1e1d Add documentation to the FieldPropsManager 2019-12-19 10:55:57 +01:00
Joakim Hove
7cfb51dfe6 Merge pull request #1195 from jalvestad/actionx-udq-rst
Code to write UDQ and ACTIONX data to the Eclipse compatible restart file
2019-12-19 10:27:51 +01:00
Arne Morten Kvarving
306af1b445 Merge pull request #1360 from akva2/noecl_flush
Yet another round of serialization preparation
2019-12-19 10:25:25 +01:00
Arne Morten Kvarving
0841a28776 allow constructing TableManager from variables
also add accessor, assignment operator and equality operator
2019-12-19 09:29:26 +01:00
Arne Morten Kvarving
8e1a332920 add equality operator to ROCKRecord 2019-12-19 09:29:26 +01:00
Arne Morten Kvarving
7b36d325b5 allow constructing Aqudims from variables
also add equality operator
2019-12-19 09:28:23 +01:00
Arne Morten Kvarving
8c61d6fff5 add equality operator to Eqldims 2019-12-19 09:28:23 +01:00
Arne Morten Kvarving
90bb9abf31 add equality operator to Regdims 2019-12-19 09:28:23 +01:00
Arne Morten Kvarving
415fda815f allow constructing SkprwatTable from variables
also add equality operator
2019-12-19 09:26:57 +01:00
Arne Morten Kvarving
1ecbc75bfb allow constructing SkprpolyTable from variables
also add equality operator
2019-12-19 09:26:57 +01:00
Arne Morten Kvarving
d7acc1ee0f allow constructing PlymwinjTables from variables
also add equality operator
2019-12-19 09:26:57 +01:00
Arne Morten Kvarving
6ccdaaa635 allow constructing PolyInjTables from variables
also add equality operator
2019-12-19 09:24:34 +01:00
Bård Skaflestad
ceb4b1e287 Merge pull request #1354 from stefoss23/add_some_keywords
Adding some keywords
2019-12-18 22:19:14 +01:00
Bård Skaflestad
0b4b3cf22b Merge pull request #1355 from joakim-hove/switch-warning
Add default: clause in switch
2019-12-18 20:37:34 +01:00
Arne Morten Kvarving
87ca5e6f58 Merge pull request #1356 from akva2/noecl_flush
Another round of serialization preparation
2019-12-18 16:56:09 +01:00
Arne Morten Kvarving
2ae7921fcb add equality operator to WATDENTRecord 2019-12-18 14:27:02 +01:00
Arne Morten Kvarving
49b8bff030 add equality operator to VISCREFRecord 2019-12-18 14:27:02 +01:00
Arne Morten Kvarving
b0ab7fdf8d add equality operator to DENSITYRecord 2019-12-18 14:27:02 +01:00
Arne Morten Kvarving
d992bfc1e0 add equality operator to PVCDORecord 2019-12-18 14:25:51 +01:00
Arne Morten Kvarving
98a332fc5f allow constructing FlatTable from vector 2019-12-18 14:25:08 +01:00
Joakim Hove
6a03d72a4e Add default: clause in switch 2019-12-18 14:24:21 +01:00
Arne Morten Kvarving
59235b5a11 add equality operator to PVTWRecord 2019-12-18 14:24:17 +01:00
Arne Morten Kvarving
39ab36819e allow constructing JFunc from variables
also add equality operator
2019-12-18 14:23:11 +01:00
Arne Morten Kvarving
73be14b7b8 Merge pull request #1353 from akva2/noecl_flush
Next round of serialization preparation
2019-12-18 14:16:44 +01:00
Atgeirr Flø Rasmussen
7c77d9e2a7 Merge pull request #1351 from joakim-hove/weltarg-unit-conversio
Temporarily bypass the unit conversion in handleWELTARG
2019-12-18 13:56:02 +01:00
Joakim Hove
a89063e6a4 Merge pull request #1346 from stefoss23/dynamicr
DYNAMICR
2019-12-18 13:50:21 +01:00
Jostein Alvestad
b519d825f2 corrections to test_msim_ACTIONX and SCON[40] 2019-12-18 13:27:34 +01:00
Steinar Foss
429a5be890 added keywords ACTIONS, AMALGAM, APILIM, APIVD, AQUALIST, AQUCHGAS, AQUCHWAT, BDENSITY, BGGI, BOGI.
added keywords AMALGAM, APILIM, APIVD.

added keyword AQUALIST.

added keywords AQUCHGAS, AQUCHWAT, BDENSITY.

added keywords BGGI, BOGI.

altered list of 'special' keywords.
2019-12-18 12:46:09 +01:00
Steinar Foss
01b62e4617 added keyword DYNAMICR.
added keyword DYNAMICR.
2019-12-18 09:34:40 +01:00
Arne Morten Kvarving
07a782d9c0 allow constructing Pvt(g|o|x)Tables from variables
also add equality operator
2019-12-18 09:18:29 +01:00
Arne Morten Kvarving
9ff8cb9f15 allow constructing Runspec from variables
also add equality operator
2019-12-18 09:18:29 +01:00
Arne Morten Kvarving
33e14dd3cf allow constructing Actdims from variables
also add equality operator
2019-12-18 09:17:12 +01:00
Arne Morten Kvarving
dc1168edb4 allow constructing EclHysterConfig from variables
also add equality operator
2019-12-18 09:17:12 +01:00
Arne Morten Kvarving
d5384aa659 allow constructing UDQParams from variables
also add equality operator
2019-12-18 09:17:12 +01:00
Arne Morten Kvarving
14c67975cb allow constructing WellSegmentDims from variables
also add equality operator
2019-12-18 09:14:45 +01:00
Arne Morten Kvarving
7c4b63c4bd allow constructing Welldims from variables
also add equality operator
2019-12-18 09:14:45 +01:00
Arne Morten Kvarving
3f1aa7f4df allow constructing EndpointScaling from variables
also add accessors and equality operator
2019-12-18 09:14:45 +01:00
Markus Blatt
43116d3c45 Merge pull request #1352 from akva2/noecl_flush
Next round of serialization preparation
2019-12-18 08:11:23 +01:00
Joakim Hove
3a87395419 Merge pull request #1348 from joakim-hove/udq-parse-diff
UDQ parse A - B - C
2019-12-17 18:55:06 +01:00
Joakim Hove
46f6aaec02 Merge pull request #1338 from stefoss23/double_records
Can parse keywords of type double-record.
2019-12-17 17:09:11 +01:00
Joakim Hove
89ab99e6b9 UDQ: fix bug with parsing of expressions like A - B - C - D
- In the case of several tokens separated with +/- the final tree is assembled
   from left, was previously from the right. This fixes evaluation bug with
   expressions like A - B - C which were eventually evaluated as A - (B - C).

 - Improved handling of different types; both transiton from scalar to sets of
   wells and groups, and also groups in general. In particular you can now
   assign to a group variable:

        DEFINE GUXXX  WOPR * 0.25

 - Actually hook up the evaluation of group variables from the Summary code.
2019-12-17 16:59:06 +01:00
Arne Morten Kvarving
582e08692b allow constructing Tabdims from variables
also add equality operator
2019-12-17 16:36:42 +01:00
Arne Morten Kvarving
6069867b32 allow constructing Phases from variables
also add accessors and equality operator
2019-12-17 16:36:42 +01:00
Arne Morten Kvarving
95680c70c3 allow constructing IOConfig from variables
also add accessors and equality operator
2019-12-17 16:36:06 +01:00
Jostein Alvestad
1e0a43c4f8 corrections to unit tests 2019-12-17 16:34:45 +01:00
Arne Morten Kvarving
9825e25740 allow constructing RestartConfig from tables
also add accessors and equality operator
2019-12-17 16:34:24 +01:00
Arne Morten Kvarving
6ee97a3f9a allow constructing DynamicState from tables
also add accessor and equality operator
2019-12-17 16:34:24 +01:00
Arne Morten Kvarving
6378d55fa9 allow constructing TimeMap from tables
also add accessors and equality operators
2019-12-17 16:33:46 +01:00
Arne Morten Kvarving
d78319222f Merge pull request #1349 from akva2/noecl_flush
Another round of serialization preparation
2019-12-17 15:45:39 +01:00
Joakim Hove
8573c947fa Temporarily bypass the unit conversion in handleWELTARG 2019-12-17 15:28:08 +01:00
Atgeirr Flø Rasmussen
6c1c6e2c13 Merge pull request #1350 from akva2/janitoring
add a default to quell unhandled value in switch warning
2019-12-17 13:40:13 +01:00
Arne Morten Kvarving
b7be32fadc allow constructing SimulationConfig from tables
also equality operator
2019-12-17 12:46:27 +01:00
Arne Morten Kvarving
b4066d40f5 allow constructing InitConfig from tables
also add accessors and equality operator
2019-12-17 12:46:27 +01:00
Arne Morten Kvarving
d13b9a0a15 allow constructing FoamConfig from tables
also add accessors and equality operator
2019-12-17 12:46:27 +01:00
Jostein Alvestad
3fa8c25b47 remove debug print 2019-12-17 12:30:50 +01:00
Jostein Alvestad
cf82a90815 Add changes for WHISTCTL data in ECL restart 2019-12-17 12:30:48 +01:00
Jostein Alvestad
ae47d39a1a further corrections 2019-12-17 12:30:47 +01:00
Jostein Alvestad
0c9a2cbbf6 initial changes to test output of UDQ and ACTIONX data to ecl-restart
change to avoid zero-size windows in Actionx

changes to improve Restart output content

change to correct IUDQ for DEFINE

corrections to IACN and SACN

initial changes to add item to ZWEL

further changes to add Action to well

further changes to allow for action name in ZWEL

more changes

further changes to output action name to ZWEL

changes to test/debug Restart write

turn on writing of ZWEL again

First running version of udq-actionx-rst

use Action::Result direkte

first working! version

some corrections

changes to allow for output of SACN [4.6.8]

added debug print

changes to improve IACN and IACT

further corrections to Actionx IACN pluss error messages

changes to adapt to well2 converted to well class

further changes to enable restart with group control

changes to adapt to newly merged code in master

changes to include Intehead [51] - group control

test

changes to iGrp[nwgmax +7]

initial changes for GUIDERATE

changes to add guiderate parameters to the restart file

add comment

correction to guiderate - test if exist

correction to DoubHead - test if GR exist

correction to ISEG[8]

correction for eclipse version Restart-file

Cosmetic change

corrections to igrp

correction to segment type in iseg
2019-12-17 12:30:40 +01:00
Arne Morten Kvarving
a63bde6bba add a default to quell unhandled value in switch warning 2019-12-17 11:57:08 +01:00
Joakim Hove
132665e469 Merge pull request #1270 from bska/restart-wsegvalv
Add Restart File Support for WSEGVALV Devices
2019-12-17 11:29:37 +01:00
Arne Morten Kvarving
b56cef3103 allow constructing FoamData from doubles
also add accessors and equality operator
2019-12-17 11:04:12 +01:00
Arne Morten Kvarving
0741f4c099 allow constructing Equil from tables
also add accessors and equality operator
2019-12-17 10:31:23 +01:00
Arne Morten Kvarving
d532f861ac add equality operator and a default constructor to EquilRecord 2019-12-17 10:31:23 +01:00
Arne Morten Kvarving
850c91f047 add accessors to TableContainer
also add equality operator and default constructor
2019-12-17 10:26:42 +01:00
Arne Morten Kvarving
baef4f00fa allow constructing SimpleTable from tables
also add accessors and equality operator
2019-12-17 10:25:12 +01:00
Arne Morten Kvarving
3b49c8a63c allow constructing TableColumn from tables
also add accessors and equality operator
2019-12-17 10:25:12 +01:00
Bård Skaflestad
ebfa768fd2 Segment: Make Type Predicates Free Functions
That way, we won't have to pollute the Segment API when adding new
segment types.  While here, also reduce header file coupling by
forward-declaring SpiralICD and Valve in Segment.hpp.
2019-12-17 09:14:17 +01:00
Bård Skaflestad
21de27a1cb Output Valve Characteristics to Restart File
This commit identifies well segments that correspond to valves
(input keyword WSEGVALV) and captures those in the ISEG vector.
Furthermore, we output characteristic properties of such valve
segments (e.g, the valve length, the base strength, and
cross-sectional area) in the RSEG vector.
2019-12-17 09:14:17 +01:00
Bård Skaflestad
40e0f83b7b Segment: Add Means of Identifing Valve Devices
This commit adds a simple predicate, Segment::isValve(), that lets
client code query whether or not a particular segment represents a
valve--created through the WSEGVALV keyword.

If so, the client can also request the valve itself to inspect the
pertinent valve properties.
2019-12-17 09:14:17 +01:00
Atgeirr Flø Rasmussen
64fd78694e Merge pull request #1347 from akva2/janitoring
Some janitoring
2019-12-17 08:44:04 +01:00
Arne Morten Kvarving
77cadac586 anonymize unused parameters 2019-12-16 16:14:28 +01:00
Arne Morten Kvarving
c57466aa70 remove unused function 2019-12-16 16:14:21 +01:00
Arne Morten Kvarving
6237cdeba6 Merge pull request #1344 from akva2/noecl_flush
Preparation for serialization support
2019-12-16 16:01:15 +01:00
Bård Skaflestad
61c698b9c2 Merge pull request #1345 from stefoss23/fix_writeinit
WriteInit.cpp fix
2019-12-16 15:04:06 +01:00
Steinar Foss
c0410143c2 writeinit_fix. 2019-12-16 15:01:09 +01:00
Arne Morten Kvarving
c94dbd4fcd allow constructing TableSchema from tables
also add accessor and equality operator
2019-12-16 14:44:36 +01:00
Arne Morten Kvarving
5237dad89a allow constructing OrderedMap from tables
also make typedefs public, add accessors and equality operator
2019-12-16 14:44:36 +01:00
Arne Morten Kvarving
b357e211a5 add accessors to ColumnSchema
also add equality operator and a default constructor
2019-12-16 14:38:56 +01:00
Arne Morten Kvarving
b66bc61b51 added: allow constructing Rock2dtrTables from vectors
also add accessors
2019-12-16 14:34:40 +01:00
Arne Morten Kvarving
9877e237b1 added: allow constructing Rock2dTables from vectors
also add accessors
2019-12-16 14:31:53 +01:00
Arne Morten Kvarving
2ec73f479e added: allow construction (EDIT)NNC from a vector 2019-12-16 14:29:01 +01:00
Arne Morten Kvarving
cf29bd0933 allow construction ThresholdPressure from tables
add some convenience type aliases and const accessors to data

this is used to reconstruct the class in parallel simulations
2019-12-16 14:27:56 +01:00
Steinar Foss
77cc47d6f8 added keywords GCUTBACT, GECONT, MPFNNC. 2019-12-16 13:53:24 +01:00
Steinar Foss
0be84e6529 DeckKeyword: double_record style keywords has empty records as block seperators. 2019-12-16 13:11:20 +01:00
Joakim Hove
acd57b2d0a Merge pull request #1236 from joakim-hove/writeinit-fp
Writeinit fp
2019-12-16 13:08:54 +01:00
Joakim Hove
1f9378ca7a Merge pull request #1342 from joakim-hove/fieldprops-manager-active-size
Add active_size() method to FieldPropsManager
2019-12-16 12:12:10 +01:00
Joakim Hove
d2da9fd534 Fixed: wrong satfunc endpoints 2019-12-16 12:11:06 +01:00
Joakim Hove
6c46e50142 Add special case *SWL* subtraction to *SOGCR* keywords 2019-12-16 12:11:06 +01:00
Joakim Hove
6b71e30a38 Add test for SOGCR keyword 2019-12-16 12:11:06 +01:00
Joakim Hove
26644b1e9f Temporary: allow keyword reordering errors INIT file regression test 2019-12-16 12:11:06 +01:00
Joakim Hove
819f30eabc Rewrite writeInit to use FieldPropsManager 2019-12-16 12:11:06 +01:00
Joakim Hove
db47314fb4 Merge pull request #1317 from joakim-hove/enable-3d-props
Enable 3D props testing in opm-simulators and opm-grid
2019-12-16 12:10:48 +01:00
Joakim Hove
617bb07b0b Add active_size() method to FieldPropsManager 2019-12-16 09:42:40 +01:00
Atgeirr Flø Rasmussen
bff545696a Merge pull request #1325 from joakim-hove/grid-mem
Grid mem
2019-12-16 09:38:21 +01:00
Joakim Hove
1e221e478c Merge pull request #1341 from joakim-hove/fp-thermal
Add support for keywords THxxxx in FieldProps
2019-12-16 09:05:58 +01:00
Joakim Hove
2abbc474a4 Add support for keywords THxxxx in FieldProps 2019-12-16 08:23:44 +01:00
Joakim Hove
283ead605c Merge pull request #1339 from bska/track-ctf-origin
Add Means of Tracking Origin of Connection's CTF
2019-12-16 07:30:31 +01:00
Bård Skaflestad
50181c279d Add Means of Tracking Origin of Connection's CTF
This commit adds a new type (Connection::CTFKind), and new data
member of this type (Connection::m_ctfkin, initialised in the
constructor) that tracks the source of the connection's
transmissibility factor (Connection::m_CF).  The primary user of
this information is the restart file writing code which needs to
know if the connection transmissbility factor is assigned from the
input file (e.g., directly from the COMPDAT keyword) or if the value
is calculated from other information.

Add a convenience predicate function,

    Connection::ctfAssignedFromInput

that returns true if the connection transmissibility factor source
indeed is a direct assignment in the COMPDAT keyword.

Update Connection constructor callers accordingly.
2019-12-15 22:43:35 +01:00
Joakim Hove
040c310b48 Merge pull request #1340 from joakim-hove/fp-rtemp
Add RTEMPVD based initialization of the TEMPI keyword
2019-12-15 21:15:51 +01:00
Joakim Hove
a56e4daac7 Add RTEMPVD based initialization of the TEMPI keyword 2019-12-15 19:29:43 +01:00
Steinar Foss
87bbc46bbb can parse keywords of type double-record.
...

ParserKeyword: bool double_records set.

added keywords CECONT.

ParserKeywords: double_records set by keyword generator.

Parsertests: added test for parsing double_records.

ParserKeywords.parse: if double_records returns empty.

double_records keywords set to SLASH_TERMINATED.

...

ParserKeyword: for double records size_type = DOUBLE_SLASH_TERMINATED.

double_records: RawKeyword is Raw::DOUBLE_SLASH_TERMINATED.

RawKeyword uses m_isTempFinished.

Parser: can parse files with double-record keywords.

Parser.cpp/RawRecord.cpp: removed comments.

DeckKeyword has param m_isDoubleRecordKeyword.

test ParseDoubleRecords: double records to have linear structure.

DeckKeyword: Can create records of type double_record.

double-records parser test transferred to ParserTests.cpp.

...

...
2019-12-14 18:42:31 +01:00
Joakim Hove
a62d9df61f Merge pull request #1335 from akva2/remove_unused_member
remove unused member parser_keyword from DeckKeyword
2019-12-14 14:51:36 +01:00
Joakim Hove
8ab1d2b894 Enable 3D props testing in opm-simulators and opm-grid 2019-12-14 12:50:30 +01:00
Joakim Hove
c26f1655c8 Merge pull request #1330 from joakim-hove/udq-well
Udq well
2019-12-14 00:19:25 +01:00
Joakim Hove
af1b140723 Some improvements to runtime type conversion when evaluating UDQ 2019-12-13 23:17:07 +01:00
Joakim Hove
a595e68608 EclipseGrid: calculate cell dimensions and center on demand 2019-12-13 16:03:00 +01:00
Joakim Hove
643c775d4d EclipseGrid: calculate cell thickness on demand 2019-12-13 16:03:00 +01:00
Joakim Hove
f1d937205f EclipseGrid: calculate cell depth on demand 2019-12-13 16:03:00 +01:00
Joakim Hove
e3e11019dd EclipseGrid: calculate volume on demand 2019-12-13 16:03:00 +01:00
Joakim Hove
3541aa1601 EclipseGrid: Add getCellCorners( ) overload 2019-12-13 16:03:00 +01:00
Joakim Hove
60e6144f7f Remove unused member from EclipseGrid 2019-12-13 16:03:00 +01:00
Joakim Hove
fdd159cc75 Altered comment for group sets 2019-12-13 15:41:51 +01:00
Joakim Hove
56997e7d5c Replace compatibleTypes with static and runtime checks 2019-12-13 15:41:21 +01:00
Joakim Hove
b4fd949ca8 Change exception + test 2019-12-13 15:39:34 +01:00
Joakim Hove
11bf449281 Add method UDQSet::wgnames() 2019-12-13 15:33:42 +01:00
Joakim Hove
d520cfa8db Improved error message 2019-12-13 14:54:58 +01:00
Joakim Hove
964fba4ffb Merge pull request #1326 from stefoss23/add_alternating_keywords
Add alternating keywords
2019-12-13 09:40:26 +01:00
Joakim Hove
43b67e687f Merge pull request #1337 from bska/prune-duplicate-updateconnections
COMPDAT: Prune Duplicate 'updateConnctions' Call
2019-12-12 20:31:36 +01:00
Bård Skaflestad
063bc73a40 COMPDAT: Prune Duplicate 'updateConnctions' Call
Possibly introduced in an earlier rebase operation.
2019-12-12 18:33:31 +01:00
Arne Morten Kvarving
c68ab70eec remove unused member parser_keyword from DeckKeyword 2019-12-12 16:02:13 +01:00
Joakim Hove
7a648cae7f Merge pull request #1329 from akva2/fix_comparison
fixed: wrong things compared in equality operator
2019-12-12 12:28:39 +01:00
Joakim Hove
59e9b92486 Merge pull request #1332 from akva2/janitoring
fix initialization list order
2019-12-12 12:28:25 +01:00
Joakim Hove
9c54371c2c Merge pull request #1331 from akva2/remove_unused_member
remove unused member from UDQActive::InputRecord
2019-12-12 11:40:26 +01:00
Joakim Hove
f544fb2883 Merge pull request #1333 from joakim-hove/gconprod-rates
Add GuideRate properties to GroupProduction::operator==
2019-12-12 11:37:37 +01:00
Joakim Hove
9abbcfb6fa Add GuideRate properties to GroupProduction::operator== 2019-12-12 11:17:46 +01:00
Arne Morten Kvarving
715d368d94 fix initialization list order 2019-12-12 10:59:59 +01:00
Arne Morten Kvarving
b8f7f61851 remove unused member from UDQActive::InputRecord 2019-12-12 10:56:48 +01:00
Atgeirr Flø Rasmussen
c343651f44 Merge pull request #1257 from GitPaean/support_wsegvalv
Support wsegvalv
2019-12-11 21:07:11 +01:00
Joakim Hove
dbf276b2db Merge pull request #1328 from joakim-hove/fp-temp-test
Add some extra testing of FieldPropsManager::get_copy
2019-12-11 15:23:45 +01:00
Joakim Hove
537120049f Merge pull request #1327 from joakim-hove/test-fixup
Add missing #ifdef
2019-12-11 14:47:07 +01:00
Kai Bao
aff2baf9f2 adding test for WSEGVALV 2019-12-11 14:38:43 +01:00
Arne Morten Kvarving
d64edfbe09 fixed: wrong things compared in equality operator 2019-12-11 13:48:58 +01:00
Joakim Hove
05b93e7ea1 Add #ifdef for ENABLE_3D_TESTING 2019-12-11 13:20:04 +01:00
Joakim Hove
20c9b0b1e5 Add some extra testing of FieldPropsManager::get_copy 2019-12-11 13:02:27 +01:00
Kai Bao
6be5e104b0 addressing the reviewing comments from PR#1257 2019-12-11 13:00:34 +01:00
Kai Bao
46bcd7a499 adding a few segment summary keywords to SEGMENT_PROBE
to it can run the WSEGVALV case in opm-tests without modifying the deck.
2019-12-11 13:00:34 +01:00
Kai Bao
80159c4374 adding support for WSEGVALV 2019-12-11 13:00:34 +01:00
Joakim Hove
20cd54b939 Merge pull request #1324 from joakim-hove/fp-get-temp
Add FieldPropsManager::get_copy() which does not add to container
2019-12-11 12:24:29 +01:00
Joakim Hove
68fe71baf0 Merge pull request #1321 from joakim-hove/fi-memory
Add small struct to report memory usage from FieldPropsManager
2019-12-11 12:23:58 +01:00
Joakim Hove
dd26d9b83f Merge pull request #1323 from joakim-hove/allow-region-too-large
THPRES: Warning if region values exceed max(EQLNUM)
2019-12-11 12:23:20 +01:00
Joakim Hove
81cdfd46e3 Merge pull request #1318 from joakim-hove/fp-operate
Fp operate
2019-12-11 12:22:53 +01:00
Steinar Foss
e875d9b7d4 added keywords STOW, STWG. 2019-12-11 11:31:55 +01:00
Steinar Foss
2a90e9a154 added keywords PVTWSALT, PZVG. 2019-12-11 11:18:30 +01:00
Markus Blatt
44ffa6e871 Merge pull request #1319 from blattms/active-cells-utility
Use minimal information when filtering connections
2019-12-11 09:02:27 +01:00
Joakim Hove
6d7b621fb8 Add FieldPropsManager::get_copy() which does not add to container 2019-12-11 08:02:10 +01:00
Joakim Hove
be64447cee Add small struct to report memory usage from FieldPropsManager 2019-12-10 22:10:19 +01:00
Joakim Hove
68dd1e9de8 THPRES: Warning if region values exceed max(EQLNUM) 2019-12-10 21:56:28 +01:00
Bård Skaflestad
dc5b6e4465 Merge pull request #1272 from bska/restart-wsegsicd
Add Restart File Support for Spiral Inflow-Control Devices
2019-12-10 16:30:04 +01:00
Bård Skaflestad
5629098503 Output SICD Characteristics to Restart File
This commit identifies well segments that correspond to SICDs
(input keyword WSEGSICD) and captures those in the ISEG vector.
Furthermore, we output characteristic properties of such SICD
segments (e.g, the length, the base strength, calibration fluid
properties) in the RSEG vector.
2019-12-10 15:15:10 +01:00
Bård Skaflestad
953abdc496 Segment: Add Means of Identifying SICDs
This commit adds a simple predicate, Segment::isSpiralICD(), that
lets client code query whether or not a particular segment
represents a spiral ICD.  These are created through the WSEGSICD
input keyword.
2019-12-10 14:27:03 +01:00
Joakim Hove
2fb0cd599b PORV is treated more as a regular keyword 2019-12-10 14:06:14 +01:00
Joakim Hove
a9cfa083b6 Merge pull request #1320 from akva2/fix_accessor_type
Fix accessor type
2019-12-10 13:50:40 +01:00
Markus Blatt
a1471c80b5 Use ActiveGridCells when filtering connections. 2019-12-10 13:49:04 +01:00
Markus Blatt
36e1ef69ef Added utility for querying (only) active cells.
This will relieve us from building up a full EclipseGrid
just for filtering well connections.
2019-12-10 13:49:04 +01:00
Arne Morten Kvarving
3b66c03d31 fixed: this should be an int, not a double 2019-12-10 11:56:18 +01:00
Joakim Hove
0f609083c3 Add support for OPERATE in FieldProps 2019-12-10 11:43:05 +01:00
Joakim Hove
c9111d3785 Change testdata to be compliant with section requirements 2019-12-10 11:43:05 +01:00
Joakim Hove
9f09cbe14a Merge pull request #1315 from joakim-hove/fp-reset-actnum
Fp reset actnum
2019-12-09 07:26:21 +01:00
Joakim Hove
e96f49c5f9 Implement FieldProps::reset_actnum() instead of reset_grid() 2019-12-08 23:37:51 +01:00
Joakim Hove
377727c470 Merge pull request #1314 from joakim-hove/satfunc-depth-init
Satfunc initializers get cell_depth instead of grid argument
2019-12-08 23:33:51 +01:00
Joakim Hove
d57e67a06b Merge pull request #1316 from joakim-hove/warning
Quell warning
2019-12-08 23:33:30 +01:00
Joakim Hove
04aead1f27 Remove shadow warning in ParserKeyword::parseRecords( ) 2019-12-08 15:43:36 +01:00
Joakim Hove
8b881a2cb1 Use default: in switch statement 2019-12-08 15:40:47 +01:00
Joakim Hove
63bf6b26c7 Satfunc initializers get cell_depth instead of grid argument 2019-12-08 15:09:55 +01:00
Joakim Hove
bbee8606bf Merge pull request #1313 from joakim-hove/aquifetp-minor
Some whitespace cleanup and remove unused includes in Aquifetp
2019-12-08 14:42:24 +01:00
Joakim Hove
bbbe2c88ef Some whitespace cleanup and remove unused includes in Aquifetp 2019-12-08 14:05:07 +01:00
Joakim Hove
8c6755d0f8 Merge pull request #1308 from stefoss23/parserkeyword_alternating_records
introducing keywords using alternating records.
2019-12-08 13:39:58 +01:00
Steinar Foss
52d69ca167 alernating records: not limited to 2 records. 2019-12-08 05:03:07 +01:00
Joakim Hove
709373086d Merge pull request #1311 from joakim-hove/fp-tran
Add default init for TRAN keywords + dimension
2019-12-07 15:40:03 +01:00
Joakim Hove
fa939f585f Add default init for TRAN keywords + dimension 2019-12-07 15:07:22 +01:00
Joakim Hove
eb9856f9e2 Merge pull request #1310 from joakim-hove/fp-late-get-satfunc
Add autocreation of saturation functions from get<T>(keyword)
2019-12-07 15:01:37 +01:00
Joakim Hove
b7f8d72bbe Add autocreation of saturation functions from get<T>(keyword) 2019-12-07 13:37:58 +01:00
Steinar Foss
6ee678048e alternating_keyword may repeat over more than 2 records. 2019-12-07 13:31:17 +01:00
Bård Skaflestad
c9b277446a Merge pull request #1309 from akva2/janitoring
Janitoring
2019-12-07 01:25:08 +01:00
Arne Morten Kvarving
606c4146c1 remove unused functions 2019-12-06 22:24:27 +01:00
Arne Morten Kvarving
88516218e7 fix initializer list order 2019-12-06 22:24:25 +01:00
Bård Skaflestad
0cc6ab250c Merge pull request #1307 from bska/sicd-strength-unit
Add Dedicated Units of Measurement for SICD Strength Parameter
2019-12-06 17:01:13 +01:00
Steinar Foss
8f8d45532e introducing keywords using alternating records.
added function parseRecords.

introducing alternating keywords.

parserkw: added member isAlternatingKeyword.

kw alternating_records conditions.

...

added keyword STOG.

alternating keyword: created generatortest.

alternating keyword sets bool to true by codegenerator.

alternating_records_kw returns that.

...
2019-12-06 15:51:42 +01:00
Bård Skaflestad
bce49165ba WSEGSICD: Use New 'GeometricVolume' Parser Dimension
Slightly simplifies specifying the unit of measure for the strength
parameter.
2019-12-06 14:32:07 +01:00
Bård Skaflestad
3f2b143b30 Unit System: Add New ICD-Related Units
This commit introduces a couple of new units of measure for
ICD-related quantities, especially AICD and SICD strength
parameters.  Add base unit "GeomVolume" ([Length]**3) and 'measure'
entities

    geometric_volume      (= GeomVolume)
    geometric_volume_rate (= GeomVolume / Time)
    icd_strength          (= Pressure / (GeomVolume / Time)**2)

Add conversion factor unit tests for these, and also complete the
set of unit tests for FIELD, LAB, and PVT_M to cover measures that
were not already there.

Also add a parser Dimension ("GeometricVolume") to play the role of
[Length]**3 in .json files.
2019-12-06 14:32:07 +01:00
Bård Skaflestad
8fe4691639 addDimension(): Don't Risk Reading from Moved-From Object
We don't control which side of the assignment is evaluated first, so
get a copy of the name and use that for indexing purposes.
2019-12-06 14:32:07 +01:00
Joakim Hove
273c512c2a Merge pull request #1306 from joakim-hove/fp-global-porv
Add optional global flag to FieldPropsManager::porv()
2019-12-06 14:22:06 +01:00
Joakim Hove
f4882522cb Add optional global flag to FieldPropsManager::porv() 2019-12-06 08:47:08 +01:00
Joakim Hove
1534570b3d Merge pull request #1305 from joakim-hove/allow-init-reorder
Regression testing: Detect reordering of keywords in the INIT file
2019-12-05 17:12:20 +01:00
Joakim Hove
dda295f23f Merge pull request #1221 from joakim-hove/fp-fluid
Fp fluid
2019-12-05 16:37:23 +01:00
Joakim Hove
fc6f77e50a Merge pull request #1207 from stefoss23/parse_pyinput
Parse PYINPUT
2019-12-05 15:17:01 +01:00
Joakim Hove
d990932d0c Special case reordering of keywords in the INIT file regression test 2019-12-05 14:25:14 +01:00
Joakim Hove
26773359a4 compareECL: Set throwOnError to false together with analysis=true 2019-12-05 14:25:14 +01:00
Steinar Foss
04895d3728 Python.cpp using macro for conditional Python instance. 2019-12-05 13:02:57 +01:00
Atgeirr Flø Rasmussen
3645151309 Merge pull request #1251 from GitPaean/support_wsegsicd_rebase
Support WSEGSICD rebase
2019-12-05 12:43:32 +01:00
Kai Bao
254cee34bd addingress reviewing comments for PR#1251 2019-12-05 11:48:59 +01:00
Kai Bao
973fe9823b adapting and fix the code after rebasing for WSEGSICD 2019-12-05 11:48:59 +01:00
Kai Bao
fea4c4c8fa adding support for WSEGSICD 2019-12-05 11:48:59 +01:00
Joakim Hove
1c29829dae Merge pull request #1238 from joakim-hove/enable-3d-testing-jenkins
Enable 3D property testing in opm-material on jenkins
2019-12-05 10:53:16 +01:00
Joakim Hove
27da0024af Merge pull request #1288 from joakim-hove/flowing
Determine that wells are flowing from nonzero rates
2019-12-05 10:09:39 +01:00
Steinar Foss
d348f170f2 PYBIND11_EMBEDDED_MODULE replaced by OPM_EMBEDDED_MODULE.
python.cpp: PythonInterp created within contr. brackets.

PYBIND11_EMBEDDED_MODULE commented out.

opm_python: added file Embed.hpp.

introduced macro OPM_EMBEDDED_MODULE.

added opm_embedded_module.

using opm_embedded_module.

opm_embedded_module: commented out PyInstance check.

added namespace Opm::embed.

Embed.hpp -> EmbedModule.hpp.

Python.cpp: added exception if PyIsinstance.

parserstate: python is a unique_ptr.

Parser.cpp: exception if no Opm::python obj.
2019-12-05 09:19:43 +01:00
Steinar Foss
f3701c3f93 Parser: handles PYINPUT. Python code in eclipse .Data files now possible!!!
test EmbeddedPython: now with actual python code.

parser.cpp: parsing python code.

introduced RawConst::pyinput.

EmbeddedPython: tests with data keyword.
2019-12-05 09:19:43 +01:00
Steinar Foss
277ec850a7 PYINPUT: name -> PYINPUT. 2019-12-05 09:19:43 +01:00
Joakim Hove
ee2850e8cc Merge pull request #1304 from joakim-hove/satfunc-refactor
Reorganize satfunc initializers
2019-12-05 08:57:54 +01:00
Joakim Hove
4d3567bffd Initialize saturation functions in FieldProps 2019-12-05 08:49:47 +01:00
Joakim Hove
b3c14b1d12 Merge pull request #1250 from stefoss23/action_token_func
added enum class FuncType for ASTNode.
2019-12-05 08:18:08 +01:00
Joakim Hove
18f5e1a9b9 Reorganize satfunc initializers 2019-12-05 08:08:55 +01:00
Joakim Hove
04234ec625 Merge pull request #1301 from joakim-hove/deck-diff-default
Differentiate between valid and invalid default values while parsing
2019-12-05 08:04:22 +01:00
Bård Skaflestad
58eac1c338 Merge pull request #1277 from bska/load-aquifer-data
Load Restart: Support Basic Quantities from Analytic Aquifers
2019-12-04 22:55:18 +01:00
Joakim Hove
08dd12f644 Merge pull request #1300 from totto82/fixGconsumpSale
FIX avoid double conversion
2019-12-04 22:40:17 +01:00
Joakim Hove
1599cc5698 Differentiate between valid and invalid default values while parsing 2019-12-04 22:36:28 +01:00
Steinar Foss
3d37551ef9 checks for FuncType::time. 2019-12-04 21:10:11 +01:00
Bård Skaflestad
25931145e0 Aquifer Restart: Load Values Pertinent to Fetkovich Model
This commit expands the basic aquifer restart support to also
include essential values for the Fetkovich analtic model.  In
particular, we now also load the initial aquifer pressure and the
initial aquifer volume directly from the SAAQ restart vector, but
only if we know that the aquifer in question is of Fetkovich type.
2019-12-04 19:57:14 +01:00
Steinar Foss
4ae8b4a5fe Removes FuncType in ParserNode.
removed FuncType from ParserNode.
2019-12-04 18:13:44 +01:00
Bård Skaflestad
7b3de57e92 Load Restart: Support Basic Quantities from Analytic Aquifers
This adds a basic protocol for retrieving simple scalar data for
each analytic aquifer, specifically from XAAQ.  At the moment we
only support retrieving the aquifer pressure and the total produced
liquid volume from the aquifer and into the reservoir model.
2019-12-04 17:43:27 +01:00
Joakim Hove
3deef64d19 Use numerical flow rates to determine Well::flowing() 2019-12-04 17:15:30 +01:00
Joakim Hove
e0e371291d Merge pull request #1297 from joakim-hove/dont-write-ACTNUM
Make sure the ACTNUM field is not output to the INIT file
2019-12-04 17:06:42 +01:00
Steinar Foss
dc0ab8a8ad Action::Parser:get_func: returns multiple types. 2019-12-04 16:24:58 +01:00
Steinar Foss
4b5ef93293 added enum class FuncType for ASTNode.
ActionParserNode takes functype arg.

ActionParser getfunc.

ASTNode constr take func_type-arg.

ASTNode: throws exception if not FunctionType well.

FuncType: expanded list.

ActionParser: gettype distnguishes types.

ACTIONX.cpp: added test with group*.

parseKeywordCategory made public.

ActionParser: uses parseCategory.
2019-12-04 16:24:58 +01:00
Tor Harald Sandve
996f844ac7 FIX avoid double conversion 2019-12-04 12:02:28 +01:00
Joakim Hove
206e0b3b25 Merge pull request #1299 from joakim-hove/transmult-fp
Use std::vector<double> instead of GridProperty<double> in TransMult
2019-12-04 10:22:32 +01:00
Joakim Hove
7dc0e52e2d Merge pull request #1296 from joakim-hove/fp-keys-special
Special case ACTNUM and PORV in the FieldProps keys() method
2019-12-04 10:21:59 +01:00
Joakim Hove
34d4514164 Enable FieldProps for EclipseState::initTransMult() 2019-12-04 07:39:04 +01:00
Joakim Hove
bb314f13ae Use std::vector<double> instead of GridProperty<double> in TransMult 2019-12-03 20:24:11 +01:00
Joakim Hove
159412bba6 Make sure the ACTNUM field is not output to the INIT file 2019-12-03 17:34:15 +01:00
Joakim Hove
87ddebd192 Special case ACTNUM and PORV in the FieldProps keys() method 2019-12-03 17:21:28 +01:00
Joakim Hove
8783d8cf0a Merge pull request #1262 from joakim-hove/fp-porv
Fp porv
2019-12-03 09:49:18 +01:00
Joakim Hove
1090328ee3 Add methods porv() and actnum() to FieldPropsManager 2019-12-03 08:47:23 +01:00
Joakim Hove
019db953d9 Merge pull request #1294 from joakim-hove/remove-microseconds
Remove microseconds from TimeStampUTC add test
2019-12-03 00:55:57 +01:00
Joakim Hove
ba59707672 Remove microseconds from TimeStampUTC add test 2019-12-03 00:36:30 +01:00
Joakim Hove
527f7b39d0 Merge pull request #1293 from joakim-hove/timeservice-plus
Add operator+(double seconds) to TimeStampUTC
2019-12-02 23:18:03 +01:00
Joakim Hove
200f3a55bd Add operator+ to TimeStampUTC 2019-12-02 22:30:00 +01:00
Joakim Hove
5f699679a9 Merge pull request #1287 from joakim-hove/remove-grid
Remove grid member from FieldProps
2019-12-02 14:34:10 +01:00
Joakim Hove
da99852bfd Merge pull request #1292 from joakim-hove/add-PORO
Add PORO to testdata
2019-12-02 14:25:45 +01:00
Joakim Hove
30d6f51faf Merge pull request #1291 from joakim-hove/auto-shut-well
Make sure well is closed if all connections are closed for ACTIONX
2019-12-02 13:57:47 +01:00
Joakim Hove
19c5475715 Add PORO to testdata 2019-12-02 12:06:09 +01:00
Joakim Hove
2193118a5c Make sure well is closed if all connections are closed for ACTIONX 2019-12-02 11:53:16 +01:00
Joakim Hove
0a56331b28 Remove grid member from FieldProps 2019-12-02 11:47:28 +01:00
Joakim Hove
c65796a9a6 Merge pull request #1290 from joakim-hove/fieldprops-default
Add temporary default constructor for FieldPropsManager
2019-12-02 11:44:15 +01:00
Joakim Hove
0824a68783 Add temporary default constructor for FieldPropsManager 2019-12-02 10:46:45 +01:00
Joakim Hove
1bf3ee859f Merge pull request #1285 from joakim-hove/transmult-regions
Transmult regions
2019-12-02 07:24:56 +01:00
Joakim Hove
f5ca256eaf Internalize default region name in MULTREGTScanner 2019-12-02 06:30:58 +01:00
Joakim Hove
f066cea90a Enable FieldPropsManager for TRANSMULT regions 2019-12-02 06:30:58 +01:00
Joakim Hove
434f671391 Cache the region vectors in the MULTREGT scanner 2019-12-02 06:30:58 +01:00
Joakim Hove
9b9ba2c88c Merge pull request #1286 from joakim-hove/fp-default
Fp default
2019-12-02 06:30:42 +01:00
Joakim Hove
b8d3b8a16e Remove FieldPropsManager default constructor 2019-12-01 21:19:02 +01:00
Joakim Hove
296288bce4 Remove FieldProps->tables member 2019-12-01 18:01:01 +01:00
Joakim Hove
c9ac9eaec1 Merge pull request #1284 from joakim-hove/disable-fp
Disable use of FieldPropsManager in MULTREGTScanner
2019-12-01 11:34:40 +01:00
Joakim Hove
7a9409fc08 Disable use of FieldPropsManager in MULTREGTScanner 2019-12-01 09:43:07 +01:00
Joakim Hove
4893f534f7 Merge pull request #1282 from joakim-hove/add-PORO
Add poro
2019-11-30 09:43:10 +01:00
Joakim Hove
c403db8379 Merge pull request #1240 from joakim-hove/transmult-fp
Add FieldPropsManager argument to TransMult constructors
2019-11-30 08:46:43 +01:00
Joakim Hove
bb032c6182 Add PORO to testdata 2019-11-30 08:35:39 +01:00
Joakim Hove
9e3b8a94e8 Add missing "GRID" section in testdata 2019-11-30 08:35:34 +01:00
Joakim Hove
b04cd0b207 Merge pull request #1281 from joakim-hove/report-wellopen-status
Log message when a well status changes from WELOPEN
2019-11-29 19:17:12 +01:00
Joakim Hove
d53d8b4947 Enable testing of FieldPropsManager in transmult classes 2019-11-29 19:12:46 +01:00
Joakim Hove
0514b6bb52 Add FieldPropsManager argument to TransMult constructors 2019-11-29 18:16:20 +01:00
Joakim Hove
cb8cc2c5b2 Remove unused argument 2019-11-29 18:15:35 +01:00
Joakim Hove
61fd4e0c88 FieldProps::default_region() - public property 2019-11-29 18:15:35 +01:00
Joakim Hove
b5f3a94842 Merge pull request #1249 from joakim-hove/wellconnection-fp
Use FieldPropsManager in WellConnection
2019-11-29 18:14:18 +01:00
Joakim Hove
bdea9b4da7 Log message when a well status changes from WELOPEN 2019-11-29 18:11:45 +01:00
Joakim Hove
198b208258 Test use of FieldPropsManager in WellConnections 2019-11-29 16:42:29 +01:00
Joakim Hove
8211007714 Merge pull request #1278 from joakim-hove/add-PORO
Add poro
2019-11-29 12:46:34 +01:00
Joakim Hove
74704f4cc6 Merge pull request #1280 from joakim-hove/lwsltnum
add lwsltnum
2019-11-29 09:32:03 +01:00
Tor Harald Sandve
fddaa46e98 add lwsltnum 2019-11-29 08:42:08 +01:00
Joakim Hove
c3ab4829e0 Merge pull request #1275 from joakim-hove/enable-ROCKNUM
Enable ROCKNUM in FieldProps
2019-11-29 08:38:17 +01:00
Bård Skaflestad
27f1c5b998 Merge pull request #1279 from akva2/fix_xwel
fixed: serialize thp to OPM_XWEL
2019-11-28 23:39:19 +01:00
Arne Morten Kvarving
529a181617 fixed: serialize thp to OPM_XWEL 2019-11-28 23:22:14 +01:00
Joakim Hove
e9b6ac54d9 Add PORO keyword to testdata 2019-11-28 20:06:39 +01:00
Joakim Hove
e5b40870b6 Remove unused testdata 2019-11-28 20:06:39 +01:00
Arne Morten Kvarving
ef9bc3cf3f Merge pull request #1265 from akva2/comparison_operators_output_structures
added: comparison operators for various output structures
2019-11-28 15:19:23 +01:00
Joakim Hove
5cd4814de1 Enable ROCKNUM in FieldProps 2019-11-28 15:14:31 +01:00
Bård Skaflestad
8cd7481d14 Merge pull request #1255 from jalvestad/iseg_0_fix
correction to ISEG[0] in AggregateMSWData.cpp
2019-11-28 14:44:37 +01:00
Joakim Hove
13bdd5e5a0 Merge pull request #1273 from joakim-hove/DEST_PREFIX
Use DEST_PREFIX when installing python code
2019-11-28 13:41:49 +01:00
Arne Morten Kvarving
6600994104 added: comparison operators for various output structures 2019-11-28 13:30:48 +01:00
Joakim Hove
221d6e21f6 Merge pull request #1274 from joakim-hove/disable-rocknum
Disable 3D property testing of ROCKNUM
2019-11-28 11:32:44 +01:00
Joakim Hove
25631acbc9 Disable 3D property testing of ROCKNUM 2019-11-28 11:18:38 +01:00
Jostein Alvestad
4743584d37 removed unused vector tempOrdVect 2019-11-28 09:41:02 +01:00
Jostein Alvestad
1a4bef80b3 correction to ISEG[0] in AggregateMSWData.cpp 2019-11-28 09:41:00 +01:00
Tor Harald Sandve
d4c680ba68 Merge pull request #1258 from totto82/add_sales_PR
Convert UDA in GCONSALE and GCONSUMP
2019-11-28 09:04:28 +01:00
Tor Harald Sandve
7b41397f6f Merge pull request #1252 from totto82/gprodEvent
add group events
2019-11-28 08:23:18 +01:00
Joakim Hove
885093d472 Use DEST_PREFIX when installing python code 2019-11-27 23:46:32 +01:00
Bård Skaflestad
78e8acf21f Merge pull request #1269 from bska/prepare-valve_icd-restart
Prepare Restart File Support for Valves and ICDs
2019-11-27 23:37:31 +01:00
Bård Skaflestad
c333b21c90 Prepare Restart File Support for Valves and ICDs
This commit identifies certain items in restart vectors ISEG and
RSEG that pertain to valves (keyword WSEGVALV) and spiral ICDs
(keyword WSEGSICD).  In particular, we identify segment type flag
and a couple of relevant values for this flag.  Also, relevant
parameters that describe the geometry and pressure drops of these
devices.
2019-11-27 22:12:43 +01:00
Joakim Hove
ba65222caf Merge pull request #1268 from joakim-hove/plyrock-fixup
Fix internal name in PLYROCKM json file
2019-11-27 18:38:12 +01:00
Joakim Hove
11c6d43e22 Merge pull request #1267 from joakim-hove/region-cache-fixup
Bugfix: use correct 3D property container
2019-11-27 17:14:04 +01:00
Joakim Hove
70066df8ee Merge pull request #1266 from akva2/serialize_whole_connection
added: serialize the whole connection struct to OPM_XWEL
2019-11-27 17:13:19 +01:00
Joakim Hove
6019ad9d42 Fix internal name in PLYROCKM json file 2019-11-27 16:51:29 +01:00
Joakim Hove
ce3b1554db Temporarily added plain FIPNUM as region keyword 2019-11-27 16:31:10 +01:00
Joakim Hove
8fdbde5a48 Bugfix: use correct 3D property container 2019-11-27 16:19:16 +01:00
Joakim Hove
a9ebca90fd Merge pull request #1264 from atgeirr/speedup-eclfile-construction
Use seekg() rather than ignore() to skip ahead.
2019-11-27 15:00:40 +01:00
Arne Morten Kvarving
a34bc76b46 added: serialize the whole connection struct to OPM_XWEL 2019-11-27 14:13:31 +01:00
Joakim Hove
854b79c280 Merge pull request #1233 from joakim-hove/thpres-refactor
Thpres refactor
2019-11-27 10:46:18 +01:00
Atgeirr Flø Rasmussen
e4e3b3bde8 Use seekg() rather than ignore() to skip ahead. 2019-11-27 10:17:30 +01:00
Joakim Hove
ca95ff1b86 Merge pull request #1235 from joakim-hove/fp-keys
Add FieldPropsManager::keys<T>() method for iteration
2019-11-27 10:06:23 +01:00
Joakim Hove
0380b9911e Merge pull request #1261 from joakim-hove/udqtest-data-fixup
Update test fixture to use correct grid
2019-11-27 10:02:58 +01:00
Joakim Hove
94a58e87bf Merge pull request #1234 from joakim-hove/region-cache-fp
Region cache fp
2019-11-27 09:50:29 +01:00
Joakim Hove
29b5f1e8b6 Use FieldPropsManager for THPRES initialization 2019-11-27 09:48:13 +01:00
Tor Harald Sandve
5d28ff7d24 store well and group event in same map 2019-11-27 08:58:57 +01:00
Joakim Hove
b2d9e92e25 Update test fixture to use correct grid 2019-11-26 21:34:04 +01:00
Joakim Hove
866aa5c5ca Add alternative FieldPropsManager argument to THPRES constructor 2019-11-26 20:49:15 +01:00
Joakim Hove
8e76b1346a Moved some variables closer to use-site 2019-11-26 20:49:15 +01:00
Arne Morten Kvarving
c2de0e09a3 Merge pull request #1259 from akva2/rename_accessor
changed: rename accessor to data()
2019-11-26 14:28:33 +01:00
Arne Morten Kvarving
0d6ed7cfb6 changed: rename accessor to data()
the two classes EDITNNC and NNC are very similar, which makes templating
useful. this small difference makes it hard to do. unify them.
2019-11-26 13:20:17 +01:00
Joakim Hove
d3cc7303b4 Merge pull request #1256 from akva2/fix_forwards
fixed: forward declared the intended classes
2019-11-26 13:03:37 +01:00
Tor Harald Sandve
e1029e956b convert from UDA to double for GCONSALE and GCONSUMP 2019-11-26 11:14:12 +01:00
Tor Harald Sandve
225d6ea26d Make GCONSALE an injector 2019-11-26 11:14:12 +01:00
Arne Morten Kvarving
e1e9fb7110 fixed: forward declared the intended classes 2019-11-26 10:40:03 +01:00
Tor Harald Sandve
b109331163 add group events 2019-11-25 09:55:32 +01:00
Bård Skaflestad
be27bb6154 Merge pull request #1248 from berland/wpotcalc
Change section for WPOTCALC keyword to RUNSPEC
2019-11-21 16:03:33 +01:00
Joakim Hove
91c40e60c6 Add FieldPropsManager::keys<T>() method for iteration 2019-11-21 10:21:01 +01:00
Joakim Hove
b3d28e10cc Merge pull request #1246 from joakim-hove/fp-default-region
FieldProps::default_region() - public property
2019-11-21 10:19:16 +01:00
Håvard Berland
9cefcaf49b Change section for WPOTCALC keyword to RUNSPEC 2019-11-21 09:59:50 +01:00
Arne Morten Kvarving
049ddf74f4 Merge pull request #1247 from akva2/fix_rh_regression
fixed: a regression snuck in while enabling redhat 8
2019-11-21 09:55:19 +01:00
Arne Morten Kvarving
9bb8a35f8f fixed: a regression snuck in while enabling redhat 8
for some reason, rh7 does not link cmake3 to cmake,
while rh6 and rh8 does. cmake3 works everywhere
2019-11-21 09:01:39 +01:00
Joakim Hove
be895ce0b1 FieldProps::default_region() - public property 2019-11-21 08:43:48 +01:00
Joakim Hove
3672a29b0a Merge pull request #1237 from joakim-hove/fp-defaulted
Fp defaulted
2019-11-21 08:39:04 +01:00
Joakim Hove
5d588fd56e Merge pull request #1242 from akva2/add_rh8_packaging
added: support rhel8
2019-11-20 19:33:19 +01:00
Joakim Hove
eb1c9a71c7 Merge pull request #1241 from stefoss23/reorganize_krangle
added some 'special' keywords. Reorganized list of 'special' keywords.
2019-11-20 19:12:29 +01:00
Arne Morten Kvarving
3f6097bf16 added: support rhel8 2019-11-20 15:50:01 +01:00
Steinar Foss
bebcdbc43c added some 'special' keywords. Reorganized list of 'special' keywords.
added kw GCONPRI.

added kw GIALL.

added kw MASSFLOW.

added keywords MESSAGE.

RPTRST: deckname OUTSOL.

added keyword PARAOPTS.

FOAMDCN: changed structure ofg keyword.

added keywords PVG32D, PCW32D.

keyword_list.cmake: reaorginzed list of 'special' keywords.
2019-11-20 15:19:22 +01:00
Kai Bao
967d58ca7c removing whitespaces from test_ERst.cpp 2019-11-20 14:16:16 +01:00
Joakim Hove
a15a724e76 Enable 3D property testing in opm-material on jenkins 2019-11-20 14:13:50 +01:00
Joakim Hove
f0547009fd Merge pull request #1232 from joakim-hove/get-fp
Add EclipseState::fieldProps() method
2019-11-20 11:43:59 +01:00
Joakim Hove
f4cd0c4052 Merge pull request #1231 from joakim-hove/fp-value-status
Fp value status
2019-11-20 11:43:02 +01:00
Joakim Hove
42757a02fd Add FieldPropsManager::defaulted() property 2019-11-20 11:29:47 +01:00
Joakim Hove
11ca1194b0 Use enum value::status to keep track of value status in FieldProps 2019-11-20 10:40:51 +01:00
Joakim Hove
517dbfddc5 Use FieldProps to get FIPNUM for region cache 2019-11-20 08:38:26 +01:00
Joakim Hove
8bd9aeaf9d Change RegionCache constructor to accept std::vector<int> fipnum 2019-11-20 08:36:03 +01:00
Joakim Hove
52fabf37c7 Merge pull request #1230 from joakim-hove/deckitem-size-rename
Remove / rename DeckItem::size()
2019-11-19 20:39:33 +01:00
Joakim Hove
d8bb92b7b2 Add EclipseState::fieldProps() method 2019-11-18 10:14:59 +01:00
Joakim Hove
6cc3b578f5 Use value::status to keep track of data status in DeckItem
With this commit the DeckItem::push_backDummyDefault() function will push back a
default value T( ). This will give a change in behaviour in downstream code
which has used getData<T> to get DeckItem data unchecked.
2019-11-17 17:23:42 +01:00
Joakim Hove
3156448f99 Add enum value::status to handle the set/unset status of items 2019-11-17 11:18:05 +01:00
Joakim Hove
6dbbc8c037 Remove / rename DeckItem::size() 2019-11-16 18:31:12 +01:00
Joakim Hove
da625838b6 Merge pull request #1229 from joakim-hove/minor
Minor step in default rewrite ...
2019-11-16 12:15:04 +01:00
Joakim Hove
e15dcb216d Improved error message 2019-11-16 10:38:16 +01:00
Joakim Hove
3982e6a8c9 Renamed variables 2019-11-16 00:44:20 +01:00
Joakim Hove
4514955778 Merge pull request #1227 from stefoss23/ACTIONXtests_reinstate_tests
testfile ACTIONC.cpp: removed 'if 0'.
2019-11-16 00:39:47 +01:00
Steinar Foss
239d562581 testfile ACTIONC.cpp: removed 'if 0'.
test ACTIONX, uncommented TestActions.

ACTIONX tests: uncommented all.
2019-11-15 15:24:16 +01:00
Joakim Hove
c309c6a7e6 Merge pull request #1226 from blattms/fix-type-more-info-compareECL
Fixed typos and included more info into compareECL's exceptions
2019-11-15 11:41:11 +01:00
Markus Blatt
6761f3dc57 Fixed typos and included more info into compareECL's exceptions 2019-11-15 10:20:33 +01:00
Joakim Hove
6388fbe584 Merge pull request #1224 from joakim-hove/satfunc-init-refactor
Satfunc lookup: prepare for only active cells
2019-11-15 09:59:48 +01:00
Joakim Hove
d99d1dfcc3 Merge pull request #1220 from joakim-hove/COPYREG
More 3D Property changes
2019-11-15 09:59:33 +01:00
Joakim Hove
05e006e7a9 Changed SatfuncPropertyInitializers to use references internally 2019-11-15 08:03:03 +01:00
Joakim Hove
63f4b5494d Prepare saturation function lookup to only consider active cells 2019-11-15 08:03:03 +01:00
Joakim Hove
c8e2925134 Split saturation functions satnumApply and imbnumApply 2019-11-15 08:03:03 +01:00
Joakim Hove
7b2048ec22 Add assign(const std::vector<T>&) to FieldProps::FieldData 2019-11-15 07:55:29 +01:00
Joakim Hove
ffc67f05cf Reorganise in FieldProps 2019-11-15 07:55:29 +01:00
Joakim Hove
5d852bf3f1 Merge pull request #1223 from joakim-hove/fp-tables
Add TableManager argument to FieldProps constructor
2019-11-15 07:54:33 +01:00
Joakim Hove
36c1798a38 Merge pull request #1222 from joakim-hove/grid-properties-testdata
Update testdata to one element for each cell
2019-11-15 07:54:15 +01:00
Atgeirr Flø Rasmussen
0ea0f07b20 Merge pull request #1225 from atgeirr/fix-abs
Fix abs() ambiguity, add copyright headers.
2019-11-14 23:11:01 +01:00
Atgeirr Flø Rasmussen
87a0e0e402 Fix abs() ambiguity, add copyright headers. 2019-11-14 13:09:35 +01:00
Joakim Hove
feec9c150d Merge pull request #1219 from joakim-hove/box-keyword-constructor
Simplify the BOX implementation - prepare to drop the manager
2019-11-14 12:15:53 +01:00
Atgeirr Flø Rasmussen
6d83672f94 Merge pull request #1217 from joakim-hove/rename-well2
Rename Well2 -> Well and  Group2 -> Group
2019-11-14 10:33:45 +01:00
Joakim Hove
7fbbb6d71a Add TableManager argument to FieldProps constructor 2019-11-14 07:14:54 +01:00
Joakim Hove
60d3a074b9 Update testdata to one element for each cell 2019-11-13 23:57:59 +01:00
Joakim Hove
613ec70dab Rename Well2 -> Well and Group2 -> Group 2019-11-13 23:19:26 +01:00
Joakim Hove
3f1cf0bc8a Changed box implementation 2019-11-13 20:19:47 +01:00
Bård Skaflestad
8cd72f1ff0 Merge pull request #1209 from atgeirr/fix-timemap-restartintervals
Fix TimeMap::isTimestepInFirstOfMonthsYearsSequence() method.
2019-11-13 15:00:45 +01:00
Arne Morten Kvarving
dd8c328ca7 Merge pull request #1150 from tskille/summary
new program summary
2019-11-12 14:50:37 +01:00
Torbjørn Skille
59e0c39558 New program summary based on OPM I/O classes 2019-11-12 13:27:26 +01:00
Joakim Hove
eda68f74ae Merge pull request #1191 from joakim-hove/field-properties-regions
Field properties regions
2019-11-12 08:37:19 +01:00
Joakim Hove
6afc118c94 Started on region operations in FieldProps implementation 2019-11-12 08:18:13 +01:00
Joakim Hove
3421b25d8e Merge pull request #1211 from joakim-hove/monkey-patch-rename
Minor refactor to monkey-patching
2019-11-11 16:38:43 +01:00
Joakim Hove
d0685c1e6c Merge pull request #1212 from joakim-hove/item-rename
Item rename
2019-11-11 16:38:26 +01:00
Joakim Hove
7356c76c58 Merge pull request #1204 from joakim-hove/summarynode-location
Add Location member to SummaryNode instances
2019-11-11 16:37:43 +01:00
Joakim Hove
f17eefcaf7 Add Location member to SummaryNode instances 2019-11-11 15:31:36 +01:00
Joakim Hove
0988f26ad9 Merge pull request #1213 from goncalvesmachadoc/patch-1
Add summary keywords FCPR, FCPT and CCPT
2019-11-11 13:26:44 +01:00
Cintia Goncalves Machado
7a274b2717 Add summary keywords FCPR, FCPT and CCPT 2019-11-11 09:26:36 +01:00
Joakim Hove
af4a2d78f9 Update test data to use correct region 2019-11-11 07:48:47 +01:00
Joakim Hove
24469f7a5e Renamed item in COPYEREG keyword 2019-11-11 07:35:25 +01:00
Joakim Hove
efac465ebd Minor refactor to monkey-patching 2019-11-10 21:09:35 +01:00
Atgeirr Flø Rasmussen
4fc71e352e Merge pull request #1205 from totto82/defaultNUPCOL
Change default NUPCOL to 12
2019-11-08 17:38:20 +01:00
Atgeirr Flø Rasmussen
b787a1a259 Fix TimeMap::isTimestepInFirstOfMonthsYearsSequence() method. 2019-11-08 17:26:02 +01:00
Tor Harald Sandve
0771e555a7 Change default NUPCOL to 12 2019-11-08 10:44:32 +01:00
Joakim Hove
1d95cd8248 Merge pull request #1200 from goncalvesmachadoc/goncalvesmachadoc-addProdInjReportPRT
Add WVIR
2019-11-07 16:22:06 +01:00
Joakim Hove
6a01e4af35 Merge pull request #1201 from stefoss23/gconsump
Schedule handles keyword GCONSUMP.
2019-11-07 12:07:31 +01:00
Joakim Hove
632708acd2 Merge pull request #1203 from GitPaean/fixing_aqufetp_unit
correcting the unit in the AQUFETP definition
2019-11-07 10:20:39 +01:00
Steinar Foss
a1c5aaa4d4 GConSump/sale: add does not rewrite groups. 2019-11-07 10:00:54 +01:00
Steinar Foss
d86ea3cb30 GConSump/Sale: using default constructor. 2019-11-07 09:42:41 +01:00
Kai Bao
cda9ba9363 correcting the unit in the AQUFETP definition 2019-11-06 22:05:35 +01:00
Joakim Hove
a3090fd88f Merge pull request #1181 from joakim-hove/tskille_pybind_eclio
Tskille pybind eclio
2019-11-06 16:39:30 +01:00
Steinar Foss
f75c3921e5 Schedule handles keyword GCONSUMP.
GConSump: added and linked soruce files.

gconsump added to dynamicstate.

added handleGCONSUMP.

GConSump: add.

GConSump: has.

GConSump: get.

GConSump: added UDA values.

GConSump: added network_node.
2019-11-06 15:12:25 +01:00
Cintia Goncalves Machado
db34bcaa21 Add WVIR
Add well voidage injection rate.
2019-11-06 14:58:35 +01:00
Joakim Hove
d66852d8de Rewrite EclFile wrapping
- Include the eclipse_io.cpp file in existing extension library - do not create
   a new library.

 - Remove Python class EclFile - just expose the C++ through Pybind1, include
   some monkey-patching of the class to ensure proper Python strings for CHAR
   keywords.

 - Remove string based keyword lookup.

 - Use standard Python methods __len__, __getitem__ and __contains__; get() is
   an equivalent alternative to __getitem__().

 - Add property arrays in addition to getListOfArrays()
2019-11-06 09:59:07 +01:00
Joakim Hove
629606c5d8 Use test utility to get test filenames 2019-11-06 09:59:07 +01:00
Joakim Hove
179be0d519 Add converter to convert CHAR arrays 2019-11-06 09:59:07 +01:00
Joakim Hove
438a71de1c Remove unused includes 2019-11-06 09:59:07 +01:00
Torbjørn Skille
7cacc734e8 python binding for EclFile 2019-11-06 09:59:07 +01:00
Joakim Hove
0b8a42fd1f Fix cmake find pythonlibs 2019-11-06 09:59:07 +01:00
Joakim Hove
3bf3c34899 Merge pull request #1194 from tskille/convertECL
updates of ERst API, supports multiple occurrence of array names
2019-11-06 09:06:00 +01:00
Joakim Hove
af34571d5f Merge pull request #1198 from akva2/janitoring
fixed: wrong init list order
2019-11-06 07:10:54 +01:00
Torbjørn Skille
c6f8a41c43 updates of ERst api, supports multiple occurrences of array names 2019-11-05 15:01:17 +01:00
Arne Morten Kvarving
dd8f0b2164 Merge pull request #1199 from akva2/bump_version
bump version to 2020.04-pre
2019-11-05 14:26:51 +01:00
Atgeirr Flø Rasmussen
d6cd0ff871 Merge pull request #1197 from atgeirr/add-regula-falsi-bisection
Add combined regula falsi + bisection method, and test.
2019-11-05 13:00:36 +01:00
Arne Morten Kvarving
a8e9ed2deb bump version to 2020.04-pre 2019-11-05 10:50:03 +01:00
Arne Morten Kvarving
845613c03a fixed: wrong init list order 2019-11-05 10:46:17 +01:00
Atgeirr Flø Rasmussen
2951df2bfb Add combined regula falsi + bisection method, and test. 2019-11-05 10:33:02 +01:00
Joakim Hove
810fc19ea3 Merge pull request #1196 from joakim-hove/actionresult-copy
Add copy constructor + contains() method to Action::Result
2019-11-04 16:07:55 +01:00
Joakim Hove
9e898055a8 Merge pull request #1185 from joakim-hove/field-properties-downstream
Field properties downstream
2019-11-04 16:04:21 +01:00
Joakim Hove
8c6768cc89 Merge pull request #1193 from stefoss23/gconsale
Adding keyword GCONSALE to Schedule.
2019-11-04 15:02:19 +01:00
Joakim Hove
450bb96c9b Add scalar auto create for SATNUM 2019-11-04 14:51:58 +01:00
Joakim Hove
02d4e98f1f Add WellConnections() overload which uses FieldPropsManager 2019-11-04 14:51:58 +01:00
Joakim Hove
56d32f7fa0 Use vectors with nactive elements in WellConnections 2019-11-04 14:51:58 +01:00
Joakim Hove
77ef195b46 Early exit in wellconnection code 2019-11-04 14:51:58 +01:00
Steinar Foss
17d11e9a60 GConSaleGroup: MaxProcedure static, simplified get and add. 2019-11-04 13:59:54 +01:00
Joakim Hove
015559b5cf Merge pull request #1187 from joakim-hove/field-props-has
Add has<T>() method to FieldPropsManager
2019-11-04 13:17:06 +01:00
Joakim Hove
0d2f57354a Merge pull request #1184 from joakim-hove/python-dep
Add Python library to opm-common_LIBRARIES cmake variable
2019-11-04 13:16:32 +01:00
Joakim Hove
cfcfc08520 Merge pull request #1192 from joakim-hove/box-constructor
Add constructor to Box::cell_index
2019-11-04 13:16:06 +01:00
Joakim Hove
b5b54cf162 Merge pull request #1190 from joakim-hove/eclfile-preload
Add optional argument preload=false to EclFile constructor
2019-11-04 13:15:30 +01:00
Joakim Hove
1750767a1f Merge pull request #1180 from joakim-hove/eclfile-size
Add size() method to EclFile
2019-11-04 13:15:16 +01:00
Joakim Hove
f33c4f749e Add copy constructor + contains() method to Action::Result 2019-11-04 12:54:14 +01:00
Steinar Foss
ec07dca68b Added GConSale.hpp to CMakeLists_files.cmake. 2019-11-04 09:31:45 +01:00
Steinar Foss
d2dce88411 Adding keyword GCONSALE to Schedule.
added files GConSale cpp/hpp.

Schedule: adde GConSale as DynamicState.

Shcedule: added function gConSale.

added function handleGCONSALE.

GConsale: added substruct GCONSALEGroup.

GConSale: empty records added.

GConSale: all values set to zero.

GCONSALE: values stored as UDA.

GConSale: UDAValues to SI.

GConSale: max_proc parsed.
2019-11-03 11:37:28 +01:00
Joakim Hove
8b2cab3244 Add constructor to Box::cell_index 2019-11-02 14:45:58 +01:00
Joakim Hove
53619980c5 Merge pull request #1188 from joakim-hove/P
Keywords on P
2019-11-02 09:10:13 +01:00
Joakim Hove
74aa7bbd48 Add optional argument preload=false to EclFile constructor 2019-11-01 17:01:07 +01:00
Joakim Hove
bb4426ff6b Keywords on P 2019-11-01 15:14:33 +01:00
Joakim Hove
d3aec121f1 Merge pull request #1189 from totto82/supportSepGroup
Add support for item 11 and 12 in GCONINJE
2019-11-01 13:41:21 +01:00
Tor Harald Sandve
64f4919085 Add support for item 11 and 12 in GCONINJE 2019-11-01 13:15:52 +01:00
Joakim Hove
8268c877fd Add has<T>() method to FieldPropsManager 2019-11-01 08:13:42 +01:00
Joakim Hove
e296140f75 Merge pull request #1186 from stefoss23/add_keywords_P
added keywords beginning w/ P.
2019-10-31 16:48:52 +01:00
Steinar Foss
59fddbf998 added keywords beginning w/ P.
added keywords PINCHXY, PLYATEMP, PLYCAMAX.
2019-10-31 13:05:49 +01:00
Joakim Hove
0fb55b23c0 Merge pull request #1056 from joakim-hove/field-properties
Add FieldProps skeleton
2019-10-31 11:36:29 +01:00
Joakim Hove
64095f0885 Create default FieldPropsManager - for the testing phase 2019-10-31 11:18:55 +01:00
Joakim Hove
a7187abc17 Initial implementation of 3D properties 2019-10-31 11:18:55 +01:00
Joakim Hove
18eb7a2de3 Check if have grid before fault initialization 2019-10-31 11:18:54 +01:00
Joakim Hove
176e7f75ed Add Python library to opm-common_LIBRARIES cmake variable 2019-10-31 07:07:07 +01:00
Joakim Hove
abe2013624 Merge pull request #1182 from stefoss23/add_keyword_N1
Added keywords beginning with N, O, P.
2019-10-30 23:34:40 +01:00
Markus Blatt
bea4a81a3c Merge pull request #1176 from blattms/changelog-2019.10
Added entries to changelog concerning 2019.10 release
2019-10-30 21:51:53 +01:00
Steinar Foss
78a37d2a33 added keywords beginning with N, O, P.
added keywords NODPPM, NOHMD, NOHMO.

added keywords NOHYST, NOWARNEP, NRSOUT.

added keywords NWATREM, NXFIN, NYFIN, NZFIN.

added keywords OFM, OILAPI, OLDTRAN, OLDTRANR.

added keywords PARTTRAC, PBUB, PCW.

added keywords PDEW, PEBI, PECOEFS.

removed keyword NEWTON.

added keywords PEDIMS, PEGTABX.

added keywords PEKTABX, PENUM, PERMAVE.

added keywords PETGRID, PICOND.
2019-10-30 15:37:14 +01:00
Joakim Hove
290368985a Add size() method to EclFile 2019-10-30 09:31:10 +01:00
Joakim Hove
292d00417c Merge pull request #1166 from joakim-hove/parsetest-model2-decks
Add parse testing of model2 decks
2019-10-30 07:40:20 +01:00
Joakim Hove
92188eea8a Merge pull request #1167 from stefoss23/add_keyword
Add keyword, python deck
2019-10-29 16:54:22 +01:00
Joakim Hove
8a36be210b Add bullet point about Eclipse restart capabilities 2019-10-29 16:32:08 +01:00
Markus Blatt
28b2b437c8 Skipped python and restart in changelog 2019-10-29 16:24:55 +01:00
Arne Morten Kvarving
f494df4f3d Merge pull request #1178 from akva2/fix_rebuild_on_install
fixed: let's not copy the files twice
2019-10-29 15:17:28 +01:00
Arne Morten Kvarving
95a129cbed fixed: let's not copy the files twice 2019-10-29 14:59:08 +01:00
Joakim Hove
d465409acf Merge pull request #1177 from joakim-hove/install-copy-on-change
Only copy python files when they have changed
2019-10-29 13:57:54 +01:00
Joakim Hove
7e3c34c682 Only copy python files when they have changed 2019-10-29 12:34:46 +01:00
Markus Blatt
21673903dd Added entries to changelog concerning 2019.10 release 2019-10-29 10:40:04 +01:00
Joakim Hove
fd3b6f8999 Merge pull request #1174 from bska/record-restart-output
Record Output of Restart File Data
2019-10-29 08:21:34 +01:00
Joakim Hove
6894aaf03b Merge pull request #1173 from joakim-hove/python3
Python3
2019-10-29 08:07:22 +01:00
Bård Skaflestad
023333936c Record Output of Restart Files in .PRT File (and to screen)
This commit adds a simple one-line record to the screen and,
typically, the .PRT file, each time a set of restart values are
output to the (or a) restart file.  Format of the output is along
the lines of

  Restart file written for report step: 169/247.  Date: 2003/09/13
2019-10-28 23:32:33 -05:00
Bård Skaflestad
d19f9d6899 INTEHEAD: Promote Day, Month, Year to Public Indices
This commit makes the (Day, Month, Year) indices of the restart
file's INTEHEAD vector to the publicly available VectorItems.  This,
in turn, makes the entries more readily accessible outside of
InteHEAD.cpp.
2019-10-28 23:27:39 -05:00
Joakim Hove
9d1b7a83d9 Changes in Python build:
- Use python/install.py to copy from source tree to build tree
- List Cxx source files in CMakeLists_files.cmake
2019-10-28 21:42:57 +01:00
Joakim Hove
99e32edd78 Use try: except: to import test utility code 2019-10-28 20:30:39 +01:00
Joakim Hove
d382c57145 Add small python script to determine extension suffix 2019-10-28 20:30:39 +01:00
Markus Blatt
e9367d5116 Merge pull request #1171 from akva2/update_rh_packaging
update redhat packaging
2019-10-28 11:58:37 +01:00
Arne Morten Kvarving
e15d8eea4a update redhat packaging 2019-10-28 11:36:57 +01:00
Joakim Hove
4e8a0eac9f Merge pull request #1170 from bska/resolve-asan-issues
Resolve Address Sanitizer Issues
2019-10-27 23:25:30 +01:00
Joakim Hove
baf4f7fbac Merge pull request #1168 from stefoss23/add_keywords_N
added keywords beginning w/ N.
2019-10-27 16:12:50 +01:00
Bård Skaflestad
3ad7771306 EclipseState Unit Test: Don't Leak Memory
The construction

    Parser parser(new Parser{})

effectively ends up calling the constructor

    Parser::Parser(bool)

which, besides leaking memory, is typically not what we want.
2019-10-26 18:22:52 -05:00
Bård Skaflestad
2558320aa3 UDQ Unit Test: Don't Create Dangling References
This fixes an issue identified by Address Sanitizer.
2019-10-26 18:18:38 -05:00
Bård Skaflestad
3b9ea5dcd8 Consume Owning Raw Pointers in Smart Pointers
This fixes several memory leaks identified by Address Sanitizer.
2019-10-26 18:17:19 -05:00
Bård Skaflestad
50460ec8de Don't Leak Memory in case of Exceptions
Wrap the internal 'WellConnections' pointer of function

    newConnectionsWithSegments

in a unique_ptr that will release the memory if an exception is
thrown--e.g., from the error guard.

This function should arguably return a unique_ptr rather than a raw
pointer.
2019-10-26 18:02:39 -05:00
Bård Skaflestad
0e39b03f3f Don't Use ACTNUM Unless Correctly Sized
We must explicitly check that the deck supplies a correctly sized
ACTNUM vector before using its .data() pointer.  Otherwise, we risk
indexing out of bounds.

This fixes an ASan error in a unit test

While here, also remove stray semicolons on function closing braces.
2019-10-26 17:59:44 -05:00
Steinar Foss
cc11890e31 added keywords beginning w/ N.
added keywords NETWORK, NEWTON.

added keywords NEXT, NEXTSTPL, NINENUM.
2019-10-26 12:32:57 +02:00
Steinar Foss
0e1e9b7ac7 test EmbeddedPython: added test for add keyword to deck. 2019-10-25 17:15:56 +02:00
Joakim Hove
d217bdf458 Add parse testing of model2 decks 2019-10-25 14:43:19 +02:00
Steinar Foss
576ddd4987 python deck: added member add(keyword). 2019-10-25 14:11:52 +02:00
Joakim Hove
390a29d425 Merge pull request #1164 from stefoss23/deckkeyword_vector_unit
DeckKeyword w/ vectors: takes numpy vectors.
2019-10-25 12:07:34 +02:00
Joakim Hove
0fb92e9121 Merge pull request #1157 from joakim-hove/udq-token-types
Udq token types
2019-10-25 11:58:08 +02:00
Steinar Foss
02cc292f38 python numpy array conversion function in namespace conv ert. 2019-10-25 11:06:12 +02:00
Joakim Hove
a6db850230 Merge pull request #1165 from joakim-hove/python-testdata-path
Python testdata path
2019-10-25 10:54:24 +02:00
Joakim Hove
5ec24199de Merge pull request #1163 from joakim-hove/python-test-main
Python test main
2019-10-25 10:38:56 +02:00
Joakim Hove
78b32803ff Merge pull request #1162 from joakim-hove/python-enable
Minor change to python enable script
2019-10-25 10:00:23 +02:00
Joakim Hove
e51b14f6fd Use utility function for path to testdata 2019-10-25 09:57:38 +02:00
Steinar Foss
ce3781775f DeckKeyword w/ vectors: takes unit system as arg.
DeckKeyword w/ vector: added unit as arg.

DeckKeyword vector works with units.

DecValuetests: use zcorn instead of poro.

python: deckkweyword works with int data.

...

python deckkeyword. cant init with double array.

moved numpy_array converters to converters.hpp.
2019-10-25 09:31:03 +02:00
Joakim Hove
2fb3ce4957 Add if __name__ == "__main__" in Python test 2019-10-25 09:14:25 +02:00
Joakim Hove
622409bfb6 White space change 2019-10-25 09:14:15 +02:00
Joakim Hove
464cf6a51f Merge pull request #1068 from GitPaean/fixing_aquifer
improvements related to Aquifer modeling
2019-10-25 09:01:19 +02:00
Joakim Hove
162d0e0902 Minor change to python enable script 2019-10-25 08:54:40 +02:00
Kai Bao
b9bc222e81 addressing reviewing comments from PR #1068 2019-10-24 23:01:34 +02:00
Kai Bao
3691c6e724 an aquifer connection need to between active and inactive cells
unless we specify we want to have aquifer within the inner cell of the
reservoir.
2019-10-24 22:01:28 +02:00
Kai Bao
a58daf17b5 correcting the definition of keyword AQUFETP
default_value looks like not working in term of specifying default value
for the item.
2019-10-24 22:01:28 +02:00
Joakim Hove
50b3aef1fa Merge pull request #1158 from joakim-hove/Q
Keywords on Q
2019-10-24 18:41:30 +02:00
Joakim Hove
4b8628a873 Keywords on Q 2019-10-24 17:06:28 +02:00
Joakim Hove
0af4a5510e Merge pull request #1154 from stefoss23/add_keywords_M1
Added more keywords beginning with M.
2019-10-24 16:53:25 +02:00
Joakim Hove
7e2d45cf66 Export all UDQTokens in use from UDQDefine 2019-10-24 16:51:15 +02:00
Joakim Hove
4c4bee4285 Merge pull request #1156 from atgeirr/add-missing-include
Add missing <string> include, necessary on clang.
2019-10-24 16:39:07 +02:00
Atgeirr Flø Rasmussen
4cc54aa324 Add missing <string> include, necessary on clang. 2019-10-24 15:44:34 +02:00
Steinar Foss
11a25e02c2 added more keywords beginning with M.
added keywords MULTOUTS, MULTREAL, MULTREGD.

added keywords MULTREGH, MULTSIG, MULTSIGV.

added keywords NARROW, NCONSUMP, NEFAC.
2019-10-24 11:48:02 +02:00
Joakim Hove
a9a7166e3d Merge pull request #1153 from joakim-hove/move-fluxnum
Moved FLUXNUM to GRID section
2019-10-24 09:42:28 +02:00
Joakim Hove
0421173686 Merge pull request #1152 from joakim-hove/deckkeyword-unit
Deckkeyword unit
2019-10-24 08:43:18 +02:00
Joakim Hove
15eda478f3 Merge pull request #1149 from tskille/ESmry
fixing severe performance issue with ESmry
2019-10-24 08:42:50 +02:00
Joakim Hove
d7a52167f3 Moved FLUXNUM to GRID section 2019-10-24 08:39:53 +02:00
Joakim Hove
8f0aa75509 Merge pull request #1148 from joakim-hove/extract-operate
Extract operate
2019-10-24 07:18:09 +02:00
Joakim Hove
6525a7b19f Merge pull request #1143 from joakim-hove/box-data-index
Add data_index to Box::index_list
2019-10-24 07:17:57 +02:00
Steinar Foss
d05b3323b3 DeckKeyword: constr. with records takes unitsystem args.
Deckkeyword constr w/ records also takes unit_systems.

DeckKeyword w/ records uses input args to get dims.

DeckValue unit system works w/ records.

Deckkeyword w/ records: rearranged default/active unit args.

..

python deckkeywords: workable.

python deckkeyword: testing rewrite.

python deckkeyword w/units: most test work.

...

python support for deckkeyword w/ dimensions.
2019-10-24 07:13:31 +02:00
Joakim Hove
1a05f2fcd1 Merge pull request #1151 from stefoss23/box_bug
BOX keyword: using defaultApplied.
2019-10-24 07:08:11 +02:00
Steinar Foss
1a8e9979d8 BOX keyword: using defaultApplied.
moved failed box-test from python to cpp.

setKeywordBox: using defaultApplied rather than hasvalue.

EclipseStateTEsts. TextBox: use 1* instead of *.

corrected box_bug.
2019-10-23 15:47:25 +02:00
Torbjørn Skille
e3e2a6e8ea fixing severe performance issue with ESmry 2019-10-23 14:33:17 +02:00
Joakim Hove
35ed4bbca4 Use a lambda for the operate functions 2019-10-23 07:49:26 +02:00
Joakim Hove
ccb3ddced9 Extracted OPERATE function to separate file 2019-10-23 07:25:41 +02:00
Joakim Hove
cadadbde4d Merge pull request #1145 from joakim-hove/properties-testdata
Properties testdata
2019-10-22 17:18:48 +02:00
Arne Morten Kvarving
76c866f816 Merge pull request #1146 from akva2/fix_closed_tests_prs
fixed: allow branch to exist in opm-tests PR repo, but no PR
2019-10-22 10:11:59 +02:00
Joakim Hove
304791683f Merge pull request #1121 from joakim-hove/multregt-edit-warning
Add warning for MULTREGT in EDIT section
2019-10-22 10:02:00 +02:00
Arne Morten Kvarving
d472485418 fixed: allow branch to exist in opm-tests PR repo, but no PR
happens when people manually close a previously opened PR
for the branch.
2019-10-22 08:38:41 +02:00
Joakim Hove
fb63f61385 Merge pull request #1141 from joakim-hove/formatted-inf
Formatted inf
2019-10-22 08:25:16 +02:00
Joakim Hove
1af3ab2008 Merge pull request #1142 from joakim-hove/multz-edit
Multiply MULT(XYZ) keywords in the EDIT section
2019-10-22 08:24:32 +02:00
Joakim Hove
f81a84da42 Update testdata for a stricter 3D property parser
- Keywords should have correct number of elements
 - Should be in the correct section
2019-10-22 08:23:00 +02:00
Joakim Hove
760140397d Add dimension "1" to factor in MULTIPLY keyword 2019-10-22 08:22:51 +02:00
Atgeirr Flø Rasmussen
cf26ecac5e Merge pull request #1138 from bska/transpose-density-table
TAB Vector (INIT): Store Phase Density Data By Columns
2019-10-21 23:06:27 +02:00
Joakim Hove
2f8916392c Merge pull request #1144 from GitPaean/converting_aquifer_test_unix
converting AquanconTests.cpp to be unix format.
2019-10-21 18:27:19 +02:00
Kai Bao
18564a465c converting AquanconTests.cpp to be unix format. 2019-10-21 17:00:12 +02:00
Joakim Hove
1ad4a03ac1 Add data_index to Box::index_list 2019-10-21 15:45:39 +02:00
Joakim Hove
5741ff8034 Multiply MULT(XYZ) keywords in the EDIT section 2019-10-21 11:53:09 +02:00
Joakim Hove
abb70835fb Read and write formatted representations of NAN and INF 2019-10-21 09:29:13 +02:00
Joakim Hove
33e72c2a77 Slightly more relaxed conversion of formatted double string 2019-10-21 09:24:03 +02:00
Joakim Hove
e02cce3fde Use pass by value in string to double conversion 2019-10-21 09:24:03 +02:00
Joakim Hove
08d6888992 Remove trailing whitespace 2019-10-21 09:24:03 +02:00
Bård Skaflestad
18a840edba Add Unit Tests for Density Table Output 2019-10-21 00:16:30 -05:00
Bård Skaflestad
af97eaf821 TAB Vector (INIT): Store Phase Density Data By Columns
Specifically, store oil density values for every region before water
density values for every region, and gas density values after water
density values for every region.

This is the format expected in ECLIPSE's INIT file, and used by
ResInsight's fall-back flux calculator mode for flow diagnostics.
2019-10-20 23:25:57 -05:00
Joakim Hove
737b2127d8 Merge pull request #1100 from totto82/convertTargets
convert targets.
2019-10-20 17:50:25 +02:00
Joakim Hove
4fabb7b486 Merge pull request #1122 from joakim-hove/location
Add small struct DeckKeyword::Location to simplify error reporting
2019-10-19 23:30:43 +02:00
Joakim Hove
d3f33882b9 Merge pull request #1128 from joakim-hove/exc-warning
Exc warning
2019-10-19 22:34:15 +02:00
Joakim Hove
f39de00b4a Add warning for MULTREGT in EDIT section 2019-10-19 20:13:48 +02:00
Joakim Hove
2534bbe0a3 Merge pull request #1123 from blattms/fix-unused-parameter-oython
Fixed unused parameter warning in PythonInterp.hpp
2019-10-19 20:13:14 +02:00
Markus Blatt
5584d6bb0a Fixed unused parameter warning in PythonInterp.hpp 2019-10-18 08:36:28 +02:00
Joakim Hove
e7e25beea5 Use const& to avoiw warnings 2019-10-18 08:34:12 +02:00
Joakim Hove
0c50d96ed0 Remove trailing whitespace 2019-10-18 08:32:49 +02:00
Joakim Hove
f274257c94 Pass location when constructing DeckKeyword 2019-10-18 08:26:33 +02:00
Joakim Hove
781ced7294 Use struct Location to record file position for keywords 2019-10-17 23:57:01 +02:00
Joakim Hove
2be6235ab7 Add small struct DeckKeyword::Location to simplify error reporting 2019-10-17 23:56:34 +02:00
Markus Blatt
007abc79f9 Merge pull request #1125 from blattms/fix-memory-error-eclipsegrid-actnum
Fix memory error during EclipseGrid creation with Actnum.
2019-10-17 20:24:51 +02:00
Markus Blatt
a3daeb9c45 Fix memory error during EclipseGrid creation with Actnum.
We pass an int pointer to the function initCornerPointGrid.
With ACTNUM  this pointer was initialized with data pointer
of an int vector that we threw away before the function call
(otherwise it was null). To fix this we move the int-vector up one
scope.
2019-10-17 19:09:24 +02:00
Joakim Hove
a0d5776eb9 Merge pull request #1119 from stefoss23/add_keywords_M
Added keywords beginning w/ M.
2019-10-17 15:06:19 +02:00
Joakim Hove
abbdcc9c6c Merge pull request #1117 from akva2/move_parserkeywords_build
changed: put the generated ParserKeywords.cpp first in list
2019-10-17 15:05:59 +02:00
Joakim Hove
65095af82e Merge pull request #1101 from joakim-hove/R
Add keywords starting with R
2019-10-17 14:53:22 +02:00
Steinar Foss
f5c1ede8ee Added keywords beginning w/ M.
added keywords MINPORV, MLANG, MLANGSLV.
2019-10-17 13:00:28 +02:00
Joakim Hove
b47d808416 Merge pull request #1116 from akva2/fix_expl_constructor_gcc5
fixed: build using gcc 5 (ubuntu xenial)
2019-10-17 12:54:10 +02:00
Arne Morten Kvarving
93ac533373 changed: put the generated ParserKeywords.cpp first in list
this improves build throughput on jenkins since building this
large file will overlap more with other build tasks.
2019-10-17 11:40:48 +02:00
Joakim Hove
8bed569f7e Merge pull request #1021 from joakim-hove/use-parser-dimensions
Use parser dimensions
2019-10-17 11:34:49 +02:00
Tor Harald Sandve
d1d665c343 Convert targets. Tested on simple problems. 2019-10-17 11:33:17 +02:00
Joakim Hove
60870b0f5a Add keywords starting with R 2019-10-17 11:24:13 +02:00
Arne Morten Kvarving
c06d5912ea fixed: build using gcc 5 (ubuntu xenial)
the tuple-from-initializer-list constructor is explicit.
2019-10-17 09:49:15 +02:00
Joakim Hove
e815194e21 Merge pull request #1112 from stefoss23/remove_common_state
Remove common state
2019-10-17 06:58:25 +02:00
Bård Skaflestad
3ea66e41dc Merge pull request #1107 from bska/decouple-libecl-final
Decouple OPM Flow From Libecl
2019-10-16 21:44:53 -05:00
Bård Skaflestad
288be7f0dc Drop libecl From Python Setup
Suggested by [at]akva2.
2019-10-16 20:03:08 -05:00
Arne Morten Kvarving
247b5685cc remove libecl from buildsystem, jenkins and packaging 2019-10-16 20:03:08 -05:00
Bård Skaflestad
d1db2ec396 Reimplement test_Restart in Terms of TimeStampUTC
Only affects the 'first_sim()' helper function.
2019-10-16 20:03:08 -05:00
Bård Skaflestad
7eec899130 Reimplement test_EclipseIO in Terms of TimeStampUTC
Mostly just to provide a simple overload of the utility function

    ecl_util_make_date

from libecl.  The rest of the test code remains intact.
2019-10-16 20:03:08 -05:00
Bård Skaflestad
7e160cb99a Reimplement ScheduleTests in Terms of TimeStampUTC
Note that we have to reduce the year-range in the specific test

    createDeckWithDRSDTthenDRVDT

in order not to wrap around for system_clock.  This is a deficency of
the new time-service protocol.
2019-10-16 20:03:08 -05:00
Bård Skaflestad
428d4c41f0 Reimplement TimeMap in Terms of TimeStampUTC 2019-10-16 20:03:08 -05:00
Bård Skaflestad
eea51a12b4 Add Simple Time-Service Protocol
Mostly for converting between std::time_t and broken-down time
stamps.  Uses UTC and std::chrono::system_clock.  May wrap in as
little as 292 years, depending on the period of system_clock.

Intended to replace various timestamping utility functions from
libecl.  A comprehensive time-service protocol for Flow is much more
work than this, and will likely not be easily realized before we
have C++17 and its much expanded time/calendar library.
2019-10-16 20:03:08 -05:00
Bård Skaflestad
738f98a4ac Defaulted Table Column: Don't Use 'ssize_t'
Instead, switch to 'int' for the 'before' and 'after' row indices.
The 'ssize_t' Posix type alias is not appropriate for this usage
since its range is only guaranteed to be [ -1 .. (1<<15)-1 ].
2019-10-16 20:03:08 -05:00
Bård Skaflestad
4e3693896e Reimplement 'test_EclipseIO' in Terms of Opm-Common Classes
In particular, use EGrid, ERst and EclFile as appropriate.
2019-10-16 20:03:08 -05:00
Joakim Hove
693181187c Adapt to new DeckKeyword constructor 2019-10-16 21:40:31 +02:00
Joakim Hove
697545cf54 Use dimensions from ParserKeyword 2019-10-16 21:03:02 +02:00
Joakim Hove
233f55c4e2 Update the Deck unitsystem using select method instead of mutable ref. 2019-10-16 21:03:02 +02:00
Joakim Hove
3d94bc6baf Simplify Deck constructors 2019-10-16 21:03:02 +02:00
Joakim Hove
7b35e68221 Merge pull request #1115 from akva2/janitoring
remove unused variables
2019-10-16 20:51:58 +02:00
Joakim Hove
5aa3369be6 Merge pull request #1113 from totto82/addEdit
Apply MULTZ also in the edit section
2019-10-16 16:12:43 +02:00
Arne Morten Kvarving
2253448eed remove unused variables 2019-10-16 16:07:29 +02:00
Joakim Hove
c8597419e1 Merge pull request #1109 from stefoss23/add_keywords_L
Added keywords beginning w/ L.
2019-10-16 15:11:49 +02:00
Tor Harald Sandve
3a3808b204 Apply MULTZ also in the edit section 2019-10-16 14:22:59 +02:00
Steinar Foss
fe8692f623 schedule.cpp: removed unused function. 2019-10-16 14:20:16 +02:00
Steinar Foss
0e5c14568e removed common_state. 2019-10-16 13:59:00 +02:00
Markus Blatt
ae08281927 Merge pull request #1110 from blattms/allow-building-one-by-one-with-installed
Allow building a module with dependencies installed but source lying …
2019-10-16 13:50:13 +02:00
Steinar Foss
7d0004f915 added keywords beginning w/ L.
added keywords LSLTWNUM, LSNUM, LSOGCR.

added keywords LSOWCR, LSWCR, LSWL.

LSWLPC, LSWU, LTOSIGMA.

added keywords LWKRO, LWKRORG, LWKRORW.

added keywords LWKRW, LWKRWR, LWPCW.

LWSLTNUM, LWSNUM, LWSOGCR.

added keywords LWSOWCR, LWSWCR, LWSWL.

added keywords LWSWLPC, LWSWU, LX.

added keywords LY, LZ, MATCORR.

...
2019-10-16 12:50:23 +02:00
Markus Blatt
a862c14873 Allow building a module with dependencies installed but source lying around.
If you set CMAKE_INSTALL_PREFIX, have the dependencies installed there, but
the source of them lying around in the parent directory of the build
directory, then the build will fail starting with opm-models because
we assume that ../opm-material is a build directory and set opm-material_DIR
to it. CMake will complain about not finding opm-material-config.cmake or
Opm-materialConfig.cmake. With this commit we will only set opm-material_DIR
if the directory contains a file CMakeCache.txt (which should be the case in
a configured build directory.

Directory outline of the failing situation is
- ${CMAKE_INSTALL_PREFIX} # where all dependencies are installed
- parent_dir
|____ opm-common #source dir
|____ opm-material #source dir
|____ ...
|____ build #build directory for current module (e.g. opm-modules)

Change is tested with sibling build

- build
|___ opm-common #build dir
|___ opm-material #build dir
|___ ...

and the dune version of it

- parent_dir
|___ opm-common # source dir
    |____ build # build dir opm-common

|___ opm-material # source dir
    |____ build # build dir opm-material
...
2019-10-16 12:38:51 +02:00
Joakim Hove
b5ab3e2047 Merge pull request #1092 from tskille/ESmry
Updates of ESmry - now supporting non-unified result files.
2019-10-15 23:02:02 +02:00
Joakim Hove
0f03777b16 Merge pull request #1106 from joakim-hove/setup-test-fixup
Fix spelling error
2019-10-15 09:51:50 +02:00
Torbjørn Skille
e36e87ccde Update of ESmry, now supporting non-unified result files. 2019-10-15 09:23:40 +02:00
Joakim Hove
1bab7f7aa3 Fix spelling error 2019-10-15 08:11:04 +02:00
Joakim Hove
7b55f10dc0 Merge pull request #1051 from joakim-hove/remove-props-iget
Remove index access to GridProperty<T>
2019-10-15 07:53:38 +02:00
Joakim Hove
01c5fe9d1d Merge pull request #1105 from joakim-hove/python-util-rm
Use absolute import for test util
2019-10-15 06:51:54 +02:00
Joakim Hove
2c6d1e0e37 Use absolute import for test util 2019-10-15 00:39:13 +02:00
Joakim Hove
5269f52291 Merge pull request #1075 from joakim-hove/python-install
Add Python copy/install hack
2019-10-14 18:46:48 +02:00
Joakim Hove
8c417a51e6 Merge pull request #1098 from joakim-hove/actionx-rst
Actionx rst
2019-10-14 18:00:21 +02:00
Joakim Hove
368910a7c2 Merge pull request #1099 from stefoss23/add_keywords_I
Added keywords beginning w/ I, J, K and L.
2019-10-14 18:00:07 +02:00
Joakim Hove
583ac5a756 Merge pull request #1094 from blattms/default-constructable-restartkey
Make RestartKey default contructable.
2019-10-14 17:29:31 +02:00
Joakim Hove
ce2d8ce211 Merge pull request #1090 from joakim-hove/S
Add S keywords up to SURFST
2019-10-14 16:27:33 +02:00
Joakim Hove
7dc77d1ca3 Install PYTHON Modules when running jenkins 2019-10-14 15:53:31 +02:00
Joakim Hove
1ff41de3eb Avoid use of include/ directory in test data 2019-10-14 15:46:02 +02:00
Jostein Alvestad
5d54d1a2fe change to avoid error in test_AggregateIntehead 2019-10-14 15:46:02 +02:00
Jostein Alvestad
1f79e2f0e3 corrected merge conflict that was missed in previous commit 2019-10-14 15:46:02 +02:00
Jostein Alvestad
84300d19f3 changes to avoid warnings in compilation 2019-10-14 15:46:02 +02:00
Jostein Alvestad
7973585db0 Initial work to add Actionx data to Eclipse compatible restart file
further changes to Actionx - restart

further changes for Actionx data to Restart file

additional changes to output Actionx data to Restart file

add test data for UDQ-ACTIONX

changes to add unit tests for InteHead - Actionx

Added changes to allow for output of IACT, SACT and ZACT to the E100 compatible restart file

changes to add ZLACT to restart output

Further changes - add ZACN - prelim

further changes to add ZACN to restart file

Additional changes to output IACN and SACN to restart

further changes to add IACN and SACN to the restart file

further changes to make unit tests for Actionx data / keywords

further changes to actionx restart and unit tests therefore

Added code for unit tests - not finished

some changes to correct for changes in upstream/master

changes correct errors in IACN and SACN

Initial work to add Actionx data to Eclipse compatible restart file

further changes to Actionx - restart

further changes for Actionx data to Restart file

additional changes to output Actionx data to Restart file

add test data for UDQ-ACTIONX

changes to add unit tests for InteHead - Actionx

Added changes to allow for output of IACT, SACT and ZACT to the E100 compatible restart file

changes to add ZLACT to restart output

Further changes - add ZACN - prelim

further changes to add ZACN to restart file

Additional changes to output IACN and SACN to restart

further changes to add IACN and SACN to the restart file

further changes to make unit tests for Actionx data / keywords

further changes to actionx restart and unit tests therefore

Added code for unit tests - not finished

some changes to correct for changes in upstream/master

changes correct errors in IACN and SACN

changes to avoid change in output data for restart file

further changes to avoid change in RESTART data

minor change to avoid data change in Restart file
2019-10-14 15:45:24 +02:00
Steinar Foss
3ca8cf896e added keywords beginning w/ I, J, K and L.
added keyword JFUNCR.

added keywords KRNUN, KRNUMMF.

added keywords LANGMPL, LANGMUIR, LANGSOLV.

added keywords LGRCOPY, LGRFREE, LGRLOCK.

added keywords LGROFF, LGRON, LINKPERM.

added keywords LKRO, LKRORG, LKRORW.

added keywords LKRW, LKRWR, LOAD.
2019-10-14 15:39:16 +02:00
Markus Blatt
c379e7e3b0 Make RestartKey default contructable.
Otherwise we cannot even resize a vector of it and this will be needed
for restart when getting rid off the global grid on all processes.
2019-10-14 15:17:57 +02:00
Bård Skaflestad
1db06277ce Merge pull request #1088 from bska/further-decouple-from-libecl
Further Decouple OPM-Common From libecl
2019-10-14 08:12:40 -05:00
Joakim Hove
8576bf5809 Merge pull request #1093 from stefoss23/python_unit_system
python: added class UnitSystem.
2019-10-14 14:03:18 +02:00
Bård Skaflestad
662e44683c INTEHEAD Test: Initialize Maximum Number of Wells in Field
Fixes a warning about missing initializers.
2019-10-14 06:14:09 -05:00
Bård Skaflestad
411da1d8a5 Make 'test_Restart' Mostly Independent of libecl
In particular, swith to using class EclIO::ERst to read the files
produced by RestartIO::save().
2019-10-14 06:13:38 -05:00
Bård Skaflestad
3802b4574a Make 'test_Summary' Independent of LibeECL
This commit switches the 'test_Summary' unit test to use class ESmry
for inspecting the values output to disk by 'out::Summary'.  As a
consequence, we are not able to verify units of measure for the
parameters, at least not for the time being.  Moreover, class ESmry
exclusively uses the "i,j,k" sub-key for block-related parameters so
switch those to reference the IJK identifiers.

Finally, as class ESmry currently does not support reading separate
(multiple) summary files, switch the input decks to generate unified
output.
2019-10-14 06:13:38 -05:00
Bård Skaflestad
c013639b51 Make Most Unit Tests Independent of LibECL
This commit switches a set of OPM-Common's unit tests away from
using direct calls to libecl functions and into using base types
from OPM-Common itself (along with Boost.Filesystem).

In particular summary related queries are replaced by calls to ESmry
member functions (wrapped in libecl-like interfaces to minimise code
changes).  We disable checks on unit strings since ESmry currently
does not have a way of associating those with individual variables.
2019-10-14 06:13:38 -05:00
Bård Skaflestad
bcfe700461 Decouple Most of OPM-Common From LibECL
This commit takes a pass at the implementation files in opm-common
and removes references to libecl functions where practical.  In
particular we switch to using types from C++'s standard library (and
Boost.Filesystem) to achieve the effects of the interfaces being
replaced.

We also insert direct calls to Posix function fnmatch() to preserve
existing pattern matching behaviour (well lists and well templates).
2019-10-14 06:13:38 -05:00
Bård Skaflestad
d84b7e19ee ESmry: Add Way of Retrieving Ministep Index at Start of Report Step
This commit introduces a new member function

    int ESmry::miniStepIdxAtReportStep(rptStep)

which returns the zero-based ministep corresponding to the start of
the given report step (one-based indexing).  This will simplify
decoupling a few unit tests from libecl.
2019-10-14 06:13:38 -05:00
Joakim Hove
59b73a0667 Change the python installation code
- Main cmake based python installation is based on small script install.py and
  not setup.py
- Python installation is guarded by cmake switch OPM_INSTALL_PYTHON
- Configure convenience shell script setup-install.sh for setup.py based
  installation.
- Remove PYTHONPATH hacks from setup.py
2019-10-14 13:13:09 +02:00
Atgeirr Flø Rasmussen
d4cfa5127f Merge pull request #1097 from akva2/enable_flow_variants
changed: build flow variants on jenkins
2019-10-14 12:59:30 +02:00
Steinar Foss
a089f9ff47 CMakeLists_files.cmake added unit_system to EMBEDDED_PYTHON. 2019-10-14 12:54:17 +02:00
Joakim Hove
87362c1336 Merge pull request #1095 from joakim-hove/inner-exc
Rephrased error message
2019-10-14 12:50:55 +02:00
Joakim Hove
635071d492 Merge pull request #1082 from bska/new-summary-writer
New summary writer
2019-10-14 12:25:44 +02:00
Joakim Hove
a47ffcc349 Remove index access to GridProperty<T> 2019-10-14 12:23:18 +02:00
Joakim Hove
2d4f941718 Merge pull request #1096 from akva2/janitoring
Some janitoring
2019-10-14 12:19:13 +02:00
Arne Morten Kvarving
9b44a8f5ce changed: build flow variants on jenkins 2019-10-14 11:06:42 +02:00
Arne Morten Kvarving
4e720c5d74 remove noop explicit template instantation after specialization 2019-10-14 08:54:05 +02:00
Arne Morten Kvarving
d98518c023 avoid returning uninitialized result if wrong indices are given 2019-10-14 08:53:44 +02:00
Arne Morten Kvarving
b0273485c7 remove unused assignment 2019-10-14 08:53:33 +02:00
Arne Morten Kvarving
463d9eb53d remove unused initialization 2019-10-14 08:53:12 +02:00
Arne Morten Kvarving
11462f7618 add missing initializer 2019-10-14 08:36:42 +02:00
Arne Morten Kvarving
73866b97f2 remove unused variable 2019-10-14 08:36:36 +02:00
Arne Morten Kvarving
8979fe25af remove unused function 2019-10-14 08:36:26 +02:00
Steinar Foss
a2a016951f python unit_system name. 2019-10-13 22:53:56 +02:00
Bård Skaflestad
2eb3a06024 Replace Writer for Summary/SMSPEC Files
This commit replaces the existing system for writing summary and
specification (SMSPEC) files with a new implementation based on
class EclOutput.  We package the evaluators of individual parameters
in a set of classes determined by the parameter's category which
each implement a virtual 'update()' function.  This update function
ultimately writes new values into a SummaryState object.

Add a factory-like system for instantiating the appropriate class
depending on a SummaryNode's 'category()'.  Also, add a helper class
for managing the parameters that a configured in a simulation
model's SUMMARY section in order to distinguish these from those
parameters that are merely needed for restart purposes.  The summary
class's 'eval()' function then becomes a loop over the evaluators
for parameters in SUMMARY followed by a loop over the evaluators for
restart vectors.

We reimplement the 'internal_store()' function in terms of an
std::vector of a helper structure 'MiniStep' which holds a ministep
ID (contiguous counter started at zero), a report step ID, and all
the evaluated parameters of this ministep.  The final write function
then consists of outputting those ministep structures that have
accumulated since the previous call to write().  If a simulation
does not call write at all, then this will accumulate all parameters
for all ministeps throughout the simulation history.

We create the SMSPEC file at most once, and write to it at most each
report step.  We create the summary file once (if unified) or at
each report step (if separate).
2019-10-12 20:21:17 -05:00
Bård Skaflestad
7d11a59197 SMSPEC: Temporarily Restore Unconditional RESTART Vector
Needed to ensure we create the same summary/specification files as
the existing system.  We will revert this change once the new system
is in place and we can afford to update the reference solutions.
2019-10-12 18:38:20 -05:00
Joakim Hove
8409c205ae Rephrased error message 2019-10-12 08:04:37 +02:00
Steinar Foss
a177d3b887 python/cxx/export.hpp: rearranged UnitSystem position. 2019-10-11 22:40:35 +02:00
Steinar Foss
c0bd19c59e python: added class UnitSystem. 2019-10-11 22:02:54 +02:00
Joakim Hove
a710e9b8b8 Add S keywords up to SURFST 2019-10-11 15:55:29 +02:00
801 changed files with 75829 additions and 15468 deletions

View File

@@ -9,9 +9,9 @@ option(ENABLE_ECL_INPUT "Enable eclipse input support?" ON)
option(ENABLE_ECL_OUTPUT "Enable eclipse output support?" ON)
option(ENABLE_MOCKSIM "Build the mock simulator for io testing" ON)
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
option(OPM_INSTALL_PYTHON "Enable python bindings?" OFF)
option(OPM_ENABLE_EMBEDDED_PYTHON "Enable python bindings?" OFF)
# Output implies input
if(ENABLE_ECL_OUTPUT)
set(ENABLE_ECL_INPUT ON)
@@ -110,7 +110,10 @@ macro (sources_hook)
include(GenerateKeywords.cmake)
# Append generated sources
list(APPEND opm-common_SOURCES ${PROJECT_BINARY_DIR}/ParserKeywords.cpp)
list(INSERT opm-common_SOURCES 0 ${PROJECT_BINARY_DIR}/ParserInit.cpp)
foreach (name A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
list(INSERT opm-common_SOURCES 0 ${PROJECT_BINARY_DIR}/ParserKeywords/${name}.cpp)
endforeach()
endif()
set_source_files_properties(src/opm/parser/eclipse/Python/Python.cpp
PROPERTIES COMPILE_FLAGS -Wno-shadow)
@@ -134,6 +137,21 @@ macro (install_hook)
PATTERN *.hpp)
endmacro (install_hook)
# If opm-common is configured to embed the python interpreter we must make sure
# that all downstream modules link libpython transitively. Due to the required
# integration with Python+cmake machinery provided by pybind11 this is done by
# manually adding to the opm-common_LIBRARIES variable here, and not in the
# OpmnLibMain function. Here only the library dependency is implemented, the
# bulk of the python configuration is further down in the file.
if (OPM_ENABLE_PYTHON)
find_package(PythonInterp REQUIRED)
if (OPM_ENABLE_EMBEDDED_PYTHON)
find_package(PythonLibs REQUIRED)
list(APPEND opm-common_LIBRARIES ${PYTHON_LIBRARY})
endif()
endif()
# all setup common to the OPM library modules is done here
include (OpmLibMain)
@@ -151,7 +169,8 @@ if (ENABLE_MOCKSIM)
foreach( test test_msim test_msim_ACTIONX )
opm_add_test(${test} SOURCES tests/msim/${test}.cpp
LIBRARIES ${_libs}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests
CONDITION HAVE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND)
endforeach()
endif()
@@ -167,7 +186,11 @@ if(ENABLE_ECL_INPUT)
test_util/convertECL.cpp
)
foreach(target compareECL convertECL)
add_executable(summary
test_util/summary.cpp
)
foreach(target compareECL convertECL summary)
target_link_libraries(${target} opmcommon)
install(TARGETS ${target} DESTINATION bin)
endforeach()
@@ -178,7 +201,7 @@ if(ENABLE_ECL_INPUT)
opm_add_test(test_EclFilesComparator
CONDITION
ENABLE_ECL_INPUT
ENABLE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND
SOURCES
tests/test_EclFilesComparator.cpp
test_util/EclFilesComparator.cpp
@@ -190,7 +213,7 @@ if(ENABLE_ECL_INPUT)
opm_add_test(test_EclRegressionTest
CONDITION
ENABLE_ECL_INPUT
ENABLE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND
SOURCES
tests/test_EclRegressionTest.cpp
test_util/EclFilesComparator.cpp
@@ -202,7 +225,7 @@ if(ENABLE_ECL_INPUT)
)
foreach(test test_EclIO test_EGrid test_ERft test_ERst test_ESmry)
opm_add_test(${test} CONDITION ENABLE_ECL_INPUT
opm_add_test(${test} CONDITION ENABLE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND
LIBRARIES ${_libs}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endforeach()
@@ -217,67 +240,94 @@ install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc)
if (OPM_ENABLE_PYTHON)
# -------------------------------------------------------------------------
# 1: Wrap C++ functionality in Python
find_package(PythonInterp REQUIRED)
include(FindPythonInterp)
make_directory(${CMAKE_BINARY_DIR}/python)
set(PYTHON_PACKAGE_PATH "site-packages")
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
make_directory(${PROJECT_BINARY_DIR}/python)
get_target_property(_opmcommon_include_dirs opmcommon INCLUDE_DIRECTORIES)
list(APPEND _opmcommon_include_dirs ${_ecl_include_dirs})
string(REPLACE ";" ":" _setup_include_dirs "${_opmcommon_include_dirs}")
set(_opmcommon_lib_dirs ${CMAKE_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/lib)
if (CMAKE_PREFIX_PATH)
set(_opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR})
else()
set(_opmcommon_lib_dirs ${PROJECT_BINARY_DIR}/lib)
endif()
string(REPLACE ";" ":" _setup_lib_dirs "${_opmcommon_lib_dirs}")
add_custom_command(OUTPUT python/python/opm/libopmcommon_python.so
DEPENDS
python/cxx/connection.cpp
python/cxx/converters.hpp
python/cxx/deck.cpp
python/cxx/deck_keyword.cpp
python/cxx/eclipse_3d_properties.cpp
python/cxx/eclipse_config.cpp
python/cxx/eclipse_grid.cpp
python/cxx/eclipse_state.cpp
python/cxx/group.cpp
python/cxx/log.cpp
python/cxx/parsecontext.cpp
python/cxx/parser.cpp
python/cxx/schedule.cpp
python/cxx/export.cpp
python/cxx/export.hpp
python/cxx/common_state.cpp
python/cxx/common_state.hpp
python/cxx/table_manager.cpp
python/cxx/well.cpp
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/python/ ${CMAKE_BINARY_DIR}/python
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python/setup.py
if (USE_RUNPATH)
set (_python_rpath_list)
if (CMAKE_PREFIX_PATH)
foreach(path ${CMAKE_PREFIX_PATH})
list(APPEND _python_rpath_list "${path}/${CMAKE_INSTALL_LIBDIR}")
endforeach()
endif()
if (BUILD_SHARED_LIBS)
list(APPEND _python_rpath_list "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
if (_python_rpath_list)
string(REPLACE ";" ":" _rpath "${_python_rpath_list}")
set( _rpath_arg "--rpath=${_rpath}")
else()
set(_rpath_arg "")
endif()
else()
set( _rpath_arg "")
endif()
execute_process(COMMAND ${PYTHON_EXECUTABLE} target_name.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python
OUTPUT_VARIABLE python_lib_target)
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/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=${CMAKE_BINARY_DIR}/python/python/opm
--build-lib=${PROJECT_BINARY_DIR}/python/python/opm
--library-dirs=${_setup_lib_dirs}
${_rpath_arg}
--include-dirs=${_setup_include_dirs}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/python
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
COMMENT "Building python bindings")
add_custom_target(opmcommon_python ALL DEPENDS python/python/opm/libopmcommon_python.so)
add_custom_target(opmcommon_python ALL DEPENDS python/python/opm/${python_lib_target})
add_dependencies(opmcommon_python opmcommon)
install( CODE "execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX} )" )
install( CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} python/setup.py build_ext --dry-run install --prefix=${CMAKE_INSTALL_PREFIX} )" )
# The install target is based on manually copying the python file tree to the
# installation area with a small installation script 'install.py'. Would have
# preferred to use standard setup.py install, but the setup.py based solution
# refuses to install to a location which the current python executable can not
# load from, and the use of eggs in the setup.py based installation makes
# debugging quite difficult.
#
# Since the installation of Python code is nonstandard it is protected by an
# extra cmake switch, OPM_INSTALL_PYTHON. If you prefer you can still invoke
# 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/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
# python library opmcommon_python will in general not find it runtime while
# testing.
add_test(NAME python_tests
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/python
COMMAND ${PYTHON_EXECUTABLE} setup.py build_ext --dry-run --build-lib ${CMAKE_BINARY_DIR}/python/python/opm test
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/python/opm test
)
set_target_properties(opmcommon PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/python/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
# building and testing of the Python extensions.
# building, testing and installation of the Python extensions.
configure_file(python/setup-build.sh.in tmp/setup-build.sh)
file( COPY ${PROJECT_BINARY_DIR}/tmp/setup-build.sh
DESTINATION ${PROJECT_BINARY_DIR}
@@ -288,6 +338,11 @@ if (OPM_ENABLE_PYTHON)
DESTINATION ${PROJECT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
configure_file(python/setup-install.sh.in tmp/setup-install.sh)
file( COPY ${PROJECT_BINARY_DIR}/tmp/setup-install.sh
DESTINATION ${PROJECT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
configure_file(python/enable-python.sh.in enable-python.sh)
# -------------------------------------------------------------------------

View File

@@ -30,6 +30,8 @@ list (APPEND MAIN_SOURCE_FILES
src/opm/common/OpmLog/OpmLog.cpp
src/opm/common/OpmLog/StreamLog.cpp
src/opm/common/OpmLog/TimerLog.cpp
src/opm/common/utility/ActiveGridCells.cpp
src/opm/common/utility/FileSystem.cpp
src/opm/common/utility/numeric/MonotCubicInterpolator.cpp
src/opm/common/utility/parameters/Parameter.cpp
src/opm/common/utility/parameters/ParameterGroup.cpp
@@ -46,18 +48,20 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/Deck/DeckKeyword.cpp
src/opm/parser/eclipse/Deck/DeckRecord.cpp
src/opm/parser/eclipse/Deck/DeckOutput.cpp
src/opm/parser/eclipse/Deck/Section.cpp
src/opm/parser/eclipse/Deck/DeckSection.cpp
src/opm/parser/eclipse/Deck/UDAValue.cpp
src/opm/parser/eclipse/Python/Python.cpp
src/opm/parser/eclipse/EclipseState/AquiferConfig.cpp
src/opm/parser/eclipse/EclipseState/AquiferCT.cpp
src/opm/parser/eclipse/EclipseState/Aquifetp.cpp
src/opm/parser/eclipse/EclipseState/Aquancon.cpp
src/opm/parser/eclipse/EclipseState/checkDeck.cpp
src/opm/parser/eclipse/EclipseState/Eclipse3DProperties.cpp
src/opm/parser/eclipse/EclipseState/EclipseConfig.cpp
src/opm/parser/eclipse/EclipseState/EclipseState.cpp
src/opm/parser/eclipse/EclipseState/EndpointScaling.cpp
src/opm/parser/eclipse/EclipseState/Edit/EDITNNC.cpp
src/opm/parser/eclipse/EclipseState/Grid/FieldProps.cpp
src/opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.cpp
src/opm/parser/eclipse/EclipseState/Grid/Box.cpp
src/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp
src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp
@@ -66,10 +70,9 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/EclipseState/Grid/Fault.cpp
src/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridProperties.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridProperty.cpp
src/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp
src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp
src/opm/parser/eclipse/EclipseState/Grid/Operate.cpp
src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp
src/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp
src/opm/parser/eclipse/EclipseState/Grid/setKeywordBox.cpp
@@ -90,28 +93,34 @@ 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/PyAction.cpp
src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Group/Group2.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
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateModel.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Group/GConSump.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/injection.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MessageLimits.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MSW/icd.cpp
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/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/OilVaporizationProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.cpp
src/opm/parser/eclipse/EclipseState/Schedule/SummaryState.cpp
src/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/Connection.cpp
src/opm/parser/eclipse/EclipseState/Schedule/eval_uda.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/Well2.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WList.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.cpp
@@ -119,18 +128,23 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellFoamProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellPolymerProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellBrineProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTracerProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp
src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp
src/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp
src/opm/parser/eclipse/EclipseState/Tables/DenT.cpp
src/opm/parser/eclipse/EclipseState/Tables/JFunc.cpp
src/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/PolyInjTables.cpp
src/opm/parser/eclipse/EclipseState/Tables/StandardCond.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp
@@ -139,6 +153,9 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
src/opm/parser/eclipse/EclipseState/Tables/Rock2dTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.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
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParser.cpp
@@ -170,31 +187,43 @@ if(ENABLE_ECL_INPUT)
src/opm/parser/eclipse/Utility/Stringview.cpp
)
if (OPM_ENABLE_EMBEDDED_PYTHON)
list( APPEND PYTHON_SOURCE_FILES
src/opm/parser/eclipse/Python/PythonInterp.cpp
# This list is only used to register a CMake dependency between the the python
# extension and the corresponding C++ wrapper files. The cpp files actually
# listed here are repeated in the actual definition of the extension in the
# setup.py file.
list( APPEND PYTHON_CXX_SOURCE_FILES
python/cxx/connection.cpp
python/cxx/converters.cpp
python/cxx/deck.cpp
python/cxx/deck_keyword.cpp
python/cxx/eclipse_3d_properties.cpp
python/cxx/eclipse_io.cpp
python/cxx/field_props.cpp
python/cxx/eclipse_config.cpp
python/cxx/eclipse_grid.cpp
python/cxx/eclipse_state.cpp
python/cxx/export.cpp
python/cxx/group.cpp
python/cxx/log.cpp
python/cxx/parsecontext.cpp
python/cxx/parser.cpp
python/cxx/schedule.cpp
python/cxx/export.cpp
python/cxx/common_state.cpp
python/cxx/summary_state.cpp
python/cxx/table_manager.cpp
python/cxx/unit_system.cpp
python/cxx/well.cpp
python/cxx/log.cpp
)
set_source_files_properties(${PYTHON_SOURCE_FILES} PROPERTIES COMPILE_FLAGS -Wno-shadow)
list( APPEND MAIN_SOURCE_FILES ${PYTHON_SOURCE_FILES})
if (OPM_ENABLE_EMBEDDED_PYTHON)
set_source_files_properties(${PYTHON_CXX_SOURCE_FILES} PROPERTIES COMPILE_FLAGS -Wno-shadow)
set_source_files_properties(src/opm/parser/eclipse/Python/PythonInterp.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
set_source_files_properties(src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
list( APPEND MAIN_SOURCE_FILES src/opm/parser/eclipse/Python/PythonInterp.cpp ${PYTHON_CXX_SOURCE_FILES})
endif()
list( APPEND PYTHON_CXX_DEPENDS ${PYTHON_CXX_SOURCE_FILES}
python/cxx/converters.hpp
python/cxx/export.hpp)
if(NOT cjson_FOUND)
list(APPEND MAIN_SOURCE_FILES external/cjson/cJSON.c)
@@ -210,11 +239,19 @@ if(ENABLE_ECL_OUTPUT)
src/opm/io/eclipse/ERst.cpp
src/opm/io/eclipse/ESmry.cpp
src/opm/io/eclipse/OutputStream.cpp
src/opm/io/eclipse/rst/connection.cpp
src/opm/io/eclipse/rst/group.cpp
src/opm/io/eclipse/rst/header.cpp
src/opm/io/eclipse/rst/segment.cpp
src/opm/io/eclipse/rst/state.cpp
src/opm/io/eclipse/rst/well.cpp
src/opm/output/eclipse/AggregateActionxData.cpp
src/opm/output/eclipse/AggregateConnectionData.cpp
src/opm/output/eclipse/AggregateGroupData.cpp
src/opm/output/eclipse/AggregateMSWData.cpp
src/opm/output/eclipse/AggregateUDQData.cpp
src/opm/output/eclipse/AggregateWellData.cpp
src/opm/output/eclipse/CreateActionxDims.cpp
src/opm/output/eclipse/CreateDoubHead.cpp
src/opm/output/eclipse/CreateInteHead.cpp
src/opm/output/eclipse/CreateLogiHead.cpp
@@ -238,6 +275,7 @@ if(ENABLE_ECL_OUTPUT)
endif()
list (APPEND TEST_SOURCE_FILES
tests/test_ActiveGridCells.cpp
tests/test_calculateCellVol.cpp
tests/test_cmp.cpp
tests/test_cubic.cpp
@@ -245,6 +283,7 @@ list (APPEND TEST_SOURCE_FILES
tests/test_nonuniformtablelinear.cpp
tests/test_OpmLog.cpp
tests/test_param.cpp
tests/test_RootFinders.cpp
tests/test_SimulationDataContainer.cpp
tests/test_sparsevector.cpp
tests/test_uniformtablelinear.cpp
@@ -253,10 +292,7 @@ if(ENABLE_ECL_INPUT)
list(APPEND TEST_SOURCE_FILES
tests/parser/ACTIONX.cpp
tests/parser/ADDREGTests.cpp
tests/parser/AquiferCTTests.cpp
tests/parser/AquifetpTests.cpp
tests/parser/AqudimsTests.cpp
tests/parser/AquanconTests.cpp
tests/parser/AquiferTests.cpp
tests/parser/BoxTests.cpp
tests/parser/ColumnSchemaTests.cpp
tests/parser/ConnectionTests.cpp
@@ -266,17 +302,16 @@ if(ENABLE_ECL_INPUT)
tests/parser/DeckTests.cpp
tests/parser/DynamicStateTests.cpp
tests/parser/DynamicVectorTests.cpp
tests/parser/Eclipse3DPropertiesTests.cpp
tests/parser/EclipseGridTests.cpp
tests/parser/EmbeddedPython.cpp
tests/parser/EqualRegTests.cpp
tests/parser/EventTests.cpp
tests/parser/FaceDirTests.cpp
tests/parser/FaultTests.cpp
tests/parser/FieldPropsTests.cpp
tests/parser/FoamTests.cpp
tests/parser/FunctionalTests.cpp
tests/parser/GeomodifierTests.cpp
tests/parser/GridPropertyTests.cpp
tests/parser/GroupTests.cpp
tests/parser/InitConfigTest.cpp
tests/parser/IOConfigTests.cpp
@@ -289,13 +324,14 @@ if(ENABLE_ECL_INPUT)
tests/parser/ParseContext_EXIT1.cpp
tests/parser/ParseDATAWithDefault.cpp
tests/parser/PYACTION.cpp
tests/parser/PORVTests.cpp
tests/parser/RawKeywordTests.cpp
tests/parser/ResinsightTest.cpp
tests/parser/RestartConfigTests.cpp
tests/parser/RFTConfigTests.cpp
tests/parser/RockTableTests.cpp
tests/parser/RunspecTests.cpp
tests/parser/SatfuncPropertyInitializersTests.cpp
tests/parser/SaltTableTests.cpp
tests/parser/ScheduleRestartTests.cpp
tests/parser/ScheduleTests.cpp
tests/parser/SectionTests.cpp
tests/parser/SimpleTableTests.cpp
@@ -323,6 +359,7 @@ if(ENABLE_ECL_INPUT)
endif()
if(ENABLE_ECL_OUTPUT)
list (APPEND TEST_SOURCE_FILES
tests/test_AggregateActionxData.cpp
tests/test_AggregateWellData.cpp
tests/test_AggregateGroupData.cpp
tests/test_AggregateMSWData.cpp
@@ -339,6 +376,7 @@ if(ENABLE_ECL_OUTPUT)
tests/test_PaddedOutputString.cpp
tests/test_Restart.cpp
tests/test_RFT.cpp
tests/test_rst.cpp
tests/test_Solution.cpp
tests/test_Summary.cpp
tests/test_Tables.cpp
@@ -355,8 +393,9 @@ if(ENABLE_ECL_OUTPUT)
list (APPEND TEST_DATA_FILES
tests/expect-wdims.chldg.err.out
tests/expect-wdims.err.out
tests/FIRST_SIM.DATA
tests/FIRST_SIM_THPRES.DATA
tests/BASE_SIM.DATA
tests/BASE_SIM_THPRES.DATA
tests/RESTART_SIM.DATA
tests/summary_deck.DATA
tests/group_group.DATA
tests/testblackoilstate3.DATA
@@ -370,6 +409,15 @@ if(ENABLE_ECL_OUTPUT)
tests/SPE9_CP_PACKED.DATA
tests/SOFR_TEST.DATA
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
tests/UDQ_ACTIONX_TEST1.DATA
tests/include_example_pvt.txt
tests/include_example_summary.txt
tests/include_sgof.txt
tests/include_swof.txt
tests/include_grid_3x5x4.grdecl
tests/SPE1CASE2.DATA
tests/SPE1CASE2_RESTART.DATA
tests/SPE1CASE2.X0060
)
endif()
@@ -394,6 +442,7 @@ if(ENABLE_ECL_INPUT)
examples/opmi.cpp
examples/opmpack.cpp
examples/opmhash.cpp
tests/rst_load.cpp
)
endif()
@@ -420,9 +469,12 @@ list( APPEND PUBLIC_HEADER_FILES
opm/common/OpmLog/LogUtil.hpp
opm/common/OpmLog/MessageFormatter.hpp
opm/common/OpmLog/MessageLimiter.hpp
opm/common/OpmLog/Location.hpp
opm/common/OpmLog/OpmLog.hpp
opm/common/OpmLog/StreamLog.hpp
opm/common/OpmLog/TimerLog.hpp
opm/common/utility/ActiveGridCells.hpp
opm/common/utility/FileSystem.hpp
opm/common/utility/numeric/cmp.hpp
opm/common/utility/platform_dependent/disable_warnings.h
opm/common/utility/platform_dependent/reenable_warnings.h
@@ -475,23 +527,23 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp
opm/parser/eclipse/EclipseState/Grid/GridDims.hpp
opm/parser/eclipse/EclipseState/Grid/TransMult.hpp
opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp
opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp
opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp
opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp
opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp
opm/parser/eclipse/EclipseState/Grid/Fault.hpp
opm/parser/eclipse/EclipseState/Grid/Box.hpp
opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp
opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp
opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp
opm/parser/eclipse/EclipseState/Grid/NNC.hpp
opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp
opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp
opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp
opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp
opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp
opm/parser/eclipse/EclipseState/EndpointScaling.hpp
opm/parser/eclipse/EclipseState/Tables/DenT.hpp
opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp
opm/parser/eclipse/EclipseState/Tables/StandardCond.hpp
opm/parser/eclipse/EclipseState/Tables/PolyInjTable.hpp
opm/parser/eclipse/EclipseState/Tables/PdvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp
@@ -501,6 +553,10 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Tables/Regdims.hpp
opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp
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/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
@@ -561,15 +617,19 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/EclipseState.hpp
opm/parser/eclipse/EclipseState/EclipseConfig.hpp
opm/parser/eclipse/EclipseState/Aquancon.hpp
opm/parser/eclipse/EclipseState/AquiferConfig.hpp
opm/parser/eclipse/EclipseState/AquiferCT.hpp
opm/parser/eclipse/EclipseState/Aquifetp.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/Actdims.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp
opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp
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/ArrayDimChecker.hpp
opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp
opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp
@@ -577,11 +637,12 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/ProductionControls.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/InjectionControls.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/Well2.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WList.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellEconProductionLimits.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellFoamProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellBrineProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellInjectionProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellPolymerProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.hpp
@@ -593,26 +654,36 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp
opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp
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/GTNode.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/Group2.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/GConSale.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/GConSump.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.hpp
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateModel.hpp
opm/parser/eclipse/EclipseState/Schedule/MessageLimits.hpp
opm/parser/eclipse/EclipseState/Schedule/Events.hpp
opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp
opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp
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/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
opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp
opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp
opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp
opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp
opm/parser/eclipse/EclipseState/checkDeck.hpp
opm/parser/eclipse/EclipseState/Runspec.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.hpp
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp
@@ -625,12 +696,13 @@ if(ENABLE_ECL_INPUT)
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp
opm/parser/eclipse/Deck/DeckItem.hpp
opm/parser/eclipse/Deck/Deck.hpp
opm/parser/eclipse/Deck/Section.hpp
opm/parser/eclipse/Deck/DeckSection.hpp
opm/parser/eclipse/Deck/DeckOutput.hpp
opm/parser/eclipse/Deck/DeckValue.hpp
opm/parser/eclipse/Deck/DeckKeyword.hpp
opm/parser/eclipse/Deck/DeckRecord.hpp
opm/parser/eclipse/Deck/UDAValue.hpp
opm/parser/eclipse/Deck/value_status.hpp
opm/parser/eclipse/Python/Python.hpp)
endif()
if(ENABLE_ECL_OUTPUT)
@@ -645,9 +717,17 @@ if(ENABLE_ECL_OUTPUT)
opm/io/eclipse/ESmry.hpp
opm/io/eclipse/PaddedOutputString.hpp
opm/io/eclipse/OutputStream.hpp
opm/io/eclipse/rst/connection.hpp
opm/io/eclipse/rst/group.hpp
opm/io/eclipse/rst/header.hpp
opm/io/eclipse/rst/segment.hpp
opm/io/eclipse/rst/state.hpp
opm/io/eclipse/rst/well.hpp
opm/output/data/Aquifer.hpp
opm/output/data/Cells.hpp
opm/output/data/Solution.hpp
opm/output/data/Wells.hpp
opm/output/eclipse/VectorItems/aquifer.hpp
opm/output/eclipse/VectorItems/connection.hpp
opm/output/eclipse/VectorItems/group.hpp
opm/output/eclipse/VectorItems/intehead.hpp
@@ -655,6 +735,7 @@ if(ENABLE_ECL_OUTPUT)
opm/output/eclipse/VectorItems/msw.hpp
opm/output/eclipse/VectorItems/tabdims.hpp
opm/output/eclipse/VectorItems/well.hpp
opm/output/eclipse/AggregateActionxData.hpp
opm/output/eclipse/AggregateGroupData.hpp
opm/output/eclipse/AggregateConnectionData.hpp
opm/output/eclipse/AggregateMSWData.hpp

View File

@@ -1,14 +1,10 @@
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${BASE_DIR}/tmp_gen/ParserKeywords.cpp
${BASE_DIR}/ParserKeywords.cpp)
${BASE_DIR}/tmp_gen/ParserInit.cpp
${BASE_DIR}/ParserInit.cpp)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${BASE_DIR}/tmp_gen/inlinekw.cpp
${BASE_DIR}/inlinekw.cpp)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${BASE_DIR}/tmp_gen/include/opm/parser/eclipse/Parser/ParserKeywords.hpp
${BASE_DIR}/include/opm/parser/eclipse/Parser/ParserKeywords.hpp)
${BASE_DIR}/tmp_gen/TestKeywords.cpp
${BASE_DIR}/TestKeywords.cpp)
file(GLOB HDRS ${BASE_DIR}/tmp_gen/include/opm/parser/eclipse/Parser/ParserKeywords/*.hpp)
@@ -18,4 +14,11 @@ foreach(HDR ${HDRS})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${HDR}
${BASE_DIR}/include/opm/parser/eclipse/Parser/ParserKeywords/${hdr})
endforeach()
foreach (name A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${BASE_DIR}/tmp_gen/ParserKeywords/${name}.cpp
${BASE_DIR}/ParserKeywords/${name}.cpp)
endforeach()

View File

@@ -2,24 +2,19 @@
set(TEST_LIBS opmcommon Boost::unit_test_framework)
set(EXTRA_TESTS)
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
# Generated source, needs to be here
opm_add_test(InlineKeywordTest
EXE_NAME inlinekw
SOURCES ${PROJECT_BINARY_DIR}/inlinekw.cpp
EXE_NAME TestKeywords
SOURCES ${PROJECT_BINARY_DIR}/TestKeywords.cpp
LIBRARIES ${TEST_LIBS})
list(APPEND EXTRA_TESTS inlinekw)
list(APPEND EXTRA_TESTS TestKeywords)
# Extra compile definitions and extra parameters
include(cmake/Modules/CheckCaseSensitiveFileSystem.cmake)
set(_testdir ${PROJECT_SOURCE_DIR}/tests/parser/data)
opm_add_test(LoaderTest
SOURCES tests/parser/KeywordLoaderTests.cpp
src/opm/parser/eclipse/Generator/KeywordLoader.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/parser/keyword-generator/)
list(APPEND EXTRA_TESTS LoaderTest)
opm_add_test(ParserTests
SOURCES tests/parser/ParserTests.cpp
LIBRARIES ${TEST_LIBS}
@@ -90,7 +85,18 @@ if(HAVE_OPM_TESTS)
${OPM_TESTS_ROOT}/spe9/SPE9.DATA
${OPM_TESTS_ROOT}/spe10model1/SPE10_MODEL1.DATA
${OPM_TESTS_ROOT}/spe10model2/SPE10_MODEL2.DATA
${OPM_TESTS_ROOT}/msw_2d_h/2D_H__.DATA )
${OPM_TESTS_ROOT}/msw_2d_h/2D_H__.DATA
${OPM_TESTS_ROOT}/model2/0_BASE_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/1_MULTREGT_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/2_MULTXYZ_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/3_MULTFLT_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/4_MINPVV_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/5_SWATINIT_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/6_ENDSCALE_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/7_HYSTERESIS_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/8_MULTIPLY_TRANXYZ_MODEL2.DATA
${OPM_TESTS_ROOT}/model2/9_EDITNNC_MODEL2.DATA)
get_filename_component(test_name ${deck} NAME_WE)
opm_add_test(${test_name} NO_COMPILE
EXE_NAME parse_write
@@ -99,6 +105,8 @@ if(HAVE_OPM_TESTS)
opm_add_test("SPE9_CP_GROUP2" NO_COMPILE EXE_NAME parse_write TEST_ARGS "${OPM_TESTS_ROOT}/spe9group/SPE9_CP_GROUP.DATA")
set_property(TEST NORNE_ATW2013
PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH")
opm_add_test("RST_LOAD_MSW" NO_COMPILE EXE_NAME rst_load TEST_ARGS "${OPM_TESTS_ROOT}/msw_3d_hfa/opm-simulation-reference/flow/3D_MSW.UNRST")
endif()
# JSON tests
@@ -107,3 +115,5 @@ opm_add_test(jsonTests
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${PROJECT_SOURCE_DIR}/tests/json/example1.json)
list(APPEND EXTRA_TESTS jsonTests)
endif()

View File

@@ -32,7 +32,7 @@ if(NOT cjson_FOUND)
endif()
add_executable(genkw ${genkw_SOURCES})
target_link_libraries(genkw Boost::regex Boost::filesystem Boost::system)
target_link_libraries(genkw ${opm-common_LIBRARIES})
# Generate keyword list
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
@@ -40,18 +40,74 @@ string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/src/opm/parser/eclipse/sha
configure_file(src/opm/parser/eclipse/keyword_list.argv.in keyword_list.argv)
# Generate keyword source
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords.cpp ${PROJECT_BINARY_DIR}/tmp_gen/inlinekw.cpp
COMMAND genkw keyword_list.argv
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords.cpp
add_custom_command( OUTPUT
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/A.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/B.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/C.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/D.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/E.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/F.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/G.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/H.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/I.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/J.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/K.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/L.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/M.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/N.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/O.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/P.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/Q.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/R.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/S.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/T.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/U.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/V.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/W.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/X.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/Y.cpp
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/Z.cpp
${PROJECT_BINARY_DIR}/tmp_gen/TestKeywords.cpp
COMMAND genkw keyword_list.argv
${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords
${PROJECT_BINARY_DIR}/tmp_gen/ParserInit.cpp
${PROJECT_BINARY_DIR}/tmp_gen/include/
opm/parser/eclipse/Parser/ParserKeywords
${PROJECT_BINARY_DIR}/tmp_gen/inlinekw.cpp
${PROJECT_BINARY_DIR}/tmp_gen/TestKeywords.cpp
DEPENDS genkw ${keyword_files} src/opm/parser/eclipse/share/keywords/keyword_list.cmake
)
# To avoid some rebuilds
add_custom_command(OUTPUT ParserKeywords.cpp inlinekw.cpp
DEPENDS ${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords.cpp
add_custom_command(OUTPUT
${PROJECT_BINARY_DIR}/ParserKeywords/A.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/B.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/C.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/D.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/E.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/F.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/G.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/H.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/I.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/J.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/K.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/L.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/M.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/N.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/O.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/P.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/Q.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/R.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/S.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/T.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/U.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/V.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/W.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/X.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/Y.cpp
${PROJECT_BINARY_DIR}/ParserKeywords/Z.cpp
${PROJECT_BINARY_DIR}/TestKeywords.cpp
${PROJECT_BINARY_DIR}/ParserInit.cpp
DEPENDS ${PROJECT_BINARY_DIR}/tmp_gen/ParserKeywords/A.cpp
COMMAND ${CMAKE_COMMAND} -DBASE_DIR=${PROJECT_BINARY_DIR}
-P ${PROJECT_SOURCE_DIR}/CopyHeaders.cmake)

View File

@@ -1,468 +0,0 @@
#
# Module that checks for supported C++11 (former C++0x) features.
#
# Sets the follwing variable:
#
# HAVE_FINAL True if the compiler supports the "final" quantifier
# HAVE_TYPE_TRAITS True if the <type_traits> header is available and implements sufficient functionality
# HAVE_SHARED_PTR True if std::shared_ptr is available
# HAVE_UNIQUE_PTR True if std::unique_ptr is available
# HAVE_NULLPTR True if nullptr is available
# HAVE_ARRAY True if header <array> and fill() are available
# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported
# HAS_ATTRIBUTE_UNUSED True if attribute unused is supported
# HAS_ATTRIBUTE_DEPRECATED True if attribute deprecated is supported
# HAS_ATTRIBUTE_DEPRECATED_MSG True if attribute deprecated("msg") is supported
# HAVE_CONSTEXPR True if constexpr attribute is available
# HAVE_INTEGRAL_CONSTANT True if compiler supports integral_constant
# HAVE_STATIC_ASSERT True if static_assert is available
# HAVE_AUTO True if the compiler supports the auto keyword
# HAVE_VARIADIC_TEMPLATES True if variadic templates are supported
# HAVE_VARIADIC_CONSTRUCTOR_SFINAE True if variadic constructor sfinae is supported
# HAVE_RVALUE_REFERENCES True if rvalue references are supported
# HAVE_TUPLE True if std::tuple is available
# HAVE_TR1_TUPLE True if std::tr1::tuple is available
include(CheckCXXSourceCompiles)
include(CheckCXXSourceRuns)
# test for C++11 flags
include(TestCXXAcceptsFlag)
include(CheckIncludeFileCXX)
# macro to only add option once
include(AddOptions)
# Force CXX Standard cross platfrom for CMakeVersion >=3.1
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
if(NOT MSVC)
foreach(_flag "14" "11")
set(_FLAG "CXX_FLAG_CXX${_flag}")
string(TOUPPER ${_FLAG} _FLAG)
# try to use compiler flag -std=c++${_flag}
CHECK_CXX_ACCEPTS_FLAG("-std=c++${_flag}" ${_FLAG})
if(${_FLAG})
if(CMAKE_VERSION VERSION_LESS 3.1)
add_options (CXX ALL_BUILDS "-std=c++${_flag}")
endif()
set(CXX_STD0X_FLAGS "-std=c++${_flag}")
#Use vriables for CMake > 3.1 set the standard with no extensions
set(CMAKE_CXX_STANDARD ${_flag})
break()
endif()
endforeach()
endif(NOT MSVC)
endif()
if(CMAKE_VERSION VERSION_LESS 3.1)
# if we are building with an Apple toolchain in MacOS X,
# we cannot use the old GCC 4.2 fork, but must use the
# new runtime library
set (CXX_STDLIB_FLAGS)
string (TOUPPER "${CMAKE_CXX_COMPILER_ID}" _comp_id)
if (APPLE AND (_comp_id MATCHES "CLANG"))
CHECK_CXX_ACCEPTS_FLAG ("-stdlib=libc++" CXX_FLAG_STDLIB_LIBCXX)
if (CXX_FLAG_STDLIB_LIBCXX)
add_options (CXX ALL_BUILDS "-stdlib=libc++")
set (CXX_STDLIB_FLAGS "-stdlib=libc++")
endif (CXX_FLAG_STDLIB_LIBCXX)
endif (APPLE AND (_comp_id MATCHES "CLANG"))
# to format the command-line options pretty, we have an optional space
if (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS)
set (CXX_SPACE " ")
else (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS)
set (CXX_SPACE)
endif (CXX_STD0X_FLAGS AND CXX_STDLIB_FLAGS)
endif()
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
# Workaround bug in cmake:
# cxx standard flags are not applied in CheckCXXSourceCompiles
if (CMAKE_CXX_STANDARD EQUAL 14)
add_options(CXX ALL_BUILDS ${CMAKE_CXX14_STANDARD_COMPILE_OPTION})
else()
add_options(CXX ALL_BUILDS ${CMAKE_CXX11_STANDARD_COMPILE_OPTION})
endif()
endif()
# perform tests
include(CheckCXXSourceCompiles)
# the "final" method specifier
CHECK_CXX_SOURCE_COMPILES("
struct Base {
virtual void foo() = 0;
};
struct Derived : public Base {
virtual void foo() final {};
};
int main()
{
return 0;
}
" HAVE_FINAL
)
# std::is_convertible, std::is_base_of
CHECK_CXX_SOURCE_COMPILES("
#include <type_traits>
class Base {};
class Derived : public Base {};
int main()
{
bool foo = std::is_convertible<int, double>::value;
bool bar = std::is_base_of<Base, Derived>::value;
bool foobar = std::is_integral<double>::value;
return 0;
}
" HAVE_TYPE_TRAITS
)
# nullptr
CHECK_CXX_SOURCE_COMPILES("
#include <memory>
int main(void)
{
std::shared_ptr<int> foo(new int(123));
return 0;
}
" HAVE_SHARED_PTR
)
# this is required by dune-common to avoid linker errors. "fun"!
if (HAVE_SHARED_PTR)
set(HAVE_MAKE_SHARED 1)
set(SHARED_PTR_HEADER "<memory>")
set(SHARED_PTR_NAMESPACE "std")
endif()
# nullptr
CHECK_CXX_SOURCE_COMPILES("
#include <memory>
int main(void)
{
std::unique_ptr<int> foo(new int(123));
return 0;
}
" HAVE_UNIQUE_PTR
)
# nullptr
CHECK_CXX_SOURCE_COMPILES("
int main(void)
{
char* ch = nullptr;
return 0;
}
" HAVE_NULLPTR
)
# constexpr
CHECK_CXX_SOURCE_COMPILES("
template <class T>
inline constexpr int foo(T bar) { return bar*2; }
int main(void)
{
constexpr int foobar = foo(100);
return 0;
}
" HAVE_CONSTEXPR
)
# array and fill
CHECK_CXX_SOURCE_COMPILES("
#include <array>
int main(void)
{
std::array<int,2> a;
a.fill(9);
return 0;
}
" HAVE_ARRAY
)
# Check whether if std::integral_constant< T, v > is supported and casts into T
CHECK_CXX_SOURCE_COMPILES("
#include <type_traits>
void f( int ){}
int main(void){
f( std::integral_constant< int, 42 >() );
}
" HAVE_INTEGRAL_CONSTANT
)
# Check whether if <tuple> is available
check_include_file_cxx("tuple" HAVE_TUPLE)
# Check whether if <tr1/tuple> is available
check_include_file_cxx("tr1/tuple" HAVE_TR1_TUPLE)
# __attribute__((always_inline))
CHECK_CXX_SOURCE_COMPILES("
void __attribute__((always_inline)) foo(void) {}
int main(void)
{
foo();
return 0;
};
" HAVE_ATTRIBUTE_ALWAYS_INLINE
)
# __attribute__((unused))
CHECK_CXX_SOURCE_COMPILES("
int main(void)
{
int __attribute__((unused)) foo;
return 0;
};
" HAS_ATTRIBUTE_UNUSED
)
# __attribute__((deprecated))
CHECK_CXX_SOURCE_COMPILES("
#define DEP __attribute__((deprecated))
class bar
{
bar() DEP;
};
class peng { } DEP;
template <class T>
class t_bar
{
t_bar() DEP;
};
template <class T>
class t_peng {
t_peng() {};
} DEP;
void foo() DEP;
void foo() {};
int main(void)
{
return 0;
};
" HAS_ATTRIBUTE_DEPRECATED
)
# __attribute__((deprecated("msg")))
CHECK_CXX_SOURCE_COMPILES("
#define DEP __attribute__((deprecated(\"message\")))
class bar {
bar() DEP;
};
class peng { } DEP;
template <class T>
class t_bar
{
t_bar() DEP;
};
template <class T>
class t_peng
{
t_peng() {};
} DEP;
void foo() DEP;
void foo() {};
int main(void)
{
return 0;
};
" HAS_ATTRIBUTE_DEPRECATED_MSG
)
# static assert
CHECK_CXX_SOURCE_COMPILES("
int main(void)
{
static_assert(true,\"MSG\");
return 0;
}
" HAVE_STATIC_ASSERT
)
# auto keyword
CHECK_CXX_SOURCE_COMPILES("
int main(void)
{
auto foo = 1.23;
return 0;
}
" HAVE_AUTO
)
# variadic template support
CHECK_CXX_SOURCE_COMPILES("
#include <cassert>
template<typename... T>
int addints(T... x);
int add_ints()
{
return 0;
}
template<typename T1, typename... T>
int add_ints(T1 t1, T... t)
{
return t1 + add_ints(t...);
}
int main(void)
{
assert( 5 == add_ints(9,3,-5,-2) );
return 0;
}
" HAVE_VARIADIC_TEMPLATES
)
# SFINAE on variadic template constructors within template classes
CHECK_CXX_SOURCE_COMPILES("
#include <functional>
template<typename... U>
struct A
{
template<typename... T,
typename = typename std::enable_if<(sizeof...(T) < 2)>::type
>
A(T... t)
: i(1)
{}
template<typename... T,
typename = typename std::enable_if<(sizeof...(T) >= 2)>::type,
typename = void
>
A(T... t)
: i(-1)
{}
A()
: i(1)
{}
int i;
};
int main(void)
{
return (A<int>().i + A<int>(2).i + A<int>(\"foo\",3.4).i + A<int>(8,'a',A<int>()).i == 0 ? 0 : 1);
}
" HAVE_VARIADIC_CONSTRUCTOR_SFINAE
)
# rvalue references
CHECK_CXX_SOURCE_COMPILES("
#include <cassert>
#include <utility>
int foo(int&& x) { return 1; }
int foo(const int& x) { return -1; }
template<typename T>
int forward(T&& x)
{
return foo(std::forward<T>(x));
}
int main(void)
{
int i = 0;
assert( forward(i) + forward(int(2)) == 0);
return 0;
}
" HAVE_RVALUE_REFERENCES
)
include(CheckIncludeFile)
include(CheckIncludeFileCXX)
# Search for some tr1 headers
foreach(_HEADER tuple tr1/tuple type_traits tr1/type_traits)
string(REPLACE "/" "_" _HEADER_VAR ${_HEADER})
string(TOUPPER ${_HEADER_VAR} _HEADER_VAR )
check_include_file_cxx(${_HEADER} "HAVE_${_HEADER_VAR}")
endforeach(_HEADER tuple tr1/tuple tr1/type_traits)
# make sure that the C++-11 features implemented by the compiler are a
# superset of those provided by GCC 4.4. This makes the test fail on
# all GCC compilers before 4.4.
set(CXX_FEATURES_MISSING "")
if (NOT HAVE_TYPE_TRAITS)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Sufficiently conformant type traits (defined by the 'type_traits' header file)\n")
endif()
if (NOT HAVE_SHARED_PTR)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Shared pointers (the std::shared_ptr class)\n")
endif()
if (NOT HAVE_UNIQUE_PTR)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Unique pointers (the std::unique_ptr class)\n")
endif()
if (NOT HAVE_ARRAY)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Statically sized arrays (the std::array class)\n")
endif()
if (NOT HAVE_STATIC_ASSERT)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Static assertations (the static_assert() mechanism)\n")
endif()
if (NOT HAVE_AUTO)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Automatically typed variables (the 'auto' keyword)\n")
endif()
if (NOT HAVE_VARIADIC_TEMPLATES)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Variable number of template arguments\n")
endif()
if (NOT HAVE_VARIADIC_CONSTRUCTOR_SFINAE)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Constructors with variable number of template arguments obeying the SFINAE (specialization failure is not an error) rule\n")
endif()
if (NOT HAVE_RVALUE_REFERENCES)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - References to rvalue objects\n")
endif()
if (NOT HAVE_TUPLE)
set(CXX_FEATURES_MISSING
"${CXX_FEATURES_MISSING} - Tuples (the std::tuple class)\n")
endif()
if(CXX_FEATURES_MISSING)
set (CXX11FEATURES_FOUND FALSE)
if (CXX11Features_FIND_REQUIRED)
message(FATAL_ERROR
"Your C++ compiler does not support the minimum set of C++-2011 features required. "
"Make sure to use a compiler which implements all C++-2011 features provided by GCC 4.4. "
"Your compiler does not seem to implement the following features:\n"
"${CXX_FEATURES_MISSING}")
endif()
else ()
set (CXX11FEATURES_FOUND TRUE)
endif()

View File

@@ -20,8 +20,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features REQUIRED;
dune-grid REQUIRED;
"dune-grid REQUIRED;
ZLIB;
ZOLTAN;
METIS

View File

@@ -16,8 +16,7 @@ find_opm_package (
"dune-common"
# dependencies
"CXX11Features REQUIRED;
BLAS REQUIRED;
"BLAS REQUIRED;
LAPACK REQUIRED;
CxaDemangle;
MPI

View File

@@ -19,8 +19,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features REQUIRED;
dune-common REQUIRED;
"dune-common REQUIRED;
dune-grid REQUIRED;
dune-alugrid;
ZLIB;

View File

@@ -19,8 +19,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features REQUIRED;
dune-common REQUIRED
"dune-common REQUIRED
"
# header to search for
"dune/geometry/quadraturerules.hh"

View File

@@ -22,8 +22,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features REQUIRED;
dune-common REQUIRED;
"dune-common REQUIRED;
dune-geometry REQUIRED;
dune-uggrid;
MPI;

View File

@@ -7,8 +7,7 @@ find_opm_package (
# dependencies
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
"CXX11Features REQUIRED;
dune-common REQUIRED
"dune-common REQUIRED
"
# header to search for
""

View File

@@ -0,0 +1,99 @@
# Check for various compiler extensions
# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported
# HAS_ATTRIBUTE_UNUSED True if attribute unused is supported
# HAS_ATTRIBUTE_DEPRECATED True if attribute deprecated is supported
# HAS_ATTRIBUTE_DEPRECATED_MSG True if attribute deprecated("msg") is supported
include(CheckCXXSourceCompiles)
# __attribute__((always_inline))
CHECK_CXX_SOURCE_COMPILES("
void __attribute__((always_inline)) foo(void) {}
int main(void)
{
foo();
return 0;
};
" HAVE_ATTRIBUTE_ALWAYS_INLINE
)
# __attribute__((unused))
CHECK_CXX_SOURCE_COMPILES("
int main(void)
{
int __attribute__((unused)) foo;
return 0;
};
" HAS_ATTRIBUTE_UNUSED
)
# __attribute__((deprecated))
CHECK_CXX_SOURCE_COMPILES("
#define DEP __attribute__((deprecated))
class bar
{
bar() DEP;
};
class peng { } DEP;
template <class T>
class t_bar
{
t_bar() DEP;
};
template <class T>
class t_peng {
t_peng() {};
} DEP;
void foo() DEP;
void foo() {};
int main(void)
{
return 0;
};
" HAS_ATTRIBUTE_DEPRECATED
)
# __attribute__((deprecated("msg")))
CHECK_CXX_SOURCE_COMPILES("
#define DEP __attribute__((deprecated(\"message\")))
class bar {
bar() DEP;
};
class peng { } DEP;
template <class T>
class t_bar
{
t_bar() DEP;
};
template <class T>
class t_peng
{
t_peng() {};
} DEP;
void foo() DEP;
void foo() {};
int main(void)
{
return 0;
};
" HAS_ATTRIBUTE_DEPRECATED_MSG
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
list(APPEND ${project}_LIBRARIES stdc++fs)
endif()
endif()

View File

@@ -64,6 +64,19 @@ project (${${project}_NAME})
enable_language (C)
enable_language (CXX)
# Languages and global compiler settings
if(CMAKE_VERSION VERSION_LESS 3.8)
message(WARNING "CMake version does not support c++17, guessing -std=c++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
# Various compiler extension checks
include(OpmCompilerChecks)
# print system information to better pinpoint issues from log alone
include (UseSystemInfo)
system_info ()

View File

@@ -56,6 +56,9 @@ macro (opm_compile_satellites opm satellite excl_all test_regexp)
# compile each of these separately
foreach (_sat_FILE IN LISTS ${satellite}_SOURCES)
if (NOT "${test_regexp}" STREQUAL "" AND NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
continue()
endif()
get_filename_component (_sat_NAME "${_sat_FILE}" NAME_WE)
add_executable (${_sat_NAME} ${excl_all} ${_sat_FILE})
add_dependencies (${satellite} ${_sat_NAME})

View File

@@ -69,12 +69,6 @@ if(NOT @opm-project_NAME@_FOUND)
endif()
endif (NOT "@opm-project_TARGET@" STREQUAL "")
# ensure that we build with support for C++11 to preserve ABI
string (REPLACE "@CXX_STD0X_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string (REPLACE "@CXX_STDLIB_FLAGS@" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string (STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS)
set (CMAKE_CXX_FLAGS "@CXX_STD0X_FLAGS@@CXX_SPACE@@CXX_STDLIB_FLAGS@ ${CMAKE_CXX_FLAGS}")
# same as above, but for C99
string (REPLACE "@C_STD99_FLAGS@" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string (STRIP "${CMAKE_C_FLAGS}" CMAKE_C_FLAGS)

2
debian/changelog vendored
View File

@@ -1,4 +1,4 @@
opm-common (2019.10-rc2-1~xenial) xenial; urgency=medium
opm-common (2019.04-pre~xenial) xenial; urgency=medium
* New release

26
debian/control vendored
View File

@@ -2,11 +2,12 @@ Source: opm-common
Priority: extra
Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
Build-Depends: build-essential, debhelper (>= 9),
pkg-config, cmake, git, libtool, doxygen,
pkg-config, cmake, git, libtool, doxygen, graphviz,
texlive-latex-extra, texlive-latex-recommended,
ghostscript, libboost-system-dev, libboost-test-dev,
libboost-regex-dev, libboost-filesystem-dev,
zlib1g-dev
zlib1g-dev, libpython3-dev, python3-numpy, python3-distutils,
python3-setuptools, python3-setuptools-scm, python3-pytest-runner,
python3-decorator
Standards-Version: 3.9.2
Section: libs
Homepage: http://opm-project.org
@@ -23,6 +24,16 @@ Provides: libopm-common
Description: OPM common library
The OPM common library contains generic code shared across all OPM modules.
Package: libopm-common1-bin
Section: libs
Pre-Depends: ${misc:Pre-Depends}
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: libopm-common-bin
Description: OPM common binaries
The OPM common binaries.
Package: libopm-common1-dev
Section: libdevel
Architecture: any
@@ -42,3 +53,12 @@ Provides: libopm-common-doc
Description: OPM common library -- documentation
The OPM common library contains the shared buildsystem
and helpers shared across all OPM modules.
Package: python3-opm-common
Section: libs
Pre-Depends: ${misc:Pre-Depends}, multiarch-support
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}, libopm-common1, python3-numpy, python3-decorator
Description: OPM common python bindings
Python package for opm-common

1
debian/libopm-common1-bin.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/bin/*

1
debian/python3-opm-common.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/lib/python*/*

4
debian/rules vendored
View File

@@ -10,7 +10,7 @@
#export DH_VERBOSE=1
%:
dh $@
dh $@ --parallel
override_dh_auto_clean:
dh_auto_clean --buildsystem=cmake
@@ -20,7 +20,7 @@ override_dh_auto_build:
# consider using -DUSE_VERSIONED_DIR=ON if backporting
override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-common1 -DWHOLE_PROG_OPTIM=ON -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-common1 -DWHOLE_PROG_OPTIM=ON -DUSE_RUNPATH=OFF -DWITH_NATIVE=OFF -DOPM_ENABLE_PYTHON=1 -DOPM_INSTALL_PYTHON=1 -DPYTHON_EXECUTABLE=/usr/bin/python3
override_dh_auto_install:
dh_auto_install -- install-html

View File

@@ -184,8 +184,8 @@ the WCONHIST keyword has the the following items specification:
{"name" : "ORAT" , "value_type" : "DOUBLE", "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"},
{"name" : "WRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "LiquidSurfaceVolume/Time"},
{"name" : "GRAT" , "value_type" : "DOUBLE" , "default" : 0.0, "dimension" : "GasSurfaceVolume/Time"},
{"name" : "VFPTable" , "value_type" : "INT" , "default" : 0.0 , "comment":"The default is a state variable"},
{"name" : "Lift" , "value_type" : "DOUBLE" , "default" : 0.0 , "comment":"The default is a state variable"},
{"name" : "VFP_TABLE" , "value_type" : "INT" , "default" : 0.0 , "comment":"The default is a state variable"},
{"name" : "LIFT" , "value_type" : "DOUBLE" , "default" : 0.0 , "comment":"The default is a state variable"},
{"name" : "THP" , "value_type" : "DOUBLE" , "default" : 0.0 , "dimension" : "Pressure"},
{"name" : "BHP" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "Pressure"},
{"name" : "NGLRAT" , "value_type" : "DOUBLE" , "default" : 0.0 ,"dimension" : "LiquidSurfaceVolume/Time"}]}

View File

@@ -5,8 +5,8 @@
Module: opm-common
Description: Open Porous Media Initiative shared infrastructure
Version: 2019.10-rc4
Label: 2019.10-rc4
Version: 2020.04-pre
Label: 2020.04-pre
Maintainer: opm@opm-project.org
MaintainerName: OPM community
Url: http://opm-project.org

View File

@@ -37,8 +37,8 @@ int main(int /* argc */, char** argv) {
Opm::ErrorGuard error_guard;
Opm::Deck deck = parser.parseFile(deck_file, parse_context, error_guard);
Opm::EclipseState state(deck, parse_context, error_guard);
Opm::Schedule schedule(deck, state.getInputGrid(), state.get3DProperties(), state.runspec(), parse_context, error_guard);
Opm::EclipseState state(deck);
Opm::Schedule schedule(deck, state, parse_context, error_guard);
Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager(), parse_context, error_guard);
if (error_guard) {

View File

@@ -64,9 +64,10 @@ std::vector<keyword> load_deck(const char * deck_file) {
auto deck = parser.parseFile(deck_file, parseContext, errors);
for (const auto& kw : deck) {
std::stringstream ss;
const auto& location = kw.location();
ss << kw;
keywords.emplace_back(kw.name(), kw.getFileName(), kw.getLineNumber(), std::hash<std::string>{}(ss.str()));
keywords.emplace_back(kw.name(), location.filename, location.lineno, std::hash<std::string>{}(ss.str()));
}
return keywords;
}

View File

@@ -18,6 +18,8 @@
*/
#include <iostream>
#include <iomanip>
#include <chrono>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
@@ -44,12 +46,37 @@ inline void loadDeck( const char * deck_file) {
Opm::Parser parser;
std::cout << "Loading deck: " << deck_file << " ..... "; std::cout.flush();
std::chrono::system_clock::time_point start;
start = std::chrono::system_clock::now();
auto deck = parser.parseFile(deck_file, parseContext, errors);
auto deck_time = std::chrono::system_clock::now() - start;
std::cout << "parse complete - creating EclipseState .... "; std::cout.flush();
Opm::EclipseState state( deck, parseContext, errors );
Opm::Schedule schedule( deck, state.getInputGrid(), state.get3DProperties(), state.runspec(), parseContext, errors);
start = std::chrono::system_clock::now();
Opm::EclipseState state( deck );
auto state_time = std::chrono::system_clock::now() - start;
std::cout << "creating Schedule .... "; std::cout.flush();
start = std::chrono::system_clock::now();
Opm::Schedule schedule( deck, state);
auto schedule_time = std::chrono::system_clock::now() - start;
std::cout << "creating SummaryConfig .... "; std::cout.flush();
start = std::chrono::system_clock::now();
Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ), parseContext, errors );
std::cout << "complete." << std::endl;
auto summary_time = std::chrono::system_clock::now() - start;
std::cout << "complete." << std::endl << std::endl;
std::cout << "Time: " << std::endl;
std::cout << " deck.....: " << std::chrono::duration<double>(deck_time).count() << " seconds" << std::endl;
std::cout << " state....: " << std::chrono::duration<double>(state_time).count() << " seconds" << std::endl;
std::cout << " schedule.: " << std::chrono::duration<double>(schedule_time).count() << " seconds" << std::endl;
std::cout << " summary..: " << std::chrono::duration<double>(summary_time).count() << " seconds" << std::endl;
}

View File

@@ -17,18 +17,21 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fstream>
#include <iostream>
#include <getopt.h>
#include <boost/filesystem.hpp>
#include <opm/common/utility/FileSystem.hpp>
#include <opm/parser/eclipse/Parser/ParserKeywords/G.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/InputErrorAction.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
namespace fs = Opm::filesystem;
inline void pack_deck( const char * deck_file, std::ostream& os) {
Opm::Deck pack_deck( const char * deck_file, std::ostream& os) {
Opm::ParseContext parseContext(Opm::InputError::WARN);
Opm::ErrorGuard errors;
Opm::Parser parser;
@@ -36,6 +39,7 @@ inline void pack_deck( const char * deck_file, std::ostream& os) {
auto deck = parser.parseFile(deck_file, parseContext, errors);
os << deck;
return deck;
}
@@ -62,21 +66,44 @@ Print NEW_CASE in cwd:
opmpack -o NEW_CASE.DATA path/to/MY_CASE.DATA
)";
As an alternative to the -o option you can use -c; that is equivalent to -o -
but restart and import files referred to in the deck are also copied. The -o and
-c options are mutually exclusive. )";
std::cerr << help_text << std::endl;
exit(1);
}
void copy_file(const fs::path& source_dir, fs::path fname, const fs::path& target_dir) {
if (fname.is_absolute()) {
// change when moving to gcc8+
// fname = fs::relative(fname, source_dir);
auto prefix_len = fs::canonical(source_dir).string().size();
fname = fs::canonical(fname);
fname = fs::path( fname.string().substr(prefix_len + 1) );
}
auto source_file = source_dir / fname;
auto target_file = target_dir / fname;
if (!fs::is_directory(target_file.parent_path()))
fs::create_directories(target_file.parent_path());
fs::copy_file(source_file, target_file, fs::copy_options::overwrite_existing);
std::cerr << "Copying file " << source_file.string() << " -> " << target_file.string() << std::endl;
}
int main(int argc, char** argv) {
int arg_offset = 1;
bool stdout_output = true;
bool copy_binary = false;
const char * coutput_arg;
while (true) {
int c;
c = getopt(argc, argv, "o:");
c = getopt(argc, argv, "c:o:");
if (c == -1)
break;
@@ -85,6 +112,11 @@ int main(int argc, char** argv) {
stdout_output = false;
coutput_arg = optarg;
break;
case 'c':
stdout_output = false;
copy_binary = true;
coutput_arg = optarg;
break;
}
}
arg_offset = optind;
@@ -95,16 +127,41 @@ int main(int argc, char** argv) {
pack_deck(argv[arg_offset], std::cout);
else {
std::ofstream os;
using path = boost::filesystem::path;
path input_arg(argv[arg_offset]);
path output_arg(coutput_arg);
if (boost::filesystem::is_directory(output_arg)) {
path output_path = output_arg / input_arg.filename();
os.open(output_path.string());
} else
os.open(output_arg.string());
fs::path input_arg(argv[arg_offset]);
fs::path output_arg(coutput_arg);
fs::path output_dir(coutput_arg);
pack_deck(argv[arg_offset], os);
if (fs::is_directory(output_arg)) {
fs::path output_path = output_arg / input_arg.filename();
os.open(output_path.string());
} else {
os.open(output_arg.string());
output_dir = output_arg.parent_path();
}
const auto& deck = pack_deck(argv[arg_offset], os);
if (copy_binary) {
Opm::InitConfig init_config(deck);
if (init_config.restartRequested()) {
Opm::IOConfig io_config(deck);
fs::path restart_file(io_config.getRestartFileName( init_config.getRestartRootName(), init_config.getRestartStep(), false ));
copy_file(input_arg.parent_path(), restart_file, output_dir);
}
for (std::size_t import_index = 0; import_index < deck.count("IMPORT"); import_index++) {
const auto& import_keyword = deck.getKeyword("IMPORT", import_index);
const auto& fname = import_keyword.getRecord(0).getItem("FILE").get<std::string>(0);
copy_file(input_arg.parent_path(), fname, output_dir);
}
using GDFILE = Opm::ParserKeywords::GDFILE;
if (deck.hasKeyword<GDFILE>()) {
const auto& gdfile_keyword = deck.getKeyword<GDFILE>();
const auto& fname = gdfile_keyword.getRecord(0).getItem<GDFILE::filename>().get<std::string>(0);
copy_file(input_arg.parent_path(), fname, output_dir);
}
}
}
}

View File

@@ -3,8 +3,8 @@
declare -A configurations
declare -A EXTRA_MODULE_FLAGS
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON"
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON"
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON"
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON"
# Parse revisions from trigger comment and setup arrays
# Depends on: 'upstreams', upstreamRev',

View File

@@ -45,6 +45,11 @@ done
export REASON
export BRANCH_NAME
$WORKSPACE/deps/opm-simulators/tests/update_reference_data.sh $OPM_TESTS_ROOT
if test $? -eq 5
then
echo "No tests failed - no data to update. Exiting"
exit 0
fi
# Finally open the pull request
cd $OPM_TESTS_ROOT
@@ -81,6 +86,10 @@ then
PRNUMBER=${rev//[!0-9]/}
DATA_PR=`curl -X GET https://api.github.com/repos/OPM/opm-tests/pulls?head=jenkins4opm:$BRANCH_NAME | grep '"number":' | awk -F ':' '{print $2}' | sed -e 's/,//' -e 's/ //'`
git push -u jenkins4opm $BRANCH_NAME -f
fi
if [ -n "$DATA_PR" ]
then
curl -d "{ \"body\": \"Existing PR https://github.com/OPM/opm-tests/pull/$DATA_PR was updated\" }" -X POST https://api.github.com/repos/OPM/$MAIN_REPO/issues/$PRNUMBER/comments?access_token=$GH_TOKEN
else
git-open-pull -u jenkins4opm --base-account OPM --base-repo opm-tests -r /tmp/cmsg $BRANCH_NAME

View File

@@ -9,22 +9,11 @@ set (opm-common_CONFIG_VAR
set (opm-common_DEPS
# compile with C99 support if available
"C99"
# compile with C++0x/11 support if available
"CXX11Features REQUIRED"
)
)
list(APPEND opm-common_DEPS
# various runtime library enhancements
"Boost 1.44.0 COMPONENTS system unit_test_framework REQUIRED"
)
if(ENABLE_ECL_INPUT)
list(APPEND opm-common_DEPS
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS system filesystem unit_test_framework regex REQUIRED")
else()
list(APPEND opm-common_DEPS
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS system unit_test_framework REQUIRED")
endif()
# We need a defined target for libecl when linking.
# The definition of the target is done implicitly below when
# libecl is searched for.
find_package_deps(opm-common)

View File

@@ -0,0 +1,44 @@
/*
Copyright 2015 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 LOCATION_HPP
#define LOCATION_HPP
namespace Opm {
class Location {
public:
std::string filename = "<memory string>";
std::size_t lineno = 0;
Location() = default;
Location(std::string fname, std::size_t lno) :
filename(std::move(fname)),
lineno(lno)
{}
bool operator==(const Location& data) const {
return filename == data.filename &&
lineno == data.lineno;
}
};
}
#endif

View File

@@ -23,7 +23,10 @@
#include <cstdint>
#include <string>
#include <opm/common/OpmLog/Location.hpp>
namespace Opm {
namespace Log {
namespace MessageType {
const int64_t Debug = 1; /* Excessive information */
@@ -56,8 +59,8 @@ namespace Log {
bool isPower2(int64_t x);
std::string fileMessage(const std::string& path, int line , const std::string& msg);
std::string fileMessage(int64_t messageType , const std::string& path, int line , const std::string& msg);
std::string fileMessage(const Location& location, const std::string& msg);
std::string fileMessage(int64_t messageType , const Location& location , const std::string& msg);
std::string prefixMessage(int64_t messageType , const std::string& msg);
std::string colorCodeMessage(int64_t messageType , const std::string& msg);

View File

@@ -0,0 +1,79 @@
/*
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/>.
*/
#ifndef ACTIVEGRIDCELLS_HPP
#define ACTIVEGRIDCELLS_HPP
#include <opm/parser/eclipse/EclipseState/Grid/GridDims.hpp>
#include <array>
namespace Opm
{
/**
* \brief Simple class capturing active cells of a grid
*
*/
class ActiveGridCells
: public GridDims
{
public:
/// \brief Constructs mapping of active cells.
/// \param xyz The cartesian dimensions of the grid
/// \param globalCell Pointer to first entry of contiguous
/// array mapping local index to cartesian one.
/// \param nc The number of cells of a grid.
ActiveGridCells(std::array<int, 3> xyz,
const int* globalCell, std::size_t nc);
/// \brief Constructs mapping of active cells.
/// \param nx Number of cells in x
/// \param ny Number of cells in y
/// \param nz Number of cells in z
/// \param globalCell Pointer to first entry of contiguous
/// array mapping local index to cartesian one.
/// \param nc The number of cells of a grid.
ActiveGridCells(std::size_t nx, std::size_t ny, std::size_t nz,
const int* globalCell, std::size_t nc);
bool cellActive(std::size_t i, std::size_t j, std::size_t k) const;
bool cellActive(std::size_t cartesianIndex) const;
std::vector<int> actNum() const;
/// \brief Get the local index of a cell
/// \param cartesianIndex The cartesian index of the cell
/// \return The local index or -1 if the cell is inactive
int localCell(std::size_t cartesianIndex) const;
/// \brief Get the local index of a cell
/// \param i The index in the i direction
/// \param j The index in the j direction
/// \param k The index in the k direction
/// \return The local index or -1 if the cell is inactive
int localCell(std::size_t i, std::size_t j, std::size_t k) const;
protected:
/// \brief Maps the cartesian index to a compressed local index.
///
/// nonactive cells are marked with -1.
std::vector<int> localCell_;
};
} // end namespace Opm
#endif // ACTIVEGRIDCELLS_HPP

View File

@@ -0,0 +1,47 @@
/*
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/>.
*/
#ifndef OPM_FILESYSTEM_HPP
#define OPM_FILESYSTEM_HPP
#if __cplusplus < 201703L || \
(defined(__GNUC__) && __GNUC__ < 8)
#include <experimental/filesystem>
#else
#include <filesystem>
#endif
#include <string>
namespace Opm
{
#if __cplusplus < 201703L || \
(defined(__GNUC__) && __GNUC__ < 8)
namespace filesystem = std::experimental::filesystem;
#else
namespace filesystem = std::filesystem;
#endif
// A poor man's filesystem::unique_path
std::string unique_path(const std::string& input);
} // end namespace Opm
#endif // OPM_FILESYSTEM_HPP

View File

@@ -20,6 +20,7 @@
#ifndef OPM_TIMESERVICE_HEADER_INCLUDED
#define OPM_TIMESERVICE_HEADER_INCLUDED
#include <chrono>
#include <ctime>
namespace Opm {
@@ -31,20 +32,34 @@ namespace Opm {
int year{0};
int month{0};
int day{0};
bool operator==(const YMD& data) const
{
return year == data.year &&
month == data.month &&
day == data.day;
}
};
TimeStampUTC() = default;
explicit TimeStampUTC(const std::time_t tp);
explicit TimeStampUTC(const YMD& ymd);
TimeStampUTC(const YMD& ymd,
int hour,
int minutes,
int seconds,
int usec);
TimeStampUTC& operator=(const std::time_t tp);
bool operator==(const TimeStampUTC& data) const;
TimeStampUTC& hour(const int h);
TimeStampUTC& minutes(const int m);
TimeStampUTC& seconds(const int s);
TimeStampUTC& microseconds(const int us);
const YMD& ymd() const { return ymd_; }
int year() const { return this->ymd_.year; }
int month() const { return this->ymd_.month; }
int day() const { return this->ymd_.day; }
@@ -61,6 +76,7 @@ namespace Opm {
int usec_{0};
};
TimeStampUTC operator+(const TimeStampUTC& lhs, std::chrono::duration<double> delta);
std::time_t asTimeT(const TimeStampUTC& tp);
} // namespace Opm

View File

@@ -1,21 +1,6 @@
//===========================================================================
//
// File: RootFinders.hpp
//
// Created: Thu May 6 19:59:42 2010
//
// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
// Jostein R Natvig <jostein.r.natvig@sintef.no>
//
// $Date$
//
// $Revision$
//
//===========================================================================
/*
Copyright 2010 SINTEF ICT, Applied Mathematics.
Copyright 2010 Statoil ASA.
Copyright 2010, 2019 SINTEF Digital
Copyright 2010, 2019 Equinor ASA
This file is part of the Open Porous Media project (OPM).
@@ -295,6 +280,126 @@ namespace Opm
template <class ErrorPolicy = ThrowOnError>
class RegulaFalsiBisection
{
public:
inline static std::string name()
{
return "RegulaFalsiBisection";
}
/// Implements a modified regula falsi method as described in
/// "Improved algorithms of Illinois-type for the numerical
/// solution of nonlinear equations"
/// by J. A. Ford. Current variant is the 'Pegasus' method.
/// Combines this method with the bisection method, inspired by
/// http://phillipmfeldman.org/Python/roots/find_roots.html
template <class Functor>
inline static double solve(const Functor& f,
const double a,
const double b,
const int max_iter,
const double tolerance,
int& iterations_used)
{
using namespace std;
const double sqrt_half = std::sqrt(0.5);
const double macheps = numeric_limits<double>::epsilon();
const double eps = tolerance + macheps * max(max(fabs(a), fabs(b)), 1.0);
double x0 = a;
double x1 = b;
double f0 = f(x0);
const double epsF = tolerance + macheps * max(fabs(f0), 1.0);
if (fabs(f0) < epsF) {
return x0;
}
double f1 = f(x1);
if (fabs(f1) < epsF) {
return x1;
}
if (f0 * f1 > 0.0) {
return ErrorPolicy::handleBracketingFailure(a, b, f0, f1);
}
iterations_used = 0;
// In every iteraton, x1 is the last point computed,
// and x0 is the last point computed that makes it a bracket.
double width = fabs(x1 - x0);
double contraction = 1.0;
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
// slow convergence.
const double xnew = (contraction < sqrt_half)
? regulaFalsiStep(x0, x1, f0, f1)
: bisectionStep(x0, x1, f0, f1);
const double fnew = f(xnew);
++iterations_used;
if (iterations_used > max_iter) {
return ErrorPolicy::handleTooManyIterations(x0, x1, max_iter);
}
if (fabs(fnew) < epsF) {
return xnew;
}
// Now we must check which point we must replace.
if ((fnew > 0.0) == (f0 > 0.0)) {
// We must replace x0.
x0 = x1;
f0 = f1;
} else {
// We must replace x1, this is the case where
// the modification to regula falsi kicks in,
// by modifying f0.
// 1. The classic Illinois method
// const double gamma = 0.5;
// @afr: The next two methods do not work??!!?
// 2. The method called 'Method 3' in the paper.
// const double phi0 = f1/f0;
// const double phi1 = fnew/f1;
// const double gamma = 1.0 - phi1/(1.0 - phi0);
// 3. The method called 'Method 4' in the paper.
// const double phi0 = f1/f0;
// const double phi1 = fnew/f1;
// const double gamma = 1.0 - phi0 - phi1;
// cout << "phi0 = " << phi0 <<" phi1 = " << phi1 <<
// " gamma = " << gamma << endl;
// 4. The 'Pegasus' method
const double gamma = f1 / (f1 + fnew);
// 5. Straight unmodified Regula Falsi
// const double gamma = 1.0;
f0 *= gamma;
}
x1 = xnew;
f1 = fnew;
const double widthnew = fabs(x1 - x0);
contraction = widthnew/width;
width = widthnew;
}
return 0.5 * (x0 + x1);
}
private:
inline static double regulaFalsiStep(const double a, const double b, const double fa, const double fb)
{
assert(fa * fb < 0.0);
return (b * fa - a * fb) / (fa - fb);
}
inline static double bisectionStep(const double a, const double b, const double fa, const double fb)
{
static_cast<void>(fa);
static_cast<void>(fb);
assert(fa * fb < 0.0);
return 0.5*(a + b);
}
};
/// Attempts to find an interval bracketing a zero by successive
/// enlargement of search interval.
template <class Functor>

View File

@@ -69,13 +69,11 @@
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
#pragma GCC diagnostic ignored "-Wunused-private-field"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wcast-align"
#pragma GCC diagnostic ignored "-Wcast-qual"
#pragma GCC diagnostic ignored "-Wignored-attributes"
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif // COMPATIBLE_COMPILER
#endif // SILENCE_EXTERNAL_WARNINGS

View File

@@ -42,10 +42,18 @@ public:
void loadReportStepNumber(int number);
template <typename T>
const std::vector<T>& getRst(const std::string& name, int reportStepNumber);
const std::vector<T>& getRst(const std::string& name, int reportStepNumber, int occurrence);
template <typename T>
const std::vector<T>& getRst(int index, int reportStepNumber){
auto indRange = this->getIndexRange(reportStepNumber);
return this->get<T>(index + std::get<0>(indRange));
}
int count(const std::string& name, int reportStepNumber) const;
const std::vector<int>& listOfReportStepNumbers() const { return seqnum; }
std::vector<EclEntry> listOfRstArrays(int reportStepNumber);
friend class OutputStream::Restart;
@@ -59,10 +67,12 @@ private:
void initUnified();
void initSeparate(const int number);
int getArrayIndex(const std::string& name, int seqnum) const;
int getArrayIndex(const std::string& name, int seqnum, int occurrence) const;
std::tuple<int,int> getIndexRange(int reportStepNumber) const;
std::streampos
restartStepWritePosition(const int seqnumValue) const;
};
}} // namespace Opm::EclIO

View File

@@ -21,7 +21,7 @@
#include <string>
#include <vector>
#include <boost/filesystem.hpp>
#include <opm/common/utility/FileSystem.hpp>
namespace Opm { namespace EclIO {
@@ -54,13 +54,13 @@ private:
std::vector<int> seqIndex;
std::vector<float> seqTime;
std::vector<std::string> checkForMultipleResultFiles(const boost::filesystem::path& rootN, bool formatted) const;
std::vector<std::string> checkForMultipleResultFiles(const Opm::filesystem::path& rootN, bool formatted) const;
void getRstString(const std::vector<std::string>& restartArray,
boost::filesystem::path& pathRst,
boost::filesystem::path& rootN) const;
Opm::filesystem::path& pathRst,
Opm::filesystem::path& rootN) const;
void updatePathAndRootName(boost::filesystem::path& dir, boost::filesystem::path& rootN) const;
void updatePathAndRootName(Opm::filesystem::path& dir, Opm::filesystem::path& rootN) const;
std::string makeKeyString(const std::string& keyword, const std::string& wgname, int num) const;
};

View File

@@ -35,7 +35,7 @@ namespace Opm { namespace EclIO {
class EclFile
{
public:
explicit EclFile(const std::string& filename);
explicit EclFile(const std::string& filename, bool preload = false);
bool formattedInput() { return formatted; }
void loadData(); // load all data
@@ -64,6 +64,7 @@ public:
bool hasKey(const std::string &name) const;
const std::vector<std::string>& arrayNames() const { return array_name; }
std::size_t size() const;
protected:
bool formatted;

View File

@@ -0,0 +1,66 @@
/*
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 RST_CONNECTION
#define RST_CONNECTION
#include <array>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp>
namespace Opm {
class UnitSystem;
namespace RestartIO {
class Header;
struct RstConnection {
RstConnection(const ::Opm::UnitSystem& unit_system, const int* icon, const float* scon, const double *xcon);
int insert_index;
std::array<int,3> ijk;
Connection::State state;
int drain_sat_table;
int imb_sat_table;
int completion;
Connection::Direction dir;
int segment;
float tran;
float depth;
float diameter;
float kh;
float segdist_end;
float segdist_start;
double oil_rate;
double water_rate;
double gas_rate;
double pressure;
double resv_rate;
};
}
}
#endif

View File

@@ -0,0 +1,84 @@
/*
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 RST_GROUP
#define RST_GROUP
#include <array>
#include <vector>
#include <string>
namespace Opm {
class UnitSystem;
namespace RestartIO {
struct RstHeader;
struct RstGroup {
RstGroup(const UnitSystem& unit_system,
const std::string* zwel,
const int * igrp,
const float * sgrp,
const double * xgrp);
std::string name;
float oil_rate_limit;
float water_rate_limit;
float gas_rate_limit;
float liquid_rate_limit;
float water_surface_limit;
float water_reservoir_limit;
float water_reinject_limit;
float water_voidage_limit;
float gas_surface_limit;
float gas_reservoir_limit;
float gas_reinject_limit;
float gas_voidage_limit;
double oil_production_rate;
double water_production_rate;
double gas_production_rate;
double liquid_production_rate;
double water_injection_rate;
double gas_injection_rate;
double wct;
double gor;
double oil_production_total;
double water_production_total;
double gas_production_total;
double voidage_production_total;
double water_injection_total;
double gas_injection_total;
double oil_production_potential;
double water_production_potential;
double history_total_oil_production;
double history_total_water_production;
double history_total_water_injection;
double history_total_gas_production;
double history_total_gas_injection;
};
}
}
#endif

View File

@@ -0,0 +1,127 @@
/*
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 RST_HEADER
#define RST_HEADER
#include <vector>
#include <ctime>
#include <cstddef>
namespace Opm {
namespace RestartIO {
struct RstHeader {
RstHeader(const std::vector<int>& intehead, const std::vector<bool>& logihead, const std::vector<double>& doubhead);
int nx;
int ny;
int nz;
int nactive;
int num_wells;
int ncwmax;
int max_wells_in_group;
int max_groups_in_field;
int max_wells_in_field;
int year;
int month;
int mday;
int hour;
int minute;
int microsecond;
int phase_sum;
int niwelz;
int nswelz;
int nxwelz;
int nzwelz;
int niconz;
int nsconz;
int nxconz;
int nigrpz;
int nsgrpz;
int nxgrpz;
int nzgrpz;
int ncamax;
int niaaqz;
int nsaaqz;
int nxaaqz;
int nicaqz;
int nscaqz;
int nacaqz;
int tstep;
int report_step;
int newtmx;
int newtmn;
int litmax;
int litmin;
int mxwsit;
int mxwpit;
int version;
int iprog;
int nsegwl;
int nswlmx;
int nsegmx;
int nlbrmx;
int nisegz;
int nrsegz;
int nilbrz;
int ntfip ;
int nmfipr;
int nrfreg;
int ntfreg;
int nplmix;
int ngroup;
bool e300_radial;
bool e100_radial;
bool enable_hysteris;
bool enable_msw;
bool is_live_oil;
bool is_wet_gas;
bool const_comp_oil;
bool dir_relperm;
bool reversible_relperm;
bool endscale;
bool dir_eps;
bool reversible_eps;
bool alt_eps;
double next_timestep1;
double next_timestep2;
double max_timestep;
double guide_rate_a;
double guide_rate_b;
double guide_rate_c;
double guide_rate_d;
double guide_rate_e;
double guide_rate_f;
double udq_range;
double udq_undefined;
double udq_eps;
std::pair<std::time_t, std::size_t> restart_info() const;
};
}
}
#endif

View File

@@ -0,0 +1,78 @@
/*
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 RST_SEGMENT
#define RST_SEGMENT
#include <vector>
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
namespace Opm {
class UnitSystem;
namespace RestartIO {
struct RstSegment {
RstSegment(const ::Opm::UnitSystem& unit_system, const int* iseg, const double * rseg);
int segment;
int outlet_segment;
int branch;
Segment::SegmentType segment_type;
int icd_scaling_mode;
ICDStatus icd_status;
double dist_outlet;
double outlet_dz;
double diameter;
double roughness;
double area;
double volume;
double dist_bhp_ref;
double bhp_ref_dz;
double total_flow;
double water_flow_fraction;
double gas_flow_fraction;
double pressure;
double valve_length;
double valve_area;
double valve_flow_coeff;
double valve_max_area;
double base_strength;
double fluid_density;
double fluid_viscosity;
double critical_water_fraction;
double transition_region_width;
double max_emulsion_ratio;
double max_valid_flow_rate;
double icd_length;
double valve_area_fraction;
std::vector<int> inflow_segments;
};
}
}
#endif

View File

@@ -0,0 +1,90 @@
/*
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 RST_STATE
#define RST_STATE
#include <vector>
#include <string>
#include <opm/io/eclipse/ERst.hpp>
#include <opm/io/eclipse/rst/header.hpp>
#include <opm/io/eclipse/rst/group.hpp>
#include <opm/io/eclipse/rst/well.hpp>
namespace Opm {
class UnitSystem;
namespace RestartIO {
struct RstState {
RstState(const ::Opm::UnitSystem& unit_system,
const std::vector<int>& intehead,
const std::vector<bool>& logihead,
const std::vector<double>& doubhead,
const std::vector<std::string>& zgrp,
const std::vector<int>& igrp,
const std::vector<float>& sgrp,
const std::vector<double>& xgrp,
const std::vector<std::string>& zwel,
const std::vector<int>& iwel,
const std::vector<float>& swel,
const std::vector<double>& xwel,
const std::vector<int>& icon,
const std::vector<float>& scon,
const std::vector<double>& xcon);
RstState(const ::Opm::UnitSystem& unit_system,
const std::vector<int>& intehead,
const std::vector<bool>& logihead,
const std::vector<double>& doubhead,
const std::vector<std::string>& zgrp,
const std::vector<int>& igrp,
const std::vector<float>& sgrp,
const std::vector<double>& xgrp,
const std::vector<std::string>& zwel,
const std::vector<int>& iwel,
const std::vector<float>& swel,
const std::vector<double>& xwel,
const std::vector<int>& icon,
const std::vector<float>& scon,
const std::vector<double>& xcon,
const std::vector<int>& iseg,
const std::vector<double>& rseg);
static RstState load(EclIO::ERst& rst_file, int report_step);
const RstWell& get_well(const std::string& wname) const;
std::vector<RstWell> wells;
std::vector<RstGroup> groups;
RstHeader header;
private:
void add_groups(const ::Opm::UnitSystem& unit_system,
const std::vector<std::string>& zgrp,
const std::vector<int>& igrp,
const std::vector<float>& sgrp,
const std::vector<double>& xgrp);
};
}
}
#endif

124
opm/io/eclipse/rst/well.hpp Normal file
View File

@@ -0,0 +1,124 @@
/*
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 RST_WELL
#define RST_WELL
#include <array>
#include <vector>
#include <string>
#include <unordered_map>
#include <opm/io/eclipse/rst/connection.hpp>
#include <opm/io/eclipse/rst/segment.hpp>
namespace Opm {
class UnitSystem;
namespace RestartIO {
struct RstHeader;
struct RstWell {
RstWell(const ::Opm::UnitSystem& unit_system,
const RstHeader& header,
const std::string& group_arg,
const std::string* zwel,
const int * iwel,
const float * swel,
const double * xwel,
const int * icon,
const float * scon,
const double * xcon);
RstWell(const ::Opm::UnitSystem& unit_system,
const RstHeader& header,
const std::string& group_arg,
const std::string* zwel,
const int * iwel,
const float * swel,
const double * xwel,
const int * icon,
const float * scon,
const double * xcon,
const std::vector<int>& iseg,
const std::vector<double>& rseg);
std::string name;
std::string group;
std::array<int, 2> ij;
std::pair<int,int> k1k2;
int wtype;
int active_control;
int vfp_table;
int pred_requested_control;
bool allow_xflow;
int hist_requested_control;
int msw_index;
int completion_ordering;
float orat_target;
float wrat_target;
float grat_target;
float lrat_target;
float resv_target;
float thp_target;
float bhp_target_float;
float hist_lrat_target;
float hist_grat_target;
float hist_bhp_target;
float datum_depth;
double oil_rate;
double water_rate;
double gas_rate;
double liquid_rate;
double void_rate;
double flow_bhp;
double wct;
double gor;
double oil_total;
double water_total;
double gas_total;
double void_total;
double water_inj_total;
double gas_inj_total;
double gas_fvf;
double bhp_target_double;
double hist_oil_total;
double hist_wat_total;
double hist_gas_total;
double hist_water_inj_total;
double hist_gas_inj_total;
double water_void_rate;
double gas_void_rate;
const RstSegment segment(int segment_number) const;
std::vector<RstConnection> connections;
std::vector<RstSegment> segments;
};
}
}
#endif

View File

@@ -22,7 +22,7 @@
#include <string>
#include <boost/filesystem/path.hpp>
#include <opm/common/utility/FileSystem.hpp>
struct cJSON;
@@ -30,7 +30,7 @@ namespace Json {
class JsonObject {
public:
explicit JsonObject(const boost::filesystem::path& jsonFile );
explicit JsonObject(const Opm::filesystem::path& jsonFile );
explicit JsonObject(const std::string& inline_json);
explicit JsonObject(const char * inline_json);
explicit JsonObject(cJSON * root);

View File

@@ -0,0 +1,59 @@
/*
Copyright 2019 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 OPM_OUTPUT_AQUIFER_HPP
#define OPM_OUTPUT_AQUIFER_HPP
#include <map>
#include <memory>
#include <vector>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
namespace Opm { namespace data {
/**
* Small struct that keeps track of data for output to restart/summary
* files.
*/
enum class AquiferType
{
Fetkovich, CarterTracey,
};
struct FetkovichData {
double initVolume;
double prodIndex;
double timeConstant;
};
struct AquiferData {
int aquiferID; //< One-based ID, range 1..NANAQ
double pressure; //< Aquifer pressure
double volume; //< Produced liquid volume
double initPressure; //< Aquifer's initial pressure
double datumDepth; //< Aquifer's pressure reference depth
AquiferType type;
std::shared_ptr<FetkovichData> aquFet;
};
}} // Opm::data
#endif // OPM_OUTPUT_AQUIFER_HPP

View File

@@ -69,6 +69,13 @@ namespace data {
UnitSystem::measure dim; //< Dimension of the data to write
std::vector<double> data; //< The actual data itself
TargetType target;
bool operator==(const CellData& cell2) const
{
return dim == cell2.dim &&
data == cell2.data &&
target == cell2.target;
}
};
}

View File

@@ -30,6 +30,8 @@
#include <unordered_map>
#include <vector>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
namespace Opm {
namespace data {
@@ -82,14 +84,16 @@ namespace Opm {
/// chaining.
inline Rates& set( opt m, double value );
/// true if any option is set; false otherwise
inline bool any() const noexcept;
/// Returns true if any of the rates oil, gas, water is nonzero
inline bool flowing() const;
template <class MessageBufferType>
void write(MessageBufferType& buffer) const;
template <class MessageBufferType>
void read(MessageBufferType& buffer);
bool operator==(const Rates& rat2) const;
private:
double& get_ref( opt );
const double& get_ref( opt ) const;
@@ -117,7 +121,7 @@ namespace Opm {
struct Connection {
using global_index = size_t;
static const constexpr int restart_size = 2;
static const constexpr int restart_size = 6;
global_index index;
Rates rates;
@@ -128,6 +132,18 @@ namespace Opm {
double cell_saturation_gas;
double effective_Kh;
bool operator==(const Connection& conn2) const
{
return index == conn2.index &&
rates == conn2.rates &&
pressure == conn2.pressure &&
reservoir_rate == conn2.reservoir_rate &&
cell_pressure == conn2.cell_pressure &&
cell_saturation_water == conn2.cell_saturation_water &&
cell_saturation_gas == conn2.cell_saturation_gas &&
effective_Kh == conn2.effective_Kh;
}
template <class MessageBufferType>
void write(MessageBufferType& buffer) const;
template <class MessageBufferType>
@@ -139,6 +155,38 @@ namespace Opm {
double pressure;
std::size_t segNumber;
bool operator==(const Segment& seg2) const
{
return rates == seg2.rates &&
pressure == seg2.pressure &&
segNumber == seg2.segNumber;
}
template <class MessageBufferType>
void write(MessageBufferType& buffer) const;
template <class MessageBufferType>
void read(MessageBufferType& buffer);
};
struct CurrentControl {
bool isProducer{true};
::Opm::Well::ProducerCMode prod {
::Opm::Well::ProducerCMode::CMODE_UNDEFINED
};
::Opm::Well::InjectorCMode inj {
::Opm::Well::InjectorCMode::CMODE_UNDEFINED
};
bool operator==(const CurrentControl& rhs) const
{
return (this->isProducer == rhs.isProducer)
&& ((this->isProducer && (this->prod == rhs.prod)) ||
(!this->isProducer && (this->inj == rhs.inj)));
}
template <class MessageBufferType>
void write(MessageBufferType& buffer) const;
@@ -154,11 +202,25 @@ namespace Opm {
int control;
std::vector< Connection > connections;
std::unordered_map<std::size_t, Segment> segments;
CurrentControl current_control;
inline bool flowing() const noexcept;
template <class MessageBufferType>
void write(MessageBufferType& buffer) const;
template <class MessageBufferType>
void read(MessageBufferType& buffer);
bool operator==(const Well& well2) const
{
return rates == well2.rates &&
bhp == well2.bhp &&
thp == well2.thp &&
temperature == well2.temperature &&
control == well2.control &&
connections == well2.connections &&
segments == well2.segments &&
current_control == well2.current_control;
}
};
@@ -213,10 +275,9 @@ namespace Opm {
this->emplace(name, well);
}
}
};
using Wells = WellRates;
using Wells = WellRates;
/* IMPLEMENTATIONS */
@@ -252,6 +313,28 @@ namespace Opm {
return *this;
}
inline bool Rates::operator==(const Rates& rate) const
{
return mask == rate.mask &&
wat == rate.wat &&
oil == rate.oil &&
gas == rate.gas &&
polymer == rate.polymer &&
solvent == rate.solvent &&
energy == rate.energy &&
dissolved_gas == rate.dissolved_gas &&
vaporized_oil == rate.vaporized_oil &&
reservoir_water == rate.reservoir_water &&
reservoir_oil == rate.reservoir_oil &&
reservoir_gas == rate.reservoir_gas &&
productivity_index_water == rate.productivity_index_water &&
productivity_index_gas == rate.productivity_index_gas &&
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;
}
/*
* To avoid error-prone and repetitve work when extending rates with new
@@ -296,12 +379,15 @@ namespace Opm {
);
}
inline bool Rates::any() const noexcept {
return static_cast< enum_size >( this->mask ) != 0;
bool inline Rates::flowing() const {
return ((this->wat != 0) ||
(this->oil != 0) ||
(this->gas != 0));
}
inline bool Well::flowing() const noexcept {
return this->rates.any();
return this->rates.flowing();
}
template <class MessageBufferType>
@@ -345,6 +431,18 @@ namespace Opm {
buffer.write(this->pressure);
}
template <class MessageBufferType>
void CurrentControl::write(MessageBufferType& buffer) const
{
buffer.write(this->isProducer);
if (this->isProducer) {
buffer.write(this->prod);
}
else {
buffer.write(this->inj);
}
}
template <class MessageBufferType>
void Well::write(MessageBufferType& buffer) const {
this->rates.write(buffer);
@@ -366,6 +464,8 @@ namespace Opm {
seg.second.write(buffer);
}
}
this->current_control.write(buffer);
}
template <class MessageBufferType>
@@ -409,6 +509,18 @@ namespace Opm {
buffer.read(this->pressure);
}
template <class MessageBufferType>
void CurrentControl::read(MessageBufferType& buffer)
{
buffer.read(this->isProducer);
if (this->isProducer) {
buffer.read(this->prod);
}
else {
buffer.read(this->inj);
}
}
template <class MessageBufferType>
void Well::read(MessageBufferType& buffer) {
this->rates.read(buffer);
@@ -443,6 +555,8 @@ namespace Opm {
const auto segNumber = seg.segNumber;
this->segments.emplace(segNumber, std::move(seg));
}
this->current_control.read(buffer);
}
}} // Opm::data

View File

@@ -0,0 +1,122 @@
/*
Copyright (c) 2018 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 OPM_AGGREGATE_Actionx_DATA_HPP
#define OPM_AGGREGATE_Actionx_DATA_HPP
#include <opm/output/eclipse/WindowedArray.hpp>
#include <opm/io/eclipse/PaddedOutputString.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <cstddef>
#include <string>
#include <vector>
#include <map>
namespace Opm {
class Schedule;
class UDQInput;
class UDQActive;
} // Opm
namespace Opm { namespace RestartIO { namespace Helpers {
class AggregateActionxData
{
public:
explicit AggregateActionxData(const std::vector<int>& actDims);
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
{
return this->iACT_.data();
}
const std::vector<float>& getSACT() const
{
return this->sACT_.data();
}
const std::vector<EclIO::PaddedOutputString<8>>& getZACT() const
{
return this->zACT_.data();
}
const std::vector<EclIO::PaddedOutputString<8>>& getZLACT() const
{
return this->zLACT_.data();
}
const std::vector<EclIO::PaddedOutputString<8>>& getZACN() const
{
return this->zACN_.data();
}
const std::vector<int>& getIACN() const
{
return this->iACN_.data();
}
const std::vector<double>& getSACN() const
{
return this->sACN_.data();
}
private:
/// Aggregate 'IACT' array (Integer) for all ACTIONX data (9 integers pr UDQ)
WindowedArray<int> iACT_;
/// Aggregate 'SACT' array (Integer) for all ACTIONX data (5 integers pr ACTIONX - currently all zero - meaning unknown)
WindowedArray<float> sACT_;
/// Aggregate 'ZACT' array (Character) for all ACTIONX data. (4 * 8 chars pr ACIONX keyword - name of Action)
WindowedArray<EclIO::PaddedOutputString<8>> zACT_;
/// Aggregate 'ZLACT' array (Character) for all Actionx data. (max 16 * 8 characters pr line (default 80 chars pr line)
WindowedArray<EclIO::PaddedOutputString<8>> zLACT_;
/// Aggregate 'ZACN' array (Character) for all Actionx data (length equal to max no of conditions pr Actionx * the number of Actiox kwords)
WindowedArray<EclIO::PaddedOutputString<8>> zACN_;
/// Aggregate 'IACN' array (Integer) for all Actionx data (length 26* the max number of conditoins pr Actionx * the number of Actionx kwords)
WindowedArray<int> iACN_;
/// Aggregate 'SACN' array (Integer) for all Actionx data (16 * max number of Actionx conditions)
WindowedArray<double> sACN_;
};
}}} // Opm::RestartIO::Helpers
#endif //OPM_AGGREGATE_WELL_DATA_HPP

View File

@@ -23,7 +23,7 @@
#include <opm/output/eclipse/WindowedArray.hpp>
#include <opm/io/eclipse/PaddedOutputString.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
#include <cstddef>
#include <string>
#include <vector>
@@ -32,7 +32,8 @@
namespace Opm {
class Schedule;
class SummaryState;
class Group2;
//class Group;
class UnitSystem;
} // Opm
namespace Opm { namespace RestartIO { namespace Helpers {
@@ -42,10 +43,11 @@ class AggregateGroupData
public:
explicit AggregateGroupData(const std::vector<int>& inteHead);
void captureDeclaredGroupData(const Opm::Schedule& sched,
const std::size_t simStep,
const Opm::SummaryState& sumState,
const std::vector<int>& inteHead);
void captureDeclaredGroupData(const Opm::Schedule& sched,
const Opm::UnitSystem& units,
const std::size_t simStep,
const Opm::SummaryState& sumState,
const std::vector<int>& inteHead);
const std::vector<int>& getIGroup() const
{
@@ -104,6 +106,19 @@ public:
{"GGPTH", 143},
{"GGITH", 144},
};
using inj_cmode_enum = Opm::Group::InjectionCMode;
const std::map<inj_cmode_enum, int> cmodeToNum = {
{inj_cmode_enum::NONE, 0},
{inj_cmode_enum::RATE, 1},
{inj_cmode_enum::RESV, 2},
{inj_cmode_enum::REIN, 3},
{inj_cmode_enum::VREP, 4},
{inj_cmode_enum::FLD, 0},
{inj_cmode_enum::SALE, 0},
};
const std::map<std::string, size_t> fieldKeyToIndex = {
{"FOPR", 0},

View File

@@ -23,6 +23,7 @@
#include <opm/output/eclipse/WindowedArray.hpp>
#include <opm/io/eclipse/PaddedOutputString.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.hpp>
#include <cstddef>
#include <string>
@@ -39,6 +40,11 @@ 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
{

View File

@@ -25,7 +25,7 @@
#include <vector>
namespace Opm {
class Tuning;
struct Tuning;
class Schedule;
class UDQParams;
}
@@ -39,7 +39,18 @@ namespace Opm { namespace RestartIO {
std::chrono::time_point<std::chrono::system_clock> start;
std::chrono::duration<double, std::chrono::seconds::period> elapsed;
};
struct guideRate {
double A;
double B;
double C;
double D;
double E;
double F;
double delay;
double damping_fact;
};
DoubHEAD();
~DoubHEAD() = default;
@@ -50,7 +61,6 @@ namespace Opm { namespace RestartIO {
DoubHEAD& operator=(DoubHEAD&& rhs) = default;
DoubHEAD& tuningParameters(const Tuning& tuning,
const std::size_t lookup_step,
const double cnvT);
DoubHEAD& timeStamp(const TimeStamp& ts);
@@ -59,8 +69,9 @@ namespace Opm { namespace RestartIO {
DoubHEAD& drsdt(const Schedule& sched,
const std::size_t lookup_step,
const double cnvT);
DoubHEAD& udq_param(const UDQParams& udqPar);
DoubHEAD& guide_rate_param(const guideRate& guide_rp);
const std::vector<double>& data() const
{

View File

@@ -25,15 +25,16 @@
#include <memory>
#include <vector>
namespace Opm { namespace RestartIO {
namespace Opm {
class UnitSystem;
namespace RestartIO {
class InteHEAD
{
public:
enum class UnitSystem {
Metric, Field, Lab, PVT_M
};
struct WellTableDim {
int numWells;
int maxPerf;
@@ -93,8 +94,24 @@ namespace Opm { namespace RestartIO {
struct UdqParam {
int udqParam_1;
int no_wudqs;
int no_gudqs;
int no_fudqs;
int no_iuads;
int no_iuaps;
};
struct ActionParam {
int no_actions;
int max_no_sched_lines_per_action;
int max_no_conditions_per_action;
int max_no_characters_per_line;
};
struct GuideRateNominatedPhase {
int nominated_phase;
};
InteHEAD();
~InteHEAD() = default;
@@ -115,14 +132,19 @@ namespace Opm { namespace RestartIO {
InteHEAD& params_NWELZ(const int niwelz, const int nswelz, const int nxwelz, const int nzwelz);
InteHEAD& params_NCON(const int niconz, const int nsconz, const int nxconz);
InteHEAD& params_GRPZ(const std::array<int, 4>& grpz);
InteHEAD& params_NGCTRL(const int gct);
InteHEAD& params_NAAQZ(const int ncamax, const int niaaqz, const int nsaaqz, const int nxaaqz, const int nicaqz, const int nscaqz, const int nacaqz);
InteHEAD& stepParam(const int tstep, const int report_step);
InteHEAD& tuningParam(const TuningPar& tunpar);
InteHEAD& variousParam(const int version, const int iprog);
InteHEAD& wellSegDimensions(const WellSegDims& wsdim);
InteHEAD& regionDimensions(const RegDims& rdim);
InteHEAD& ngroups(const Group& gr);
InteHEAD& ngroups(const Group& gr);
InteHEAD& udqParam_1(const UdqParam& udqpar);
InteHEAD& actionParam(const ActionParam& act_par);
InteHEAD& variousUDQ_ACTIONXParam();
InteHEAD& nominatedPhaseGuideRate(GuideRateNominatedPhase nphase);
InteHEAD& whistControlMode(int mode);
const std::vector<int>& data() const
{

View File

@@ -23,7 +23,6 @@
#include <vector>
namespace Opm {
class Eclipse3DProperties;
class Schedule;
class EclipseGrid;
@@ -31,7 +30,7 @@ namespace out {
class RegionCache {
public:
RegionCache() = default;
RegionCache(const Eclipse3DProperties& properties, const EclipseGrid& grid, const Schedule& schedule);
RegionCache(const std::vector<int>& fipnum, const EclipseGrid& grid, const Schedule& schedule);
const std::vector<std::pair<std::string,size_t>>& connections( int region_id ) const;
private:

View File

@@ -18,17 +18,19 @@
#ifndef RESTART_VALUE_HPP
#define RESTART_VALUE_HPP
#include <string>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
#include <opm/output/data/Aquifer.hpp>
#include <opm/output/data/Solution.hpp>
#include <opm/output/data/Wells.hpp>
namespace Opm {
class RestartKey {
public:
@@ -51,24 +53,30 @@ namespace Opm {
required(_required)
{}
bool operator==(const RestartKey& key2) const
{
return key == key2.key &&
dim == key2.dim &&
required == key2.required;
}
};
/*
A simple class used to communicate values between the simulator and the
RestartIO function.
A simple class used to communicate values between the simulator and
the RestartIO functions.
*/
class RestartValue {
public:
using ExtraVector = std::vector<std::pair<RestartKey, std::vector<double>>>;
data::Solution solution;
data::Wells wells;
ExtraVector extra;
std::vector<data::AquiferData> aquifer;
RestartValue(data::Solution sol, data::Wells wells_arg);
RestartValue() {}
bool hasExtra(const std::string& key) const;
void addExtra(const std::string& key, UnitSystem::measure dimension, std::vector<double> data);
void addExtra(const std::string& key, std::vector<double> data);
@@ -76,9 +84,15 @@ namespace Opm {
void convertFromSI(const UnitSystem& units);
void convertToSI(const UnitSystem& units);
bool operator==(const RestartValue& val2) const
{
return solution == val2.solution &&
wells == val2.wells &&
extra == val2.extra;
}
};
}
#endif
#endif // RESTART_VALUE_HPP

View File

@@ -0,0 +1,70 @@
/*
Copyright (c) 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/>.
*/
#ifndef OPM_OUTPUT_ECLIPSE_VECTOR_AQUIFER_HPP
#define OPM_OUTPUT_ECLIPSE_VECTOR_AQUIFER_HPP
#include <vector>
namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
namespace IAnalyticAquifer {
enum index : std::vector<int>::size_type {
NumAquiferConn = 0,
WatPropTable = 1,
TypeRelated1 = 9,
TypeRelated2 = 10,
};
} // IAnalyticAquifer
namespace SAnalyticAquifer {
enum index : std::vector<float>::size_type {
Compressibility = 0,
FetInitVol = 1,
FetProdIndex = 2,
FetTimeConstant = 3,
CTRadius = 1,
CTPermeability = 2,
CTPorosity = 3,
InitPressure = 4,
DatumDepth = 5,
CTThickness = 6,
CTAngle = 7,
CTWatMassDensity = 8,
CTWatViscosity = 9,
};
} // SAnalyticAquifer
namespace XAnalyticAquifer {
enum index : std::vector<double>::size_type {
FlowRate = 0,
Pressure = 1, // Dynamic aquifer pressure
ProdVolume = 2, // Liquid volume produced from aquifer (into reservoir)
TotalArea = 3,
};
} // XAnalyticAquifer
}}}} // Opm::RestartIO::Helpers::VectorItems
#endif // OPM_OUTPUT_ECLIPSE_VECTOR_AQUIFER_HPP

View File

@@ -57,6 +57,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
item30 = 29, // Unknown
item31 = 30, // Unknown
CFInDeck = 40, // = 0 for connection factor not defined, = 1 for connection factor defined
};
} // SConn

View File

@@ -27,12 +27,20 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
// This is a subset of the items in src/opm/output/eclipse/DoubHEAD.cpp .
// Promote items from that list to this in order to make them public.
enum doubhead : std::vector<double>::size_type {
TsInit = 1, // Maximum Length of Next Timestep
TsMaxz = 2, // Maximum Length of Timestep After Next
TsMinz = 3, // Minumum Length of All Timesteps
UdqPar_2 = 212, // UDQPARAM item number 2 (Permitted range (+/-) of user-defined quantities)
UdqPar_3 = 213, // UDQPARAM item number 3 (Value given to undefined elements when outputting data)
UdqPar_4 = 214, // UDQPARAM item number 4 (fractional equality tolerance used in ==, <= etc. functions)
TsInit = 1, // Maximum Length of Next Timestep
TsMaxz = 2, // Maximum Length of Timestep After Next
TsMinz = 3, // Minumum Length of All Timesteps
GRpar_a = 87, // Guiderate parameter A
GRpar_b = 88, // Guiderate parameter B
GRpar_c = 89, // Guiderate parameter C
GRpar_d = 90, // Guiderate parameter D
GRpar_e = 91, // Guiderate parameter E
GRpar_f = 92, // Guiderate parameter F
GRpar_int = 97, // Guiderate parameter delay interval
GRpar_damp = 144, // Guiderate parameter damping factor
UdqPar_2 = 212, // UDQPARAM item number 2 (Permitted range (+/-) of user-defined quantities)
UdqPar_3 = 213, // UDQPARAM item number 3 (Value given to undefined elements when outputting data)
UdqPar_4 = 214, // UDQPARAM item number 4 (fractional equality tolerance used in ==, <= etc. functions)
};
}}}} // Opm::RestartIO::Helpers::VectorItems

View File

@@ -24,6 +24,30 @@
namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
namespace SGroup {
enum prod_index : std::vector<float>::size_type {
OilRateLimit = 6, // Group's oil production target/limit
WatRateLimit = 7, // Group's water production target/limit
GasRateLimit = 8, // Group's gas production target/limit
LiqRateLimit = 9, // Group's liquid production target/limit
};
enum inj_index : std::vector<float>::size_type {
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
waterVoidageLimit = 18, // Group's water voidage injection fraction target/limit
gasSurfRateLimit = 20, // Group's gas surface volume injection rate target/limit
gasResRateLimit = 21, // Group's gas reservoir volume injection rate target/limit
gasReinjectionLimit = 22, // Group's gas reinjection fraction target/limit
gasVoidageLimit = 23, // Group's gas voidage injection fraction target/limit
};
} // SGroup
namespace XGroup {
enum index : std::vector<double>::size_type {
OilPrRate = 0, // Group's oil production rate

View File

@@ -27,66 +27,110 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
// This is a subset of the items in src/opm/output/eclipse/InteHEAD.cpp .
// Promote items from that list to this in order to make them public.
enum intehead : std::vector<int>::size_type {
ISNUM = 0, // An encoded integer corresponding to the
// time the file was created. For files not
// originating from ECLIPSE, this value may
// be set to zero.
ISNUM = 0, // An encoded integer corresponding to the
// time the file was created. For files not
// originating from ECLIPSE, this value may
// be set to zero.
VERSION = 1, // Simulator version
UNIT = 2, // Units convention
// 1: METRIC, 2: FIELD, 3: LAB, 4: PVT-M
VERSION = 1, // Simulator version
UNIT = 2, // Units convention
// 1: METRIC, 2: FIELD, 3: LAB, 4: PVT-M
NX = 8, // #cells in X direction (Cartesian)
NY = 9, // #cells in Y direction (Cartesian)
NZ = 10, // #cells in Z direction (Cartesian)
NACTIV = 11, // Number of active cells
NX = 8, // #cells in X direction (Cartesian)
NY = 9, // #cells in Y direction (Cartesian)
NZ = 10, // #cells in Z direction (Cartesian)
NACTIV = 11, // Number of active cells
PHASE = 14, // Phase indicator:
// 1: oil, 2: water, 3: O/W, 4: gas,
// 5: G/O, 6: G/W, 7: O/G/W
PHASE = 14, // Phase indicator:
// 1: oil, 2: water, 3: O/W, 4: gas,
// 5: G/O, 6: G/W, 7: O/G/W
NWELLS = 16, // Number of wells
NCWMAX = 17, // Maximum number of completions per well
NWGMAX = 19, // Maximum number of wells in any well group
NGMAXZ = 20, // Maximum number of groups in field
NWELLS = 16, // Number of wells
NCWMAX = 17, // Maximum number of completions per well
NGRP = 18, // Actual number of groups
NWGMAX = 19, // Maximum number of wells in any well group
NGMAXZ = 20, // Maximum number of groups in field
NIWELZ = 24, // Number of data elements per well in IWEL array
// (default 97 for ECLIPSE, 94 for ECLIPSE 300).
NSWELZ = 25, // Number of data elements per well in SWEL array
NXWELZ = 26, // Number of delements per well in XWEL array
NZWELZ = 27, // Number of 8-character words per well in ZWEL array
NIWELZ = 24, // Number of data elements per well in IWEL array
// (default 97 for ECLIPSE, 94 for ECLIPSE 300).
NSWELZ = 25, // Number of data elements per well in SWEL array
NXWELZ = 26, // Number of delements per well in XWEL array
NZWELZ = 27, // Number of 8-character words per well in ZWEL array
NICONZ = 32, // Number of data elements per completion
// in ICON array (default 19)
NSCONZ = 33, // Number of data elements per completion in SCON array
NXCONZ = 34, // Number of data elements per completion in XCON array
NICONZ = 32, // Number of data elements per completion
// in ICON array (default 19)
NSCONZ = 33, // Number of data elements per completion in SCON array
NXCONZ = 34, // Number of data elements per completion in XCON array
NIGRPZ = 36, // Number of data elements per group in IGRP array
NSGRPZ = 37, // Number of data elements per group in SGRP array
NXGRPZ = 38, // Number of data elements per group in XGRP array
NZGRPZ = 39, // Number of data elements per group in ZGRP array
NIGRPZ = 36, // Number of data elements per group in IGRP array
NSGRPZ = 37, // Number of data elements per group in SGRP array
NXGRPZ = 38, // Number of data elements per group in XGRP array
NZGRPZ = 39, // Number of data elements per group in ZGRP array
NCAMAX = 41, // Maximum number of analytic aquifer connections
NCAMAX = 41, // Maximum number of analytic aquifer connections
NIAAQZ = 42, // Number of data elements per aquifer in IAAQ array
NSAAQZ = 43, // Number of data elements per aquifer in SAAQ array
NXAAQZ = 44, // Number of data elements per aquifer in XAAQ array
NIAAQZ = 42, // Number of data elements per aquifer in IAAQ array
NSAAQZ = 43, // Number of data elements per aquifer in SAAQ array
NXAAQZ = 44, // Number of data elements per aquifer in XAAQ array
NICAQZ = 45, // Number of data elements per aquifer connection in ICAQ array
NSCAQZ = 46, // Number of data elements per aquifer connection in SCAQ array
NACAQZ = 47, // Number of data elements per aquifer connection in ACAQ array
NICAQZ = 45, // Number of data elements per aquifer connection in ICAQ array
NSCAQZ = 46, // Number of data elements per aquifer connection in SCAQ array
NACAQZ = 47, // Number of data elements per aquifer connection in ACAQ array
NWMAXZ = 163, // Maximum number of wells in the model
NSEGWL = 174, // Number of multisegment wells defined with WELSEG
NSWLMX = 175, // Maximum number of segmented wells (item 1 ofWSEGDIMS)
NSEGMX = 176, // Maximum number of segments per well (item 2 of WSEGDIMS)
NLBRMX = 177, // Maximum number of lateral branches (item 3 of WSEGDIMS)
NGCTRL = 51, // Index indicating if group control is used or not (1 - if group control, 0 if not)
NISEGZ = 178, // Number of entries per segment in ISEG array
NRSEGZ = 179, // Number of entries per segment in RSEG array
NILBRZ = 180, // Number of entries per segment in ILBR array
UDQPAR_1 = 267, // Integer seed value for the RAND /
NGRNPH = 58, // Index indicating if group control is used or not (1 - if group control, 0 if not)
DAY = 64, // Calendar day of report step (1..31)
MONTH = 65, // Calendar month of report step (1..12)
YEAR = 66, // Calendar year of report step
NUM_SOLVER_STEPS = 67, //
REPORT_STEP = 68, //
WHISTC = 71, // Calendar year of report step
NEWTMX = 80, // Tuning, Record3, Item1
NEWTMN = 81, // Tuning, Record3, Item2
LITMAX = 82, // Tuning, Record3, Item3
LITMIN = 83, // Tuning, Record3, Item4
MXWSIT = 86, // Tuning, Record3, Item5
MXWPIT = 87, // Tuning, Record3, Item6
NTFIP = 89, // REGDIMS item1, or TABDIMS item 5
IPROG = 94, // IPROG = simulation program identifier: 100 - ECLIPSE 100, 300 - ECLIPSE 300, 500 - ECLIPSE 300
// (thermal option), negative - Other simulator,
NMFIPR = 99, // REGDIMS item2
NOOFACTIONS = 156, // The number of actions in the dataset
MAXNOLINES = 157, // Maximum number of lines of schedule data for ACTION keyword - including ENDACTIO
MAXNOSTRPRLINE = 158, // Maximum number of 8-chars strings pr input line of Action data (rounded up from input)
NWMAXZ = 163, // Maximum number of wells in the model
NSEGWL = 174, // Number of multisegment wells defined with WELSEG
NSWLMX = 175, // Maximum number of segmented wells (item 1 ofWSEGDIMS)
NSEGMX = 176, // Maximum number of segments per well (item 2 of WSEGDIMS)
NLBRMX = 177, // Maximum number of lateral branches (item 3 of WSEGDIMS)
NISEGZ = 178, // Number of entries per segment in ISEG array
NRSEGZ = 179, // Number of entries per segment in RSEG array
NILBRZ = 180, // Number of entries per segment in ILBR array
IHOURZ = 206, // IHOURZ = current simulation time HH:MM:SS number of hours (HH) (0-23).
IMINTS = 207, // IMINTS = current simulation time HH:MM:SS number of minutes (MM) (0-59).
MAX_ACT_COND = 245, // Maximum number of conditions pr action
MAX_AN_AQUIFERS = 252, // Maximum number of analytic aquifers
NO_FIELD_UDQS = 262, // No of Field UDQ data (parameters) /
NO_GROUP_UDQS = 263, // No of Group UDQ data (parameters) /
NO_WELL_UDQS = 266, // No of Well UDQ data (parameters) /
UDQPAR_1 = 267, // Integer seed value for the RAND /
NO_IUADS = 290, // No IUADs
NO_IUAPS = 291, // No IUAPs
RSEED = 296,
ISECND = 410 // ISECND = current simulation time HH:MM:SS - number of seconds (SS), reported in microseconds
// (0-59,999,999)
};
}}}} // Opm::RestartIO::Helpers::VectorItems

View File

@@ -30,7 +30,13 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
OutSeg = 1, // Outlet segment (one-based)
InSegCurBranch = 2, // Inflow segment current branch (one-based)
BranchNo = 3, // Branch number (one-based)
SegmentType = 11,
ICDScalingMode = 18,
ICDOpenShutFlag = 19,
};
} // ISeg
namespace RSeg {
@@ -50,6 +56,26 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
Pressure = 11, // Segment pressure
item40 = 39, // Unknown
ValveLength = 40, // Length of valve
ValveArea = 41, // Cross-sectional area of valve
ValveFlowCoeff = 42, // Valve's dimensionless flow coefficient
ValveMaxArea = 43, // Maximal cross-sectional valve area
DeviceBaseStrength = 86,
CalibrFluidDensity = 88,
CalibrFluidViscosity = 89,
CriticalWaterFraction = 90,
TransitionRegWidth = 91,
MaxEmulsionRatio = 92,
MaxValidFlowRate = 97,
ICDLength = 102,
ValveAreaFraction = 103,
item106 = 105, // Unknown
item107 = 106, // Unknown
item108 = 107, // Unknown

View File

@@ -63,7 +63,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
namespace Value {
enum WellType : int {
WTUnk = 0, // Unknown well type (OPM only)
Producer = 1, // Well is producer
OilInj = 2, // Well is oil injector
WatInj = 3, // Well is water injector
@@ -180,6 +179,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
namespace ZWell {
enum index : std::vector<const char*>::size_type {
WellName = 0, // Well name
ActionX = 2, // ActionX name
};
} // ZWell
}}}} // Opm::RestartIO::Helpers::VectorItems

View File

@@ -31,6 +31,7 @@
namespace Opm {
class Runspec;
class EclipseGrid;
class EclipseState;
class Schedule;
@@ -69,6 +70,10 @@ namespace Opm { namespace RestartIO { namespace Helpers {
const std::size_t lookup_step,
const std::vector<int>& inteHead);
std::vector<int>
createActionxDims( const Runspec& rspec,
const Schedule& sched,
const std::size_t simStep);
}}} // Opm::RestartIO::Helpers

View File

@@ -26,8 +26,6 @@
#include <vector>
#include <string>
#include <boost/filesystem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
@@ -100,8 +98,8 @@ namespace Opm {
DeckView( const_iterator first, const_iterator last );
explicit DeckView( std::pair< const_iterator, const_iterator > );
void reinit( const_iterator, const_iterator );
DeckView() = default;
void init( const_iterator, const_iterator );
private:
const_iterator first;
@@ -126,9 +124,15 @@ namespace Opm {
Deck();
Deck( const Deck& );
Deck(const std::vector<DeckKeyword>& keywords,
const UnitSystem& defUnits,
const UnitSystem* activeUnits,
const std::string& dataFile,
const std::string& inputPath,
size_t accessCount);
//! \brief Deleted assignment operator.
Deck& operator=(const Deck& rhs) = delete;
Deck& operator=(const Deck& rhs);
bool operator==(const Deck& data) const;
void addKeyword( DeckKeyword&& keyword );
void addKeyword( const DeckKeyword& keyword );
@@ -139,6 +143,7 @@ namespace Opm {
const UnitSystem& getActiveUnitSystem() const;
UnitSystem& getActiveUnitSystem();
UnitSystem& getDefaultUnitSystem();
void selectActiveUnitSystem( UnitSystem::UnitType unit_type );
const std::string& getInputPath() const;
const std::string& getDataFile() const;
@@ -149,15 +154,20 @@ namespace Opm {
iterator end();
void write( DeckOutput& output ) const ;
friend std::ostream& operator<<(std::ostream& os, const Deck& deck);
const std::vector<DeckKeyword>& keywords() const;
std::size_t unitSystemAccessCount() const;
const std::unique_ptr<UnitSystem>& activeUnitSystem() const;
private:
Deck( std::vector< DeckKeyword >&& );
Deck(std::vector<DeckKeyword>&& keywordList);
std::vector< DeckKeyword > keywordList;
UnitSystem defaultUnits;
UnitSystem activeUnits;
std::unique_ptr<UnitSystem> activeUnits;
std::string m_dataFile;
std::string input_path;
mutable std::size_t unit_system_access_count = 0;
};
}
#endif /* DECK_HPP */

View File

@@ -28,17 +28,32 @@
#include <opm/parser/eclipse/Units/Dimension.hpp>
#include <opm/parser/eclipse/Utility/Typetools.hpp>
#include <opm/parser/eclipse/Deck/UDAValue.hpp>
#include <opm/parser/eclipse/Deck/value_status.hpp>
namespace Opm {
class DeckOutput;
class DeckItem {
public:
DeckItem() = default;
DeckItem( const std::string&, int);
DeckItem( const std::string&, double);
DeckItem( const std::string&, std::string);
DeckItem( const std::string&, UDAValue);
DeckItem( const std::string&, double) = delete;
DeckItem( const std::string&, UDAValue) = delete;
DeckItem( const std::string&, UDAValue, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
DeckItem( const std::string&, double, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
DeckItem(const std::vector<double>& dVec,
const std::vector<int>& iVec,
const std::vector<std::string>& sVec,
const std::vector<UDAValue>& uVec,
type_tag type,
const std::string& itemName,
const std::vector<value::status>& valueStat,
bool rawdata,
const std::vector<Dimension>& activeDim,
const std::vector<Dimension>& defDim);
const std::string& name() const;
@@ -55,16 +70,19 @@ namespace Opm {
// keywords like e.g. SGL), then the remaining values are defaulted. The deck
// creates the defaulted items if all their sizes are fully specified by the
// keyword, though...
size_t size() const;
size_t out_size() const;
//template< typename T > T& get( size_t ) ;
template< typename T > T get( size_t ) const;
size_t data_size() const;
template<typename T>
T get( size_t index ) const;
double getSIDouble( size_t ) const;
std::string getTrimmedString( size_t ) const;
template< typename T > const std::vector< T >& getData() const;
const std::vector< double >& getSIDoubleData() const;
const std::vector<value::status>& getValueStatus() const;
void push_back( UDAValue );
void push_back( int );
@@ -79,10 +97,9 @@ namespace Opm {
void push_backDefault( double );
void push_backDefault( std::string );
// trying to access the data of a "dummy default item" will raise an exception
void push_backDummyDefault();
void push_backDimension( const Dimension& /* activeDimension */,
const Dimension& /* defaultDimension */);
template <typename T>
void push_backDummyDefault();
type_tag getType() const;
@@ -97,7 +114,6 @@ namespace Opm {
account, i.e. two items will compare differently if one is
defaulted and the other has the default value explicitly
set. The default behaviour is cmp_default == false -
i.e. only the actual values in the items will be compared,
itrespective of whether they have been set explicitly or
have been defaulted.
*/
@@ -110,6 +126,24 @@ namespace Opm {
bool operator==(const DeckItem& other) const;
bool operator!=(const DeckItem& other) const;
static bool to_bool(std::string string_value);
const std::vector<double>& dVal() const;
const std::vector<int>& iVal() const;
const std::vector<std::string>& sVal() const;
const std::vector<UDAValue>& uVal() const;
const std::vector<value::status>& valueStatus() const;
bool rawData() const;
const std::vector<Dimension>& activeDimensions() const;
const std::vector<Dimension>& defaultDimensions() const;
bool is_uda() { return (type == get_type< UDAValue >()); };
bool is_double() { return type == get_type< double >(); };
bool is_int() { return type == get_type< int >() ; };
bool is_string() { return type == get_type< std::string >(); };
UDAValue& get_uda() { return uval[0]; };
private:
mutable std::vector< double > dval;
std::vector< int > ival;
@@ -119,14 +153,16 @@ namespace Opm {
type_tag type = type_tag::unknown;
std::string item_name;
std::vector< bool > defaulted;
std::vector< Dimension > dimensions;
std::vector<value::status> value_status;
/*
To save space we mutate the dval object in place when asking for SI
data; the current state of of the dval member is tracked with the
raw_data bool member.
*/
mutable bool raw_data = true;
std::vector< Dimension > active_dimensions;
std::vector< Dimension > default_dimensions;
template< typename T > std::vector< T >& value_ref();
template< typename T > const std::vector< T >& value_ref() const;
template< typename T > void push( T );

View File

@@ -28,6 +28,8 @@
#include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckValue.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/Deck/value_status.hpp>
#include <opm/common/OpmLog/Location.hpp>
namespace Opm {
class DeckOutput;
@@ -35,38 +37,45 @@ namespace Opm {
class DeckKeyword {
public:
typedef std::vector< DeckRecord >::const_iterator const_iterator;
DeckKeyword();
explicit DeckKeyword(const ParserKeyword& parserKeyword);
DeckKeyword(const ParserKeyword& parserKeyword, const std::string& keywordName);
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<std::vector<DeckValue>>& record_list);
DeckKeyword(const Location& location, const std::string& keywordName);
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<std::vector<DeckValue>>& record_list, UnitSystem& system_active, UnitSystem& system_default);
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<int>& data);
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<double>& data);
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<double>& data, UnitSystem& system_active, UnitSystem& system_default);
DeckKeyword(const std::string& kwName,
const Location& loc,
const std::vector<DeckRecord>& record,
bool dataKw,
bool slashTerminated);
const std::string& name() const;
void setFixedSize();
void setLocation(const std::pair<const std::string&, std::size_t>& location);
const std::string& getFileName() const;
int getLineNumber() const;
std::pair<std::string, std::size_t> location() const;
const Location& location() const;
size_t size() const;
void addRecord(DeckRecord&& record);
const DeckRecord& getRecord(size_t index) const;
DeckRecord& getRecord(size_t index);
const std::vector<DeckRecord>& records() const;
const DeckRecord& getDataRecord() const;
void setDataKeyword(bool isDataKeyword = true);
void setDoubleRecordKeyword(bool isDoubleRecordKeyword = true);
bool isDataKeyword() const;
bool isDoubleRecordKeyword() const;
bool isSlashTerminated() const;
const std::vector<int>& getIntData() const;
const std::vector<double>& getRawDoubleData() const;
const std::vector<double>& getSIDoubleData() const;
const std::vector<std::string>& getStringData() const;
const ParserKeyword& parserKeyword() const;
const std::vector<value::status>& getValueStatus() const;
size_t getDataSize() const;
void write( DeckOutput& output ) const;
void write_data( DeckOutput& output ) const;
@@ -90,13 +99,12 @@ namespace Opm {
friend std::ostream& operator<<(std::ostream& os, const DeckKeyword& keyword);
private:
std::string m_keywordName;
std::string m_fileName;
int m_lineNumber;
Location m_location;
std::vector< DeckRecord > m_recordList;
bool m_isDataKeyword;
bool m_slashTerminated;
ParserKeyword parser_keyword;
bool m_isDoubleRecordKeyword = false;
};
}

View File

@@ -70,6 +70,8 @@ namespace Opm {
bool operator==(const DeckRecord& other) const;
bool operator!=(const DeckRecord& other) const;
const std::vector<DeckItem>& getItems() const;
private:
std::vector< DeckItem > m_items;

View File

@@ -26,14 +26,26 @@
namespace Opm {
enum class Section {
RUNSPEC,
GRID,
EDIT,
PROPS,
REGIONS,
SOLUTION,
SUMMARY,
SCHEDULE
};
class UnitSystem;
class Parser;
class Section : public DeckView {
class DeckSection : public DeckView {
public:
using DeckView::const_iterator;
Section( const Deck& deck, const std::string& startKeyword );
DeckSection( const Deck& deck, const std::string& startKeyword );
const std::string& name() const;
const UnitSystem& unitSystem() const;
@@ -58,52 +70,52 @@ class Section : public DeckView {
};
class RUNSPECSection : public Section {
class RUNSPECSection : public DeckSection {
public:
using Section::const_iterator;
explicit RUNSPECSection(const Deck& deck) : Section(deck, "RUNSPEC") {}
using DeckSection::const_iterator;
explicit RUNSPECSection(const Deck& deck) : DeckSection(deck, "RUNSPEC") {}
};
class GRIDSection : public Section {
class GRIDSection : public DeckSection {
public:
using Section::const_iterator;
explicit GRIDSection(const Deck& deck) : Section(deck, "GRID") {}
using DeckSection::const_iterator;
explicit GRIDSection(const Deck& deck) : DeckSection(deck, "GRID") {}
};
class EDITSection : public Section {
class EDITSection : public DeckSection {
public:
using Section::const_iterator;
explicit EDITSection(const Deck& deck) : Section(deck, "EDIT") {}
using DeckSection::const_iterator;
explicit EDITSection(const Deck& deck) : DeckSection(deck, "EDIT") {}
};
class PROPSSection : public Section {
class PROPSSection : public DeckSection {
public:
using Section::const_iterator;
explicit PROPSSection(const Deck& deck) : Section(deck, "PROPS") {}
using DeckSection::const_iterator;
explicit PROPSSection(const Deck& deck) : DeckSection(deck, "PROPS") {}
};
class REGIONSSection : public Section {
class REGIONSSection : public DeckSection {
public:
using Section::const_iterator;
explicit REGIONSSection(const Deck& deck) : Section(deck, "REGIONS") {}
using DeckSection::const_iterator;
explicit REGIONSSection(const Deck& deck) : DeckSection(deck, "REGIONS") {}
};
class SOLUTIONSection : public Section {
class SOLUTIONSection : public DeckSection {
public:
using Section::const_iterator;
explicit SOLUTIONSection(const Deck& deck) : Section(deck, "SOLUTION") {}
using DeckSection::const_iterator;
explicit SOLUTIONSection(const Deck& deck) : DeckSection(deck, "SOLUTION") {}
};
class SUMMARYSection : public Section {
class SUMMARYSection : public DeckSection {
public:
using Section::const_iterator;
explicit SUMMARYSection(const Deck& deck) : Section(deck, "SUMMARY") {}
using DeckSection::const_iterator;
explicit SUMMARYSection(const Deck& deck) : DeckSection(deck, "SUMMARY") {}
};
class SCHEDULESection : public Section {
class SCHEDULESection : public DeckSection {
public:
using Section::const_iterator;
explicit SCHEDULESection(const Deck& deck) : Section(deck, "SCHEDULE") {}
using DeckSection::const_iterator;
explicit SCHEDULESection(const Deck& deck) : DeckSection(deck, "SCHEDULE") {}
};
}

View File

@@ -34,10 +34,24 @@ public:
UDAValue();
explicit UDAValue(double);
explicit UDAValue(const std::string&);
UDAValue(const UDAValue& src, const Dimension& dim);
UDAValue(double data, const Dimension& dim);
UDAValue(const std::string& data, const Dimension& dim);
/*
The get<double>() and get<std::string>() methods will throw an
exception if the internal type and the template parameter disagree.
*/
template<typename T>
T get() const;
/*
The getSI() can only be called for numerical values.
*/
double getSI() const;
bool zero() const;
template<typename T>
bool is() const;
@@ -46,11 +60,13 @@ public:
void assert_numeric() const;
void assert_numeric(const std::string& error_msg) const;
void set_dim(const Dimension& dim) const;
const Dimension& get_dim() const;
bool operator==(const UDAValue& other) const;
bool operator!=(const UDAValue& other) const;
bool is_numeric() { return numeric_value; }
private:
bool numeric_value;
double double_value;
@@ -58,7 +74,7 @@ private:
/* This 'mutable' modifier is a hack to avoid tampering with the overall
const-ness of the data in a deck item. */
mutable Dimension dim;
Dimension dim;
};
std::ostream& operator<<( std::ostream& stream, const UDAValue& uda_value );

View File

@@ -0,0 +1,56 @@
/*
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/>.
*/
#ifndef VALUE_STATUS
#define VALUE_STATUS
namespace Opm {
namespace value {
enum class status : unsigned char { uninitialized = 0,
deck_value = 1,
empty_default = 2,
valid_default = 3 };
inline bool defaulted(status st) {
if (st == status::empty_default)
return true;
if (st == status::valid_default)
return true;
return false;
}
inline bool has_value(status st) {
if (st == status::deck_value)
return true;
if (st == status::valid_default)
return true;
return false;
}
}
}
#endif

View File

@@ -26,7 +26,10 @@
implement the analytical aquifer models in OPM Flow.
*/
#include <unordered_map>
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/Parser/ParserKeywords/A.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
@@ -34,44 +37,54 @@
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
namespace Opm {
namespace{
struct AquanconRecord;
}
class Aquancon {
public:
struct AquanconOutput{
int aquiferID;
std::vector<size_t> global_index;
std::vector<std::shared_ptr<double>> influx_coeff; // Size = size(global_index)
std::vector<double> influx_multiplier; // Size = size(global_index)
std::vector<int> reservoir_face_dir; // Size = size(global_index)
std::vector<int> record_index;
};
struct AquancCell {
int aquiferID;
std::size_t global_index;
std::pair<bool, double> influx_coeff;
double influx_mult;
FaceDir::DirEnum face_dir;
AquancCell(int aquiferID_arg, std::size_t gi, const std::pair<bool, double>& ic, double im, FaceDir::DirEnum fd) :
aquiferID(aquiferID_arg),
global_index(gi),
influx_coeff(ic),
influx_mult(im),
face_dir(fd)
{}
AquancCell() = default;
bool operator==(const AquancCell& other) const {
return this->aquiferID == other.aquiferID &&
this->global_index == other.global_index &&
this->influx_coeff == other.influx_coeff &&
this->influx_mult == other.influx_mult &&
this->face_dir == other.face_dir;
}
};
Aquancon() = default;
Aquancon(const EclipseGrid& grid, const Deck& deck);
Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
const std::vector<Aquancon::AquanconOutput>& getAquOutput() const;
const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data() const;
bool operator==(const Aquancon& other) const;
bool active() const;
const std::vector<Aquancon::AquancCell> operator[](int aquiferID) const;
private:
static std::vector<Aquancon::AquanconOutput> logic_application(const std::vector<Aquancon::AquanconOutput>& original_vector);
static void collate_function(std::vector<Aquancon::AquanconOutput>& output_vector,
std::vector<Opm::AquanconRecord>& m_aqurecord,
const std::vector<int>& m_aquiferID_per_record, int m_maxAquID);
static void convert_record_id_to_aquifer_id(std::vector<int>& record_indices_matching_id, int i,
const std::vector<int>& m_aquiferID_per_record);
// for a cell to be inside reservoir, its indices need to be within the reservoir grid dimension range,
// and it needs to be active
static bool cellInsideReservoirAndActive(const EclipseGrid& grid, int i, int j, int k);
static bool neighborCellInsideReservoirAndActive(const EclipseGrid& grid, int i, int j, int k, FaceDir::DirEnum faceDir);
std::vector<Aquancon::AquanconOutput> m_aquoutput;
std::unordered_map<int, std::vector<Aquancon::AquancCell>> cells;
};
}

View File

@@ -39,61 +39,62 @@
namespace Opm {
class EclipseState;
class TableManager;
class AquiferCT {
public:
struct AQUCT_data{
struct AQUCT_data{
// Aquifer ID
int aquiferID;
// Table IDs
int inftableID, pvttableID;
std::vector<int> cell_id;
// Variables constants
double phi_aq , //aquifer porosity
d0, //aquifer datum depth
C_t , //total compressibility
r_o , //aquifer inner radius
k_a , //aquifer permeability
c1, // 0.008527 (METRIC, PVT-M); 0.006328 (FIELD); 3.6 (LAB)
h , //aquifer thickness
theta , //angle subtended by the aquifer boundary
c2 ; //6.283 (METRIC, PVT-M); 1.1191 (FIELD); 6.283 (LAB).
AQUCT_data(const DeckRecord& record, const TableManager& tables);
AQUCT_data() = default;
AQUCT_data(int aqID,
int infID,
int pvtID,
double phi_aq_,
double d0_,
double C_t_,
double r_o_,
double k_a_,
double c1_,
double h_,
double theta_,
double c2_,
const std::pair<bool, double>& p0_,
const std::vector<double>& td_,
const std::vector<double>& pi_,
const std::vector<int>& cell_id_);
std::shared_ptr<double> p0; //Initial aquifer pressure at datum depth, d0
std::vector<double> td, pi;
};
int aquiferID;
int inftableID, pvttableID;
AquiferCT(const EclipseState& eclState, const Deck& deck);
double phi_aq , // aquifer porosity
d0, // aquifer datum depth
C_t , // total compressibility
r_o , // aquifer inner radius
k_a , // aquifer permeability
c1, // 0.008527 (METRIC, PVT-M); 0.006328 (FIELD); 3.6 (LAB)
h , // aquifer thickness
theta , // angle subtended by the aquifer boundary
c2 ; // 6.283 (METRIC, PVT-M); 1.1191 (FIELD); 6.283 (LAB).
const std::vector<AquiferCT::AQUCT_data>& getAquifers() const;
int getAqInflTabID(size_t aquiferIndex);
int getAqPvtTabID(size_t aquiferIndex);
std::pair<bool, double> p0; //Initial aquifer pressure at datum depth, d0
std::vector<double> td, pi;
std::vector<int> cell_id;
private:
std::vector<AquiferCT::AQUCT_data> m_aquct;
//Set the default Pd v/s Td tables (constant terminal rate case for an infinite aquifer) as described in
//Van Everdingen, A. & Hurst, W., December, 1949.The Application of the Laplace Transformation to Flow Problems in Reservoirs.
//Petroleum Transactions, AIME.
inline void set_default_tables(std::vector<double>& td, std::vector<double>& pi)
{
std::vector<double> default_pressure_ = { 0.112, 0.229, 0.315, 0.376, 0.424, 0.469, 0.503, 0.564, 0.616, 0.659, 0.702, 0.735,
0.772, 0.802, 0.927, 1.02, 1.101, 1.169, 1.275, 1.362, 1.436, 1.5, 1.556, 1.604,
1.651, 1.829, 1.96, 2.067, 2.147, 2.282, 2.388, 2.476, 2.55, 2.615, 2.672, 2.723,
2.921, 3.064, 3.173, 3.263, 3.406, 3.516, 3.608, 3.684, 3.75, 3.809, 3.86 };
std::vector<double> default_time_ = { 0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1,
1.5, 2, 2.5, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50, 60, 70,
80, 90, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000 };
td = default_time_;
pi = default_pressure_;
}
bool operator==(const AQUCT_data& other) const;
};
AquiferCT() = default;
AquiferCT(const TableManager& tables, const Deck& deck);
AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
std::size_t size() const;
std::vector<AquiferCT::AQUCT_data>::const_iterator begin() const;
std::vector<AquiferCT::AQUCT_data>::const_iterator end() const;
const std::vector<AquiferCT::AQUCT_data>& data() const;
bool operator==(const AquiferCT& other) const;
private:
std::vector<AquiferCT::AQUCT_data> m_aquct;
};
}

View File

@@ -0,0 +1,52 @@
/*
Copyright (C) 2020 Equinor
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_AUQIFER_CONFIG_HPP
#define OPM_AUQIFER_CONFIG_HPP
#include <opm/parser/eclipse/EclipseState/Aquancon.hpp>
#include <opm/parser/eclipse/EclipseState/Aquifetp.hpp>
#include <opm/parser/eclipse/EclipseState/AquiferCT.hpp>
namespace Opm {
class TableManager;
class EclipseGrid;
class Deck;
class AquiferConfig {
public:
AquiferConfig() = default;
AquiferConfig(const TableManager& tables, const EclipseGrid& grid, const Deck& deck);
AquiferConfig(const Aquifetp& fetp, const AquiferCT& ct, const Aquancon& conn);
bool active() const;
const AquiferCT& ct() const;
const Aquifetp& fetp() const;
const Aquancon& connections() const;
bool operator==(const AquiferConfig& other);
private:
Aquifetp aquifetp;
AquiferCT aquiferct;
Aquancon aqconn;
};
}
#endif

View File

@@ -25,49 +25,44 @@
This includes the logic for parsing as well as the associated tables. It is meant to be used by opm-grid and opm-simulators in order to
implement the Fetkovich analytical aquifer model in OPM Flow.
*/
#include <vector>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Parser/ParserKeywords/A.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
#include <boost/concept_check.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
namespace Opm {
class Aquifetp {
public:
class Deck;
class DeckRecord;
struct AQUFETP_data{
class Aquifetp {
public:
// Aquifer ID
int aquiferID;
// Table IDs
int inftableID, pvttableID;
std::vector<int> cell_id;
// Variables constants
double J, // Specified Productivity Index
rho, // water density in the aquifer
C_t, // total rock compressibility
V0, // initial volume of water in aquifer
d0; // aquifer datum depth
std::shared_ptr<double> p0; //Initial aquifer pressure at datum depth d0 - nullptr if the pressure has been defaulted.
};
Aquifetp(const Deck& deck);
const std::vector<Aquifetp::AQUFETP_data>& getAquifers() const;
int getAqPvtTabID(size_t aquiferIndex);
private:
std::vector<Aquifetp::AQUFETP_data> m_aqufetp;
struct AQUFETP_data{
AQUFETP_data(const DeckRecord& record);
AQUFETP_data() = default;
AQUFETP_data(int aquiferID_, int pvttableID_, double J_, double C_t_, double V0_, double d0_, const std::pair<bool, double>& p0_);
bool operator==(const AQUFETP_data& other) const;
int aquiferID;
int pvttableID;
double J, // Specified Productivity Index
C_t, // total rock compressibility
V0, // initial volume of water in aquifer
d0; // aquifer datum depth
std::pair<bool, double> p0;
};
Aquifetp() = default;
Aquifetp(const Deck& deck);
Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
const std::vector<Aquifetp::AQUFETP_data>& data() const;
std::size_t size() const;
std::vector<Aquifetp::AQUFETP_data>::const_iterator begin() const;
std::vector<Aquifetp::AQUFETP_data>::const_iterator end() const;
bool operator==(const Aquifetp& other) const;
private:
std::vector<Aquifetp::AQUFETP_data> m_aqufetp;
};
}

View File

@@ -1,112 +0,0 @@
/*
Copyright 2016 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 OPM_ECLIPSE_PROPERTIES_HPP
#define OPM_ECLIPSE_PROPERTIES_HPP
#include <vector>
#include <string>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
namespace Opm {
class Box;
class BoxManager;
class Deck;
class DeckItem;
class DeckKeyword;
class DeckRecord;
class EclipseGrid;
class Section;
class TableManager;
class UnitSystem;
/// Class representing properties on 3D grid for use in EclipseState.
class Eclipse3DProperties
{
public:
Eclipse3DProperties() = default;
Eclipse3DProperties(const Deck& deck,
const TableManager& tableManager,
const EclipseGrid& eclipseGrid);
Eclipse3DProperties( UnitSystem unit_system,
const TableManager& tableManager,
const EclipseGrid& eclipseGrid);
std::vector< int > getRegions( const std::string& keyword ) const;
std::string getDefaultRegionKeyword() const;
const GridProperty<int>& getIntGridProperty ( const std::string& keyword ) const;
const GridProperty<double>& getDoubleGridProperty ( const std::string& keyword ) const;
const GridProperties<int>& getIntProperties() const;
const GridProperties<double>& getDoubleProperties() const;
bool hasDeckIntGridProperty(const std::string& keyword) const;
bool hasDeckDoubleGridProperty(const std::string& keyword) const;
bool supportsGridProperty(const std::string& keyword) const;
private:
const GridProperty<int>& getRegion(const DeckItem& regionItem) const;
void processGridProperties(const Deck& deck,
const EclipseGrid& eclipseGrid);
void scanSection(const Section& section,
const EclipseGrid& eclipseGrid,
bool edit_section);
void handleADDKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleBOXKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleCOPYKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleENDBOXKeyword( BoxManager& boxManager);
void handleEQUALSKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleMAXVALUEKeyword(const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleMINVALUEKeyword(const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleMULTIPLYKeyword(const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleADDREGKeyword( const DeckKeyword& deckKeyword );
void handleCOPYREGKeyword( const DeckKeyword& deckKeyword );
void handleEQUALREGKeyword(const DeckKeyword& deckKeyword );
void handleMULTIREGKeyword(const DeckKeyword& deckKeyword );
void handleOPERATEKeyword( const DeckKeyword& deckKeyword, BoxManager& boxManager);
void handleOPERATERKeyword( const DeckKeyword& deckKeyword);
void loadGridPropertyFromDeckKeyword(const Box& inputBox,
const DeckKeyword& deckKeyword,
bool edity_section);
void adjustSOGCRwithSWL();
std::string m_defaultRegion;
UnitSystem m_deckUnitSystem;
GridProperties<int> m_intGridProperties;
GridProperties<double> m_doubleGridProperties;
};
}
#endif // OPM_ECLIPSE_PROPERTIES_HPP

View File

@@ -24,30 +24,28 @@
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
namespace Opm {
class Deck;
class ParseContext;
class ErrorGuard;
class EclipseConfig
{
public:
EclipseConfig(const Deck& deck, const ParseContext& parseContext, ErrorGuard& errors);
EclipseConfig() = default;
EclipseConfig(const Deck& deck);
EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf);
const InitConfig& init() const;
const IOConfig& io() const;
IOConfig& io();
const RestartConfig& restart() const;
const IOConfig& io() const;
const InitConfig& getInitConfig() const;
const RestartConfig& getRestartConfig() const;
bool operator==(const EclipseConfig& data) const;
private:
IOConfig m_ioConfig;
const InitConfig m_initConfig;
RestartConfig m_restartConfig;
InitConfig m_initConfig;
IOConfig io_config;
};
}

View File

@@ -23,11 +23,11 @@
#include <memory>
#include <vector>
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
#include <opm/parser/eclipse/EclipseState/AquiferConfig.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
@@ -38,6 +38,8 @@
namespace Opm {
bool enable3DPropsTesting();
template< typename > class GridProperty;
template< typename > class GridProperties;
@@ -50,13 +52,13 @@ namespace Opm {
class EclipseGrid;
class InitConfig;
class IOConfig;
class ParseContext;
class RestartConfig;
class Section;
class DeckSection;
class SimulationConfig;
class TableManager;
class UnitSystem;
class EclipseState {
public:
enum EnabledTypes {
@@ -66,9 +68,7 @@ namespace Opm {
AllProperties = IntProperties | DoubleProperties
};
template<typename T>
EclipseState(const Deck& deck , const ParseContext& parseContext, T&& errors);
EclipseState(const Deck& deck , const ParseContext& parseContext, ErrorGuard& errors);
EclipseState() = default;
EclipseState(const Deck& deck);
const IOConfig& getIOConfig() const;
@@ -76,10 +76,7 @@ namespace Opm {
const InitConfig& getInitConfig() const;
const SimulationConfig& getSimulationConfig() const;
const RestartConfig& getRestartConfig() const;
RestartConfig& getRestartConfig();
const EclipseGrid& getInputGrid() const;
virtual const EclipseGrid& getInputGrid() const;
const FaultCollection& getFaults() const;
const TransMult& getTransMult() const;
@@ -94,10 +91,14 @@ namespace Opm {
const EDITNNC& getInputEDITNNC() const;
bool hasInputEDITNNC() const;
const Eclipse3DProperties& get3DProperties() const;
// The potentially parallelized field properties
virtual const FieldPropsManager& fieldProps() const;
// Always the non-parallel field properties
virtual const FieldPropsManager& globalFieldProps() const;
const TableManager& getTableManager() const;
const EclipseConfig& getEclipseConfig() const;
const EclipseConfig& cfg() const;
const GridDims& gridDims() const;
// the unit system used by the deck. note that it is rarely needed to convert
// units because internally to opm-parser everything is represented by SI
@@ -110,31 +111,33 @@ namespace Opm {
void applyModifierDeck(const Deck& deck);
const Runspec& runspec() const;
const AquiferConfig& aquifer() const;
private:
void initIOConfigPostSchedule(const Deck& deck);
void initTransMult();
void initFaults(const Deck& deck);
void setMULTFLT(const Opm::Section& section);
void setMULTFLT(const Opm::DeckSection& section);
void complainAboutAmbiguousKeyword(const Deck& deck,
const std::string& keywordName);
const TableManager m_tables;
protected:
TableManager m_tables;
Runspec m_runspec;
EclipseConfig m_eclipseConfig;
UnitSystem m_deckUnitSystem;
NNC m_inputNnc;
EDITNNC m_inputEditNnc;
EclipseGrid m_inputGrid;
Eclipse3DProperties m_eclipseProperties;
const SimulationConfig m_simulationConfig;
GridDims m_gridDims;
FieldPropsManager field_props;
SimulationConfig m_simulationConfig;
TransMult m_transMult;
FaultCollection m_faults;
std::string m_title;
AquiferConfig aquifer_config;
};
}

View File

@@ -31,6 +31,9 @@ public:
/// Construct from input deck
explicit EDITNNC(const Deck& deck);
explicit EDITNNC(const std::vector<NNCdata>& data);
/// \brief Get an ordered set of EDITNNC
const std::vector<NNCdata>& data() const
{
@@ -41,6 +44,8 @@ public:
/// \brief Whether EDITNNC was empty.
bool empty() const;
bool operator==(const EDITNNC& data) const;
private:
std::vector<NNCdata> m_editnnc;
};

View File

@@ -29,6 +29,7 @@ class EndpointScaling {
public:
EndpointScaling() noexcept = default;
explicit EndpointScaling( const Deck& );
EndpointScaling(const std::bitset<4>& opts);
/* true if endpoint scaling is enabled, otherwise false */
operator bool() const noexcept;
@@ -40,6 +41,10 @@ class EndpointScaling {
bool twopoint() const noexcept;
bool threepoint() const noexcept;
unsigned long getBits() const;
bool operator==(const EndpointScaling& data) const;
private:
enum class option {
any = 0,

View File

@@ -25,21 +25,34 @@
#include <cstddef>
namespace Opm {
class DeckRecord;
class EclipseGrid;
class Box {
public:
struct index_pair {
std::size_t global;
std::size_t active;
struct cell_index {
std::size_t global_index;
std::size_t active_index;
std::size_t data_index;
cell_index(std::size_t g,std::size_t a, std::size_t d) :
global_index(g),
active_index(a),
data_index(d)
{}
};
Box(const EclipseGrid& grid);
Box(const EclipseGrid& grid , int i1 , int i2 , int j1 , int j2 , int k1 , int k2);
void update(const DeckRecord& deckRecord);
void reset();
size_t size() const;
bool isGlobal() const;
size_t getDim(size_t idim) const;
const std::vector<index_pair>& index_list() const;
const std::vector<cell_index>& index_list() const;
const std::vector<size_t>& getIndexList() const;
bool equal(const Box& other) const;
@@ -52,15 +65,16 @@ namespace Opm {
int K2() const;
private:
void init(int i1, int i2, int j1, int j2, int k1, int k2);
void initIndexList();
const EclipseGrid& grid;
size_t m_stride[3];
size_t m_dims[3] = { 0, 0, 0 };
size_t m_offset[3];
size_t m_stride[3];
bool m_isGlobal;
std::vector<size_t> global_index_list;
std::vector<index_pair> m_index_list;
std::vector<cell_index> m_index_list;
int lower(int dim) const;
int upper(int dim) const;

View File

@@ -64,6 +64,7 @@ namespace Opm {
void endKeyword();
const Box& getActiveBox() const;
const std::vector<Box::cell_index>& index_list() const;
private:
const EclipseGrid& grid;

View File

@@ -53,6 +53,7 @@ namespace Opm {
class EclipseGrid : public GridDims {
public:
EclipseGrid() = default;
explicit EclipseGrid(const std::string& filename);
/*
@@ -150,8 +151,8 @@ namespace Opm {
/// Will return a vector a length num_active; where the value
/// of each element is the corresponding global index.
const std::vector<int>& getActiveMap() const;
const std::array<double, 3>& getCellCenter(size_t i,size_t j, size_t k) const;
const std::array<double, 3>& getCellCenter(size_t globalIndex) const;
std::array<double, 3> getCellCenter(size_t i,size_t j, size_t k) const;
std::array<double, 3> getCellCenter(size_t globalIndex) const;
std::array<double, 3> getCornerPos(size_t i,size_t j, size_t k, size_t corner_index) const;
double getCellVolume(size_t globalIndex) const;
double getCellVolume(size_t i , size_t j , size_t k) const;
@@ -195,7 +196,6 @@ namespace Opm {
PinchMode::ModeEnum m_pinchoutMode;
PinchMode::ModeEnum m_multzMode;
mutable std::vector< int > activeMap;
bool m_circle = false;
size_t zcorn_fixed = 0;
@@ -213,14 +213,6 @@ namespace Opm {
std::vector<int> m_active_to_global;
std::vector<int> m_global_to_active;
// Geometry data.
std::vector<double> m_volume;
std::vector<double> m_depth;
std::vector<double> m_dx;
std::vector<double> m_dy;
std::vector<double> m_dz;
std::vector<std::array<double, 3>> m_cellCenter;
void initGridFromEGridFile(Opm::EclIO::EclFile& egridfile, std::string fileName);
void initBinaryGrid(const Deck& deck);
@@ -260,9 +252,12 @@ namespace Opm {
double sumJdir(int i, int k, int j1, const std::array<int, 3>& dims, const std::vector<double>& dy) const;
double sumKdir(int i, int j, const std::array<int, 3>& dims, const std::vector<double>& dz) const;
void calculateGeometryData();
void getCellCorners(const std::array<int, 3>& ijk, const std::array<int, 3>& dims, std::array<double,8>& X, std::array<double,8>& Y, std::array<double,8>& Z) const;
void getCellCorners(const std::size_t globalIndex,
std::array<double,8>& X,
std::array<double,8>& Y,
std::array<double,8>& Z) const;
};
class CoordMapper {

View File

@@ -32,7 +32,11 @@ namespace Opm {
class Fault {
public:
Fault() = default;
explicit Fault(const std::string& faultName);
Fault(const std::string& name,
double transMult,
const std::vector<FaultFace>& faceList);
const std::string& getName() const;
void setTransMult(double transMult);
@@ -40,13 +44,14 @@ public:
void addFace( FaultFace );
std::vector< FaultFace >::const_iterator begin() const;
std::vector< FaultFace >::const_iterator end() const;
const std::vector<FaultFace>& getFaceList() const;
bool operator==( const Fault& rhs ) const;
bool operator!=( const Fault& rhs ) const;
private:
std::string m_name;
double m_transMult;
double m_transMult = 0.0;
std::vector< FaultFace > m_faceList;
};
}

View File

@@ -36,6 +36,7 @@ class FaultCollection {
public:
FaultCollection();
FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
FaultCollection(const OrderedMap<std::string, Fault>& faults);
size_t size() const;
bool hasFault(const std::string& faultName) const;
@@ -48,6 +49,10 @@ public:
void addFault(const std::string& faultName);
void setTransMult(const std::string& faultName , double transMult);
const OrderedMap<std::string, Fault>& getFaults() const;
bool operator==(const FaultCollection& data) const;
private:
void addFaultFaces(const GridDims& grid,
const DeckRecord& faultRecord,

View File

@@ -29,22 +29,25 @@ namespace Opm {
class FaultFace {
public:
FaultFace() = default;
FaultFace(size_t nx , size_t ny , size_t nz,
size_t I1 , size_t I2,
size_t J1 , size_t J2,
size_t K1 , size_t K2,
FaceDir::DirEnum faceDir);
FaultFace(const std::vector<size_t>& indices, FaceDir::DirEnum faceDir);
std::vector<size_t>::const_iterator begin() const;
std::vector<size_t>::const_iterator end() const;
FaceDir::DirEnum getDir() const;
const std::vector<size_t>& getIndices() const;
bool operator==( const FaultFace& rhs ) const;
bool operator!=( const FaultFace& rhs ) const;
private:
static void checkCoord(size_t dim , size_t l1 , size_t l2);
FaceDir::DirEnum m_faceDir;
FaceDir::DirEnum m_faceDir = FaceDir::XPlus;
std::vector<size_t> m_indexList;
};

View File

@@ -0,0 +1,232 @@
/*
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/>.
*/
#ifndef FIELDPROPS_MANAGER_HPP
#define FIELDPROPS_MANAGER_HPP
#include <memory>
#include <vector>
namespace Opm {
class EclipseGrid;
class Deck;
class FieldProps;
class Phases;
class TableManager;
class FieldPropsManager {
struct MemInfo {
std::size_t global_size;
std::size_t active_size;
std::size_t int_fields;
std::size_t double_fields;
std::size_t total;
MemInfo(std::size_t gsize, std::size_t asize, std::size_t num_int, std::size_t num_double) :
global_size(gsize),
active_size(asize),
int_fields(num_int),
double_fields(num_double),
total(asize * sizeof(int) * num_int + // The integer fields like SATNUM and PVTNUM
asize * sizeof(double) * num_double + // The double fields like PORO and SWATINIT
asize * sizeof(double) * 2 + // Depth and volume of all active cells
asize * sizeof(unsigned char) * (num_int + num_double) + // The per cell value status flag
gsize * sizeof(int)) // The global ACTNUM mapping
{
};
};
public:
// The default constructor should be removed when the FieldPropsManager is mandatory
// The default constructed fieldProps object is **NOT** usable
FieldPropsManager() = default;
FieldPropsManager(const Deck& deck, const Phases& ph, const EclipseGrid& grid, const TableManager& tables);
virtual void reset_actnum(const std::vector<int>& actnum);
const std::string& default_region() const;
virtual std::vector<int> actnum() const;
virtual std::vector<double> porv(bool global = false) const;
MemInfo meminfo( ) const;
/*
The number of cells in the fields managed by this FieldPropsManager.
Initially this will correspond to the number of active cells in the grid
used when constructing the FieldPropsManager, but using the reset_actnum()
method it is possible to deactivate additional cells.
*/
std::size_t active_size() const;
/*
Because the FieldProps class can autocreate properties the semantics of
get() and has() is slightly non intuitve:
- The has<T>("KW") method will check if the current FieldProps container
has an installed "KW" keyword; if the container has the keyword in
question it will check if all elements have been assigned a value - only
in that case will it return true. The has<T>("KW") method will *not* try
to create a new keyword.
- The has<T>("KW") method will *not* consult the supported<T>("KW")
method; i.e. if you ask has<T>("UNKNOWN_KEYWORD") you will just get a
false.
- The get<T>("KW") method will try to create a new keyword if it does not
already have the keyword you are asking for. This implies that you can
get the following non intuitive sequence of events:
FieldPropsManager fpm(deck, grid);
fpm.has<int>("SATNUM"); => false
auto satnum = fpm.get<int>("SATNUM"); => SATNUM is autocreated
fpm.has<int>("SATNUM"); => true
- When checking whether the container has the keyword you should rephrase
the question slightly:
* Does the container have the keyword *right now* => has<T>("KW")
* Can the container provide the keyword => ptr = try_get<T>("KW")
- It is quite simple to create a deck where the keywords are only partly
initialized, all the methods in the FieldPropsManager only consider
fully initialized keywords.
*/
/*
The get_copy() has exactly the same behaviour as get(), but the important
difference is that said keyword is not already in the container it is not
installed in the container; if we look at SATNUM which is a keywor which
can be automatically instantiated we have the following behavior:
get():
fp.has<int>("SATNUM") -> false
const std::vector<int>& satnum = fp.get<int>("SATNUM")
fp.has<int>("SATNUM") -> true;
get_copy():
fp.has<int>("SATNUM") -> false
const std::vector<int>& satnum = fp.get_copy<int>("SATNUM")
fp.has<int>("SATNUM") -> false
*/
template <typename T>
std::vector<T> get_copy(const std::string& keyword, bool global=false) const;
/*
Will return a pointer to the keyword data, or nullptr if the container
does not have suce a keyword. Observe that container will hold on to an
manage the underlying keyword data.
The try_get function will return a nullptr if the container does not
contain said keyword, or if the keyword has not been fully initialized. If
you ask for a totally unknown keyword the method will return nullptr.
*/
template <typename T> const std::vector<T>* try_get(const
std::string& keyword) const;
/*
You can ask whether the elements in the keyword have a default value -
which typically is calculated in some way, or if it has been explicitly
assigned to in the deck.
*/
template <typename T>
std::vector<bool> defaulted(const std::string& keyword) const;
/*
Check whether the container supports/recognizes a keyword at all:
supported<double>("PORO") => true
supported<double>("NO_SUCH_KEYWORD") => false
The method does not at all consult the content of the container - it is a
static method.
*/
template <typename T>
static bool supported(const std::string& keyword);
/*
The keys() function will return a list of keys corresponding to the fully
initialized keywords in the container. Observe that the implementation
special cases the PORV and ACTNUM keywords, since these are present with
special functions porv(bool) and actnum() the "PORV" and "ACTNUM" string
literals are excluded from the keys() list.
*/
template <typename T>
std::vector<std::string> keys() const;
virtual const std::vector<int>& get_int(const std::string& keyword) const { return this->get<int>(keyword); }
virtual std::vector<int> get_global_int(const std::string& keyword) const { return this->get_global<int>(keyword); }
virtual const std::vector<double>& get_double(const std::string& keyword) const { return this->get<double>(keyword); }
virtual std::vector<double> get_global_double(const std::string& keyword) const { return this->get_global<double>(keyword); }
virtual bool has_int(const std::string& keyword) const { return this->has<int>(keyword); }
virtual bool has_double(const std::string& keyword) const { return this->has<double>(keyword); }
private:
/*
Return the keyword values as a std::vector<>. All elements in the return
value are guaranteed to be assigned a valid value. If the keyword is not
in the container, or not all elements have a valid value - an exception
will be raised:
- keyword which is not supported at all -> std::logic_error
- keyword which is not in the deck at all -> std::out_of_range
- keyword which has not been fully initialized -> std::runtime_error
Many of the keywords in the container can be automatically created, in
that case the get() method will silently create a new keyword and default
initialize if it is not already in the container. The different exceptions
raised for the different error conditions are the same for get(),
get_copy() and get_global().
*/
template <typename T>
const std::vector<T>& get(const std::string& keyword) const;
/*
Will check if the container has the keyword loaded; in a fully initialized
state. If you ask for a keyword which is not supported at all you will
just get false back.
*/
template <typename T>
bool has(const std::string& keyword) const;
/*
This is exactly like the get() method, but the returned vector will have
global cartesian size, where all inactive cells have been filled with
zeros.
*/
template <typename T>
std::vector<T> get_global(const std::string& keyword) const;
std::shared_ptr<FieldProps> fp;
};
}
#endif

View File

@@ -32,6 +32,7 @@ namespace Opm {
{
public:
GridDims();
explicit GridDims(std::array<int, 3> xyz);
GridDims(size_t nx, size_t ny, size_t nz);
@@ -56,9 +57,9 @@ namespace Opm {
void assertIJK(size_t i, size_t j, size_t k) const;
protected:
GridDims();
bool operator==(const GridDims& data) const;
protected:
size_t m_nx;
size_t m_ny;
size_t m_nz;

View File

@@ -1,208 +0,0 @@
/*
Copyright 2014 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 ECLIPSE_GRIDPROPERTIES_HPP_
#define ECLIPSE_GRIDPROPERTIES_HPP_
#include <set>
#include <string>
#include <vector>
#include <unordered_map>
#include <map>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/Section.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp>
#include <opm/parser/eclipse/Units/Dimension.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
/*
This class implements a container (std::unordered_map<std::string ,
Gridproperty<T>>) of Gridproperties. Usage is as follows:
1. Instantiate the class; passing the number of grid cells and the
supported keywords as a list of strings to the constructor.
2. Query the container with the supportsKeyword() and hasKeyword()
methods.
3. When you ask the container to get a keyword with the
getKeyword() method it will automatically create a new
GridProperty object if the container does not have this
property.
*/
namespace Opm {
class Eclipse3DProperties;
template <typename T>
class GridProperties {
public:
typedef typename GridProperty<T>::SupportedKeywordInfo SupportedKeywordInfo;
struct const_iterator;
GridProperties() = default;
GridProperties(const EclipseGrid& eclipseGrid,
const UnitSystem* deckUnitSystem,
std::vector< SupportedKeywordInfo >&& supportedKeywords);
explicit GridProperties(const EclipseGrid& eclipseGrid,
std::vector< SupportedKeywordInfo >&& supportedKeywords);
T convertInputValue( const GridProperty<T>& property , double doubleValue) const;
T convertInputValue( double doubleValue ) const;
bool supportsKeyword(const std::string& keyword) const;
bool isDefaultInitializable(const std::string& keyword) const;
/*
The difference between hasKeyword() and hasDeckKeyword( ) is
that hasDeckKeyword( ) will return false for keywords which
have only been auto created - and are not explicitly
mentioned in the deck.
*/
bool hasKeyword(const std::string& keyword) const;
bool hasDeckKeyword(const std::string& keyword) const;
size_t size() const;
void assertKeyword(const std::string& keyword) const;
/*
The getKeyword() method will auto create a keyword if
requested, the getDeckKeyword() method will onyl return a
keyword if it has been explicitly mentioned in the deck. The
getDeckKeyword( ) method will throw an exception instead of
auto creating the keyword.
*/
const GridProperty<T>& getKeyword(const std::string& keyword) const;
const GridProperty<T>& getDeckKeyword(const std::string& keyword) const;
bool addKeyword(const std::string& keywordName);
void copyKeyword(const std::string& srcField ,
const std::string& targetField ,
const Box& inputBox);
template <class Keyword>
bool hasKeyword() const {
return hasKeyword( Keyword::keywordName );
}
template <class Keyword>
const GridProperty<T>& getKeyword() const {
return getKeyword( Keyword::keywordName );
}
template <class Keyword>
const GridProperty<T>& getInitializedKeyword() const {
return getInitializedKeyword( Keyword::keywordName );
}
GridProperty<T>& getOrCreateProperty(const std::string& name);
/**
The fine print of the manual says the ADD keyword should support
some state dependent semantics regarding endpoint scaling arrays
in the PROPS section. That is not supported.
*/
void handleADDRecord( const DeckRecord& record, BoxManager& boxManager);
void handleMAXVALUERecord( const DeckRecord& record, BoxManager& boxManager);
void handleMINVALUERecord( const DeckRecord& record, BoxManager& boxManager);
void handleMULTIPLYRecord( const DeckRecord& record, BoxManager& boxManager);
void handleCOPYRecord( const DeckRecord& record, BoxManager& boxManager);
void handleEQUALSRecord( const DeckRecord& record, BoxManager& boxManager);
void handleOPERATERecord( const DeckRecord& record , BoxManager& boxManager);
void handleEQUALREGRecord( const DeckRecord& record, const GridProperty<int>& regionProperty );
void handleADDREGRecord( const DeckRecord& record, const GridProperty<int>& regionProperty );
void handleMULTIREGRecord( const DeckRecord& record, const GridProperty<int>& regionProperty );
void handleCOPYREGRecord( const DeckRecord& record, const GridProperty<int>& regionProperty );
void handleOPERATERRecord( const DeckRecord& record , const GridProperty<int>& regionProperty );
/*
Iterators over initialized properties. The overloaded
operator*() opens the pair which comes natively from the
std::map iterator.
*/
const_iterator begin() const {
return const_iterator( m_properties.begin() );
}
const_iterator end() const {
return const_iterator( m_properties.end() );
}
/*
* storage MUST ensure that std::addressof(storage.at( key )) is valid.
*/
typedef typename std::map<std::string , GridProperty<T> > storage;
typedef typename storage::const_iterator storage_iterator;
struct const_iterator : public storage_iterator {
const_iterator( storage_iterator iter ) : storage_iterator( iter ) { }
const GridProperty<T>& operator*( ) {
const auto& pair = storage_iterator::operator*( );
return pair.second;
}
};
private:
/// this method exists for (friend) Eclipse3DProperties to be allowed initializing PORV and ACTNUM keyword
void postAddKeyword(const std::string& name,
const T defaultValue,
std::function< void( const std::vector<bool>& defaulted, std::vector< T >& ) > postProcessor,
const std::string& dimString,
const bool defaultInitializable );
void postAddKeyword(const std::string& name,
std::function< std::vector< T >(size_t) > initProcessor,
const std::string& dimString);
GridProperty<T>& getKeyword(const std::string& keyword);
bool addAutoGeneratedKeyword_(const std::string& keywordName) const;
void insertKeyword(const SupportedKeywordInfo& supportedKeyword) const;
bool isAutoGenerated_(const std::string& keyword) const;
friend class Eclipse3DProperties; // needed for PORV keyword entanglement
size_t nx = 0;
size_t ny = 0;
size_t nz = 0;
const UnitSystem * m_deckUnitSystem = nullptr;
mutable std::unordered_map<std::string, SupportedKeywordInfo> m_supportedKeywords;
mutable storage m_properties;
mutable std::set<std::string> m_autoGeneratedProperties;
};
}
#endif // ECLIPSE_GRIDPROPERTIES_HPP_

View File

@@ -1,333 +0,0 @@
/*
Copyright 2014 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 ECLIPSE_GRIDPROPERTY_HPP_
#define ECLIPSE_GRIDPROPERTY_HPP_
#include <functional>
#include <string>
#include <utility>
#include <vector>
/*
This class implemenents a class representing properties which are
define over an ECLIPSE grid, i.e. with one value for each logical
cartesian cell in the grid.
*/
namespace Opm {
class Box;
class DeckItem;
class DeckKeyword;
class EclipseGrid;
class TableManager;
template< typename > class GridProperties;
template< typename T >
class GridPropertySupportedKeywordInfo {
public:
GridPropertySupportedKeywordInfo() = default;
using init = std::function< std::vector< T >( size_t ) >;
/**
* Property post-processor function type.
*
* Defaulted flag (one element for each Cartesian cell/data element)
* identifies whether the property value was defaulted in that cell
* (true) or assigned through a deck mechanism (false).
*/
using post = std::function<
void(const std::vector<bool>& defaulted,
std::vector< T >&)
>;
GridPropertySupportedKeywordInfo(
const std::string& name,
init initializer,
post postProcessor,
const std::string& dimString,
bool m_defaultInitializable = false );
GridPropertySupportedKeywordInfo(
const std::string& name,
init initializer,
const std::string& dimString,
bool m_defaultInitializable = false );
/* this is a convenience constructor which can be used if the default
* value for the grid property is just a constant.
*/
GridPropertySupportedKeywordInfo(
const std::string& name,
const T defaultValue,
const std::string& dimString,
bool m_defaultInitializable = false );
GridPropertySupportedKeywordInfo(
const std::string& name,
const T defaultValue,
post postProcessor,
const std::string& dimString,
bool m_defaultInitializable = false );
const std::string& getKeywordName() const;
const std::string& getDimensionString() const;
const init& initializer() const;
const post& postProcessor() const;
bool isDefaultInitializable() const;
/**
* Replace post-processor after object is created.
*
* XXX: This is essentially a hack, but it enables using
* post-processors that can't be created at construction time.
*
* One example of this use case is the post-processor for SOGCR in
* a run using Family I (SWOF/SGOF) saturation function tables.
* The SGOF table is implicitly defined in terms of the connate
* water saturation, and the critical oil-in-gas saturation
* post-processor needs to take this fact into account. That, in
* turn, means that the post-processor must have a way of
* accessing SWL data (defaulted or assigned) which means that the
* post-processor needs to be aware of the collection of grid
* properties, not just a single property in isolation.
*
* In our current system, the GridPropertySupportedKeywordInfo
* objects are constructor arguments to that collection and so
* have no way of referring to the collection itself. This method
* provides a mechanism for creating the post-processor once the
* collection is formed.
*
* \param[in] processor New post-processor function. Replaces
* existing post-processor, typically created at construction
* time.
*/
void setPostProcessor(post processor)
{
this->m_postProcessor = std::move(processor);
}
private:
std::string m_keywordName;
init m_initializer;
post m_postProcessor;
std::string m_dimensionString;
bool m_defaultInitializable;
};
template< typename T >
class GridProperty {
public:
typedef GridPropertySupportedKeywordInfo<T> SupportedKeywordInfo;
GridProperty( size_t nx, size_t ny, size_t nz, const SupportedKeywordInfo& kwInfo );
size_t getCartesianSize() const;
size_t getNX() const;
size_t getNY() const;
size_t getNZ() const;
T iget(size_t index) const;
T iget(size_t i , size_t j , size_t k) const;
void iset(size_t index, T value);
void iset(size_t i , size_t j , size_t k , T value);
const std::vector<bool>& wasDefaulted() const;
const std::vector<T>& getData() const;
std::vector<T>& getData();
bool containsNaN() const;
const std::string& getDimensionString() const;
void multiplyWith( const GridProperty<T>& );
void multiplyValueAtIndex( size_t index, T factor );
void maskedSet( T value, const std::vector< bool >& mask );
void maskedMultiply( T value, const std::vector< bool >& mask );
void maskedAdd( T value, const std::vector< bool >& mask );
void maskedCopy( const GridProperty< T >& other, const std::vector< bool >& mask );
void initMask( T value, std::vector<bool>& mask ) const;
/**
Due to the convention where it is only necessary to supply the
top layer of the petrophysical properties we can unfortunately
not enforce that the number of elements elements in the
DeckKeyword equals nx*ny*nz.
*/
void loadFromDeckKeyword( const DeckKeyword& , bool);
void loadFromDeckKeyword( const Box&, const DeckKeyword& , bool);
void copyFrom( const GridProperty< T >&, const Box& );
void scale( T scaleFactor, const Box& );
void maxvalue( T value, const Box& );
void minvalue( T value, const Box& );
void add( T shiftValue, const Box& );
void setScalar( T value, const Box& );
const std::string& getKeywordName() const;
const SupportedKeywordInfo& getKeywordInfo() const;
/**
Will check that all elements in the property are in the closed
interval [min,max].
*/
void checkLimits( T min, T max ) const;
/*
The runPostProcessor() method is public; and it is no harm in
calling it from arbitrary locations. But the intention is that
should only be called from the Eclipse3DProperties class
assembling the properties.
*/
void runPostProcessor();
/*
Will scan through the roperty and return a vector of all the
indices where the property value agrees with the input value.
*/
std::vector<size_t> indexEqual(T value) const;
/*
Will run through all the cells in the activeMap and return a
list of the elements where the property value agrees with the
input value. The values returned will be in the space
[0,nactive) - i.e. 'active' indices.
*/
std::vector<size_t> cellsEqual(T value , const std::vector<int>& activeMap) const;
/*
If active == true the method will get the activeMap from the
grid and call the cellsEqual( T , std::vector<int>&) overload,
otherwise it will return indexEqual( value );
*/
std::vector<size_t> cellsEqual(T value, const EclipseGrid& grid, bool active = true) const;
/*
Will return a std::vector<T> of the data in the active cells.
*/
std::vector<T> compressedCopy( const EclipseGrid& grid) const;
/*
The grid properties like PORO and SATNUM can be created in essentially two
ways; either they can be explicitly assigned in the deck as:
PORO
1000*0.15 /
or they can be created indirectly through various mathematical operations
like:
MULTIPLY
TRANX 0.20 /
/
The deckAssigned() property is used so that we can differentiate between
properties which have been explicitly assigned/loaded from the deck, and
those where the default construction has been invoked. This functionality
is implemented purely to support the TRAN? keywords. The transmissibility
is be default calculated by the simulator code, but the TRAN keywords can
be used in the deck to manipulate this calculation in two different ways:
1. TRAN explicitly assigned in GRID section
===========================================
...
TRANX
1000*0.026 /
COPY
'TRANX' 'TRANY' /
/
In this case the simulator should detect that the input deck has TRANX
specified and just use the input values from the deck. This is the
normal handling of keywords, and agrees with e.g. PERMX and PORO. This
also applies when the COPY keyword has been used, as in the case of
'TRANY' above.
2. TRAN modifier present in EDIT section
========================================
The scenario here is that there is no mention of TRANX in the GRID
section, however the EDIT section contains modifiers like this:
MULTIPLY
TRANX 0.25 /
I.e. we request the TRANX values to be reduced with a factor of 0.25. In
this case the simulator should still calculate transmissibility according
to it's normal algorithm, and then subsequently scale that result with a
factor of 0.25.
In this case the input layer needs to autocreate a TRANX keyword,
defaulted to 1.0 and then scale that to 0.25.
Now - the important point is that when doing transmissibility calculations
the simulator must be able to distinguish between cases 1 and 2,
specifically whether the TRANX keyword should be interpreted as absolute
values(case 1) or as a multiplier(case 2). That is the purpose of the
deckAssigned() property. Pseudo code for the transmissibility calculations
in the simulator could be:
const auto& input_tranx = properties.getKeyword("TRANX");
if (input_tranx.deckAssigned()) {
// set simulator internal transmissibilities to values from input_tranx
tranx = input_tranx;
} else {
// Calculate transmissibilities according to normal simulator algorithm
...
...
// Scale transmissibilities with scale factor from input_tranx
tranx *= input_tranx;
}
*/
bool deckAssigned() const;
private:
const DeckItem& getDeckItem( const DeckKeyword& );
void setDataPoint(size_t sourceIdx, size_t targetIdx, const DeckItem& deckItem);
void mulDataPoint(size_t sourceIdx, size_t targetIdx, const DeckItem& deckItem);
void setElement(const typename std::vector<T>::size_type i,
const T value,
const bool defaulted = false);
size_t m_nx, m_ny, m_nz;
SupportedKeywordInfo m_kwInfo;
std::vector<T> m_data;
std::vector<bool> m_defaulted;
bool m_hasRunPostProcessor = false;
bool assigned = false;
};
// initialize the TEMPI grid property using the temperature vs depth
// table (stemming from the TEMPVD or the RTEMPVD keyword)
std::vector< double > temperature_lookup( size_t,
const TableManager*,
const EclipseGrid*,
const GridProperties<int>* );
}
#endif

View File

@@ -21,7 +21,7 @@
#ifndef OPM_PARSER_MULTREGTSCANNER_HPP
#define OPM_PARSER_MULTREGTSCANNER_HPP
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/EclipseState/Util/Value.hpp>
@@ -57,6 +57,15 @@ namespace Opm {
int directions;
MULTREGT::NNCBehaviourEnum nnc_behaviour;
std::string region_name;
bool operator==(const MULTREGTRecord& data) const {
return src_value == data.src_value &&
target_value == data.target_value &&
trans_mult == data.trans_mult &&
directions == data.directions &&
nnc_behaviour == data.nnc_behaviour &&
region_name == data.region_name;
}
};
typedef std::map< std::pair<int , int> , const MULTREGTRecord * > MULTREGTSearchMap;
@@ -67,16 +76,41 @@ namespace Opm {
class MULTREGTScanner {
public:
MULTREGTScanner(const Eclipse3DProperties& e3DProps,
using ExternalSearchMap = std::map<std::string, std::map<std::pair<int,int>, int>>;
MULTREGTScanner() = default;
MULTREGTScanner(const MULTREGTScanner& data);
MULTREGTScanner(const GridDims& grid,
const FieldPropsManager* fp_arg,
const std::vector< const DeckKeyword* >& keywords);
MULTREGTScanner(const std::array<size_t,3>& size,
const std::vector<MULTREGTRecord>& records,
const ExternalSearchMap& searchMap,
const std::map<std::string, std::vector<int>>& region,
const std::string& defaultRegion);
double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const;
std::array<size_t,3> getSize() const;
const std::vector<MULTREGTRecord>& getRecords() const;
ExternalSearchMap getSearchMap() const;
const std::map<std::string, std::vector<int>>& getRegions() const;
const std::string& getDefaultRegion() const;
bool operator==(const MULTREGTScanner& data) const;
MULTREGTScanner& operator=(const MULTREGTScanner& data);
private:
void addKeyword( const Eclipse3DProperties& props, const DeckKeyword& deckKeyword, const std::string& defaultRegion);
void assertKeywordSupported(const DeckKeyword& deckKeyword, const std::string& defaultRegion);
void constructSearchMap(const ExternalSearchMap& searchMap);
void addKeyword( const DeckKeyword& deckKeyword, const std::string& defaultRegion);
void assertKeywordSupported(const DeckKeyword& deckKeyword);
std::size_t nx = 0,ny = 0, nz = 0;
const FieldPropsManager* fp = nullptr;
std::vector< MULTREGTRecord > m_records;
std::map<std::string , MULTREGTSearchMap> m_searchMap;
const Eclipse3DProperties& m_e3DProps;
std::map<std::string, std::vector<int>> regions;
std::string default_region;
};
}

View File

@@ -28,7 +28,6 @@ namespace Opm {
enum ModeEnum {
Inactive = 1,
EclSTD = 2,
OpmFIL = 3
};
}
}

View File

@@ -32,6 +32,14 @@ struct NNCdata {
: cell1(c1), cell2(c2), trans(t)
{}
NNCdata() = default;
bool operator==(const NNCdata& data) const
{
return cell1 == data.cell1 &&
cell2 == data.cell2 &&
trans == data.trans;
}
size_t cell1;
size_t cell2;
double trans;
@@ -48,11 +56,14 @@ public:
/// Construct from input deck.
explicit NNC(const Deck& deck);
explicit NNC(const std::vector<NNCdata>& nncdata) : m_nnc(nncdata) {}
void addNNC(const size_t cell1, const size_t cell2, const double trans);
const std::vector<NNCdata>& nncdata() const { return m_nnc; }
const std::vector<NNCdata>& data() const { return m_nnc; }
size_t numNNC() const;
bool hasNNC() const;
bool operator==(const NNC& data) const;
private:
std::vector<NNCdata> m_nnc;

View File

@@ -19,184 +19,227 @@
#ifndef ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
#define ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP
#include <vector>
#include <string>
#include <opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp>
#include <vector>
namespace Opm {
class EclipseGrid;
class Phases;
class TableManager;
std::vector<double> SGLEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
namespace satfunc {
std::vector<double> ISGLEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SGLEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SGUEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISGLEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISGUEndpoint(size_t, const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SGUEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SWLEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISGUEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISWLEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SWLEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SWUEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISWLEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISWUEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SWUEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SGCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISWUEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISGCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SGCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SOWCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISGCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISOWCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SOWCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SOGCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISOWCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISOGCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SOGCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> SWCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISOGCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> ISWCREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> SWCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> PCWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> ISWCREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IPCWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> PCWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> PCGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IPCWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IPCGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> PCGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IPCGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KRWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRWREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKRWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRWREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KRWREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KROEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKRWREndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKROEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KROEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRORWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKROEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRORWEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KRORWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRORGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKRORWEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRORGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KRORGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKRORGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRGEndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> KRGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> KRGREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<int>*);
std::vector<double> IKRGEndpoint(const TableManager&,
const Phases&,
const std::vector<double>&,
const std::vector<int>&,
const std::vector<int>&);
std::vector<double> IKRGREndpoint(size_t,
const TableManager*,
const EclipseGrid*,
GridProperties<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 std::vector<double>& cell_depth,
const std::vector<int>& num,
const std::vector<int>& endnum);
}
}
#endif // ECLIPSE_SATFUNCPROPERTY_INITIALIZERS_HPP

View File

@@ -41,30 +41,42 @@ namespace Opm {
template< typename > class GridProperty;
class Fault;
class FaultCollection;
class Eclipse3DProperties;
class DeckKeyword;
class FieldPropsManager;
class TransMult {
public:
TransMult(const GridDims& dims, const Deck& deck, const Eclipse3DProperties& props);
TransMult() = default;
TransMult(const GridDims& dims, const Deck& deck, const FieldPropsManager& fp);
TransMult(const std::array<size_t,3>& size,
const std::map<FaceDir::DirEnum, std::vector<double>>& trans,
const std::map<FaceDir::DirEnum, std::string>& names,
const MULTREGTScanner& scanner);
double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const;
double getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const;
double getRegionMultiplier( size_t globalCellIndex1, size_t globalCellIndex2, FaceDir::DirEnum faceDir) const;
void applyMULT(const GridProperty<double>& srcMultProp, FaceDir::DirEnum faceDir);
void applyMULT(const std::vector<double>& srcMultProp, FaceDir::DirEnum faceDir);
void applyMULTFLT(const FaultCollection& faults);
void applyMULTFLT(const Fault& fault);
std::array<size_t,3> getSize() const;
const std::map<FaceDir::DirEnum, std::vector<double>>& getTrans() const;
const std::map<FaceDir::DirEnum, std::string>& getNames() const;
const MULTREGTScanner& getScanner() const;
bool operator==(const TransMult& data) const;
private:
size_t getGlobalIndex(size_t i , size_t j , size_t k) const;
void assertIJK(size_t i , size_t j , size_t k) const;
double getMultiplier__(size_t globalIndex , FaceDir::DirEnum faceDir) const;
void insertNewProperty(FaceDir::DirEnum faceDir);
bool hasDirectionProperty(FaceDir::DirEnum faceDir) const;
GridProperty<double>& getDirectionProperty(FaceDir::DirEnum faceDir);
std::vector<double>& getDirectionProperty(FaceDir::DirEnum faceDir);
size_t m_nx , m_ny , m_nz;
std::map<FaceDir::DirEnum , GridProperty<double> > m_trans;
size_t m_nx = 0, m_ny = 0, m_nz = 0;
std::map<FaceDir::DirEnum , std::vector<double> > m_trans;
std::map<FaceDir::DirEnum , std::string> m_names;
MULTREGTScanner m_multregtScanner;
};

View File

@@ -151,6 +151,15 @@ namespace Opm {
IOConfig() = default;
explicit IOConfig( const Deck& );
explicit IOConfig( const std::string& input_path );
IOConfig(bool write_init, bool write_egrid,
bool unifin, bool unifout,
bool fmtin, bool fmtout,
const std::string& deck_name,
bool output_enabled,
const std::string& output_dir,
bool no_sim,
const std::string& base_name,
bool ecl_compatible_rst);
void setEclCompatibleRST(bool ecl_rst);
bool getEclCompatibleRST() const;
@@ -160,6 +169,8 @@ namespace Opm {
bool getUNIFIN() const;
bool getFMTIN() const;
bool getFMTOUT() const;
const std::string& getDeckFileName() const;
bool getNoSim() const;
const std::string& getEclipseInputPath() const;
void overrideNOSIM(bool nosim);
@@ -182,11 +193,7 @@ namespace Opm {
bool initOnly() const;
// Proxy methods forwarding directly to corresponding RestartConfig
bool getWriteRestartFile(size_t timestep) const;
int getFirstRestartStep() const;
void overrideRestartWriteInterval(size_t interval);
void setWriteInitialRestartFile(bool writeInitialRestartFile);
bool operator==(const IOConfig& data) const;
private:
bool m_write_INIT_file = false;
@@ -195,7 +202,6 @@ namespace Opm {
bool m_UNIFOUT = false;
bool m_FMTIN = false;
bool m_FMTOUT = false;
int m_first_restart_step;
std::string m_deck_filename;
bool m_output_enabled = true;
std::string m_output_dir;

View File

@@ -23,7 +23,8 @@
#include <vector>
#include <set>
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
#include <boost/date_time.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
/*
The RestartConfig class internalizes information of when (at which
@@ -198,7 +199,6 @@ namespace Opm {
class RUNSPECSection;
class SCHEDULESection;
class SOLUTIONSection;
class TimeMap;
class Schedule;
class ParseContext;
class ErrorGuard;
@@ -312,25 +312,22 @@ namespace Opm {
size_t rptsched_restart = 0;
};
// }
class RestartConfig {
class RestartConfig {
public:
RestartConfig();
RestartConfig() = default;
template<typename T>
RestartConfig( const Deck&, const ParseContext& parseContext, T&& errors );
RestartConfig( const Deck&, const ParseContext& parseContext, ErrorGuard& errors );
RestartConfig( const Deck& );
RestartConfig( const SCHEDULESection& schedule,
const SOLUTIONSection& solution,
const ParseContext& parseContext,
ErrorGuard& errors,
TimeMap timemap );
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, T&& errors );
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, ErrorGuard& errors );
RestartConfig( const TimeMap& time_map, const Deck& );
RestartConfig(const TimeMap& timeMap,
int firstRestartStep,
bool writeInitial,
const DynamicState<RestartSchedule>& restart_sched,
const DynamicState<std::map<std::string,int>>& restart_keyw,
const std::vector<bool>& save_keyw);
int getFirstRestartStep() const;
bool getWriteRestartFile(size_t timestep, bool log=true) const;
@@ -343,6 +340,14 @@ namespace Opm {
RestartSchedule getNode( size_t timestep ) const;
static std::string getRestartFileName(const std::string& restart_base, int report_step, bool unified, bool fmt_file);
const TimeMap& timeMap() const;
bool writeInitialRst() const;
const DynamicState<RestartSchedule>& restartSchedule() const;
const DynamicState<std::map<std::string,int>>& restartKeywords() const;
const std::vector<bool>& saveKeywords() const;
bool operator==(const RestartConfig& data) const;
private:
@@ -360,15 +365,14 @@ namespace Opm {
bool years = false,
bool months = false) const;
void handleRPTSOL( const DeckKeyword& keyword);
TimeMap m_timemap;
int m_first_restart_step;
bool m_write_initial_RST_file = false;
void handleScheduleSection( const SCHEDULESection& schedule, const ParseContext& parseContext, ErrorGuard& errors);
void update( size_t step, const RestartSchedule& rs);
static RestartSchedule rptsched( const DeckKeyword& );
TimeMap m_timemap;
int m_first_restart_step = 1;
bool m_write_initial_RST_file = false;
DynamicState< RestartSchedule > restart_schedule;
DynamicState< std::map< std::string, int > > restart_keywords;
std::vector< bool > save_keywords;

View File

@@ -19,9 +19,13 @@ namespace Opm {
bool wetGasInitConstantRv() const;
int initializationTargetAccuracy() const;
EquilRecord( double datum_depth_arg, double datum_depth_pc_arg, double woc_depth, double woc_pc, double goc_depth, double goc_pc, bool live_oil_init, bool wet_gas_init, int target_accuracy);
private:
EquilRecord();
EquilRecord( double datum_depth_arg, double datum_depth_pc_arg, double woc_depth, double woc_pc, double goc_depth, double goc_pc, bool live_oil_init, bool wet_gas_init, int target_accuracy);
bool operator==(const EquilRecord& data) const;
private:
double datum_depth;
double datum_depth_ps;
double water_oil_contact_depth;
@@ -40,8 +44,10 @@ namespace Opm {
Equil() = default;
explicit Equil( const DeckKeyword& );
Equil(const std::vector<EquilRecord>& records);
const EquilRecord& getRecord( size_t id ) const;
const std::vector<EquilRecord>& records() const;
size_t size() const;
bool empty() const;
@@ -49,8 +55,10 @@ namespace Opm {
const_iterator begin() const;
const_iterator end() const;
bool operator==(const Equil& data) const;
private:
std::vector< EquilRecord > records;
std::vector< EquilRecord > m_records;
};
}

View File

@@ -33,8 +33,14 @@ class DeckRecord;
class FoamData
{
public:
FoamData();
FoamData(const DeckRecord& FOAMFSC_record, const DeckRecord& FOAMROCK_record);
explicit FoamData(const DeckRecord& FOAMROCK_record);
FoamData(double reference_surfactant_concentration,
double exponent,
double minimum_surfactant_concentration,
bool allow_desorption,
double rock_density);
double referenceSurfactantConcentration() const;
double exponent() const;
@@ -43,6 +49,8 @@ public:
bool allowDesorption() const;
double rockDensity() const;
bool operator==(const FoamData& data) const;
private:
double reference_surfactant_concentration_;
double exponent_;
@@ -57,8 +65,10 @@ class FoamConfig
public:
FoamConfig() = default;
explicit FoamConfig(const Deck&);
FoamConfig(const std::vector<FoamData>& data);
const FoamData& getRecord(std::size_t index) const;
const std::vector<FoamData>& records() const;
std::size_t size() const;
bool empty() const;
@@ -67,6 +77,8 @@ public:
const_iterator begin() const;
const_iterator end() const;
bool operator==(const FoamConfig& data) const;
private:
std::vector<FoamData> data_;
};

Some files were not shown because too many files have changed in this diff Show More