Compare commits
550 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35835efbbe | ||
|
|
61090f078e | ||
|
|
f91b9b7c31 | ||
|
|
6111526c93 | ||
|
|
3e1031b1d5 | ||
|
|
9d5167ab4e | ||
|
|
9c260d6c9a | ||
|
|
ebca866e31 | ||
|
|
1f335a1d54 | ||
|
|
fce5764dd4 | ||
|
|
525875f16a | ||
|
|
99f2c4d6ab | ||
|
|
c82286f7d8 | ||
|
|
74d7effe3f | ||
|
|
920382179e | ||
|
|
d08b7292bf | ||
|
|
a0d9a04470 | ||
|
|
a162915f77 | ||
|
|
6f29e74692 | ||
|
|
0cdfeae0e5 | ||
|
|
283d7b3dce | ||
|
|
dff978d0eb | ||
|
|
cd3a6b2ddf | ||
|
|
bcf1ba0ba9 | ||
|
|
06ff1db977 | ||
|
|
af052ef3ba | ||
|
|
2da0f48da2 | ||
|
|
94635c03d3 | ||
|
|
facb210275 | ||
|
|
e2493d22fc | ||
|
|
660b878b8e | ||
|
|
e7599f6825 | ||
|
|
302e7e7d41 | ||
|
|
eb396ecc53 | ||
|
|
e4949820ab | ||
|
|
617e34fbbb | ||
|
|
20de64e739 | ||
|
|
3e37b8abe8 | ||
|
|
982ed7caf0 | ||
|
|
a85ec1a7e6 | ||
|
|
84644fe5cd | ||
|
|
555eb4c8b0 | ||
|
|
9ef9cb0245 | ||
|
|
369b6ee637 | ||
|
|
42e36100a8 | ||
|
|
0475a46ab3 | ||
|
|
4150936e7c | ||
|
|
0275a00b0f | ||
|
|
31cddd2d86 | ||
|
|
187149dc1a | ||
|
|
e44f3c6798 | ||
|
|
819571a8db | ||
|
|
68975be966 | ||
|
|
7ef3d6c0b3 | ||
|
|
27da32d812 | ||
|
|
e6bfc0624c | ||
|
|
48cab1f3bf | ||
|
|
f9ab536a66 | ||
|
|
ea5b2f072c | ||
|
|
46c955956f | ||
|
|
5bf2087d0a | ||
|
|
ab697b69ea | ||
|
|
fb012786c3 | ||
|
|
a8656a9bbd | ||
|
|
8c95c64e9b | ||
|
|
b8cecd9ce4 | ||
|
|
a62c3ae162 | ||
|
|
4e7bcd16b9 | ||
|
|
b20baa0c8e | ||
|
|
d89f92d52f | ||
|
|
148a54a7a6 | ||
|
|
7d51e996d9 | ||
|
|
832b351bb3 | ||
|
|
de3e639196 | ||
|
|
8370bf152a | ||
|
|
b6731ba8c7 | ||
|
|
411682c466 | ||
|
|
f869df0255 | ||
|
|
8a2c30c7ba | ||
|
|
53dd18a92c | ||
|
|
f61e573a19 | ||
|
|
fafebfdc5d | ||
|
|
ff13b32da0 | ||
|
|
a403a31f16 | ||
|
|
627faea4e5 | ||
|
|
7056c5f879 | ||
|
|
9e78155222 | ||
|
|
b2e9790204 | ||
|
|
8e94f2ec3b | ||
|
|
bbd58ab2a3 | ||
|
|
b04ea92a32 | ||
|
|
6741b34ab0 | ||
|
|
9693d8a2bd | ||
|
|
8a06db36c3 | ||
|
|
8837e4cd38 | ||
|
|
8d7d185976 | ||
|
|
6d03ae8166 | ||
|
|
3ca273c7d5 | ||
|
|
82d748386c | ||
|
|
3731230049 | ||
|
|
3bd13c9e85 | ||
|
|
55a7d0af19 | ||
|
|
0d6c43f431 | ||
|
|
9b53068e8b | ||
|
|
06618244e7 | ||
|
|
7b3e6ea534 | ||
|
|
b67091183b | ||
|
|
646fa507f6 | ||
|
|
94a095a2b6 | ||
|
|
c5691477e5 | ||
|
|
64bd13231d | ||
|
|
7b9fa31894 | ||
|
|
d55f5fa5f5 | ||
|
|
23f02023a3 | ||
|
|
0b27fd8e18 | ||
|
|
4be0eea139 | ||
|
|
343f14dacf | ||
|
|
c37c2b2d49 | ||
|
|
c660b2e4b4 | ||
|
|
4928782cf4 | ||
|
|
325e559229 | ||
|
|
ba2065853a | ||
|
|
1daa7d1df4 | ||
|
|
7471cef938 | ||
|
|
15abd2bd49 | ||
|
|
07500d5f09 | ||
|
|
c0be54af92 | ||
|
|
46b663218a | ||
|
|
4224e26321 | ||
|
|
45a6e4fb15 | ||
|
|
5e5dd48cee | ||
|
|
c1905359d9 | ||
|
|
6bb8855afd | ||
|
|
b3faf8abf2 | ||
|
|
1603100f0d | ||
|
|
6dcdcaf08c | ||
|
|
8a0e1b21b9 | ||
|
|
9a80c00828 | ||
|
|
7d9c1b1aaf | ||
|
|
034ea368b0 | ||
|
|
1c3aa651f1 | ||
|
|
ad023b57c1 | ||
|
|
1b76df42cb | ||
|
|
36903d3e9d | ||
|
|
10bdd92b94 | ||
|
|
6f79a86e66 | ||
|
|
274cee38c7 | ||
|
|
49c10378bb | ||
|
|
e1ec7fc828 | ||
|
|
5a2876642e | ||
|
|
4b2a37a39e | ||
|
|
34d71e0c2e | ||
|
|
9ce5ca2b21 | ||
|
|
b62b5be44f | ||
|
|
4a8f432b10 | ||
|
|
3ea67696e1 | ||
|
|
0e24dc78c4 | ||
|
|
39fb33cd52 | ||
|
|
c680443251 | ||
|
|
2fe8b4c802 | ||
|
|
1b96dd81d9 | ||
|
|
447db33942 | ||
|
|
14245c968a | ||
|
|
14e047aa7e | ||
|
|
0c3f2ac64d | ||
|
|
089b6bff42 | ||
|
|
ea5c847c41 | ||
|
|
24e58e36aa | ||
|
|
c50eb01bb0 | ||
|
|
e43d75aacc | ||
|
|
8a72cfce36 | ||
|
|
c28afa48ee | ||
|
|
955906c411 | ||
|
|
dd88fc45fd | ||
|
|
f9ba16d72e | ||
|
|
20732329f4 | ||
|
|
dcf3c42a33 | ||
|
|
c37203d605 | ||
|
|
0a000dae5a | ||
|
|
21e067beaa | ||
|
|
f0b91be7c3 | ||
|
|
56539e0453 | ||
|
|
07d69bc1f7 | ||
|
|
f1fd4726e3 | ||
|
|
aa77a9c6e9 | ||
|
|
0a59bd8f61 | ||
|
|
aede532b9a | ||
|
|
722a375f1c | ||
|
|
3e69167bf9 | ||
|
|
5cdb5c7a6e | ||
|
|
3682e4b67a | ||
|
|
a8665b77d9 | ||
|
|
9255a7831c | ||
|
|
fae1278d82 | ||
|
|
d94b809814 | ||
|
|
435e7cf146 | ||
|
|
0478b91f24 | ||
|
|
9c54e324e9 | ||
|
|
6d5ea77bf5 | ||
|
|
ad420a2b02 | ||
|
|
a945a6fe9b | ||
|
|
1121f03fe6 | ||
|
|
48fa6ecf3a | ||
|
|
d867d63b78 | ||
|
|
17bcea4954 | ||
|
|
cafa759b3d | ||
|
|
8306b7039f | ||
|
|
b5e3137949 | ||
|
|
25ea975171 | ||
|
|
231066ea22 | ||
|
|
0abdac2db6 | ||
|
|
aeb4c2bd8a | ||
|
|
41e2703222 | ||
|
|
48fdc4fafd | ||
|
|
9bb9a6e2c8 | ||
|
|
5fa54a99c8 | ||
|
|
a507a3d9c4 | ||
|
|
f3578ae716 | ||
|
|
43f9e6bcf1 | ||
|
|
e4be1e83b0 | ||
|
|
aabc3b999b | ||
|
|
fb1e9d5d7a | ||
|
|
e4a0eb7972 | ||
|
|
927f68bfc5 | ||
|
|
c7ffbf51a0 | ||
|
|
73abb5ae58 | ||
|
|
b509056474 | ||
|
|
8345620813 | ||
|
|
1a0c81fbd4 | ||
|
|
e2b0ad581c | ||
|
|
221812d4d7 | ||
|
|
30766c65dd | ||
|
|
f5e449d1e6 | ||
|
|
8b46e3e711 | ||
|
|
91c6a3f20a | ||
|
|
805686dad2 | ||
|
|
84bf899380 | ||
|
|
35ba2a330f | ||
|
|
64e8ec3cfd | ||
|
|
5cd2a2ddb0 | ||
|
|
8a74a00c5b | ||
|
|
2688aeb5c7 | ||
|
|
e7a91cbe32 | ||
|
|
52e72a3022 | ||
|
|
cc28d81886 | ||
|
|
48124f12f4 | ||
|
|
23de8a630b | ||
|
|
6452e645dc | ||
|
|
5306fb1db8 | ||
|
|
ed6bb4161d | ||
|
|
2851c1d4e2 | ||
|
|
2a612b5c64 | ||
|
|
10f11f9982 | ||
|
|
3ead0f48d2 | ||
|
|
f053ba9a20 | ||
|
|
4445092191 | ||
|
|
12396498d7 | ||
|
|
e40fdf75ba | ||
|
|
6e6b438405 | ||
|
|
b5285c7a99 | ||
|
|
0f48afd01d | ||
|
|
b95019847c | ||
|
|
bdd933ff6f | ||
|
|
04ef6fad1c | ||
|
|
77053495b0 | ||
|
|
76744d2178 | ||
|
|
ba17da040a | ||
|
|
2c9af65747 | ||
|
|
041a2a72a1 | ||
|
|
78377b705f | ||
|
|
ae8c7c5325 | ||
|
|
4c05ba58d1 | ||
|
|
ecdfa8413d | ||
|
|
508e2dac3c | ||
|
|
4e4f7fc94c | ||
|
|
507d412355 | ||
|
|
e011da6661 | ||
|
|
c4bdff2b39 | ||
|
|
2d0e92750d | ||
|
|
535f3401d6 | ||
|
|
07f67b4df1 | ||
|
|
4585f2499d | ||
|
|
556c21a254 | ||
|
|
e250f83c1d | ||
|
|
94cb4ba908 | ||
|
|
24a8c09956 | ||
|
|
685c8b06f2 | ||
|
|
75bf28c45b | ||
|
|
4e5c7feb5f | ||
|
|
48854bfbeb | ||
|
|
c081a764a7 | ||
|
|
f3f3dde251 | ||
|
|
f572937529 | ||
|
|
90ce7bc6cb | ||
|
|
b0f757eb50 | ||
|
|
80bd7fd974 | ||
|
|
5f6d43f7b8 | ||
|
|
604321ebdb | ||
|
|
f5cc0da3ee | ||
|
|
8ed6e3c204 | ||
|
|
ad61859ddf | ||
|
|
e2172d12a0 | ||
|
|
1839dcdbd5 | ||
|
|
b00707ff84 | ||
|
|
414b7c1946 | ||
|
|
7e26d683dd | ||
|
|
48c97f8f2e | ||
|
|
5c3c19474a | ||
|
|
6d669c9b6c | ||
|
|
cacdafcf51 | ||
|
|
272a22a34c | ||
|
|
27c690acf4 | ||
|
|
37d9893e9e | ||
|
|
2043a5f991 | ||
|
|
5df24a644a | ||
|
|
45c726156c | ||
|
|
d1f3d40e03 | ||
|
|
137ef059e7 | ||
|
|
0998309138 | ||
|
|
78a90e1dec | ||
|
|
ebc92f4250 | ||
|
|
9f86549d30 | ||
|
|
b1279876cd | ||
|
|
9d1f512b44 | ||
|
|
5432636a82 | ||
|
|
07a5fb22c3 | ||
|
|
cb2e90bb71 | ||
|
|
2a50e28085 | ||
|
|
9732520e3f | ||
|
|
f1b3c73c65 | ||
|
|
b30e51ccf0 | ||
|
|
f95b0ad19e | ||
|
|
bef5f5b9f4 | ||
|
|
fe24c0717c | ||
|
|
b6ec75eeb6 | ||
|
|
7435073568 | ||
|
|
df99685a92 | ||
|
|
a8edbddbcd | ||
|
|
388bb09162 | ||
|
|
b3bbd567e8 | ||
|
|
a4d703b433 | ||
|
|
7554a16b4c | ||
|
|
785188c45c | ||
|
|
0e5d7977c3 | ||
|
|
b21f5e248d | ||
|
|
a8d3997c72 | ||
|
|
efc2b7c834 | ||
|
|
40dd50871c | ||
|
|
893363e225 | ||
|
|
1f8b79105a | ||
|
|
07f11585aa | ||
|
|
928a33d2ea | ||
|
|
372b7e86a4 | ||
|
|
84c551a6df | ||
|
|
5a653d7464 | ||
|
|
cf640a62ad | ||
|
|
6056a4c7d0 | ||
|
|
e4026b84e9 | ||
|
|
ff638862d9 | ||
|
|
1d6a930784 | ||
|
|
10314ce169 | ||
|
|
e65639a2e6 | ||
|
|
3a1679319f | ||
|
|
6c1f2e4ded | ||
|
|
f7375c2638 | ||
|
|
459fd67203 | ||
|
|
19ec3b34f9 | ||
|
|
c3b3ce4832 | ||
|
|
def4dd2c68 | ||
|
|
d7c495e229 | ||
|
|
c6209872f6 | ||
|
|
d950e3ceb1 | ||
|
|
01a7149b36 | ||
|
|
fe38dbb663 | ||
|
|
c73e77b3de | ||
|
|
ee105b7bbf | ||
|
|
fb1dcd0203 | ||
|
|
12dd45ca66 | ||
|
|
08e29defd2 | ||
|
|
e017195478 | ||
|
|
b77ed8cc7c | ||
|
|
0fc2448369 | ||
|
|
e9ec23b385 | ||
|
|
77985eaa08 | ||
|
|
64e10a9c77 | ||
|
|
55eeabba42 | ||
|
|
90e55025d6 | ||
|
|
2320c16508 | ||
|
|
40df72bc95 | ||
|
|
d61f2356db | ||
|
|
f1e768e184 | ||
|
|
4e5f7ef48e | ||
|
|
ba3bcdb21b | ||
|
|
2921838895 | ||
|
|
243beeb96a | ||
|
|
948504444d | ||
|
|
37fa5f034c | ||
|
|
304f4179c5 | ||
|
|
4b89399640 | ||
|
|
faefde1a4f | ||
|
|
edf4a9bcf4 | ||
|
|
a51a220a24 | ||
|
|
c80bcfd0bb | ||
|
|
243c46a9a6 | ||
|
|
d8a2061a14 | ||
|
|
25ccb17917 | ||
|
|
381e54f4a9 | ||
|
|
acbcccda22 | ||
|
|
11ddf673f0 | ||
|
|
c3a55cb03b | ||
|
|
2c1c298003 | ||
|
|
b1b7ed5ecb | ||
|
|
702c4d46af | ||
|
|
3a291283eb | ||
|
|
1c8c2cb11f | ||
|
|
da9d550f05 | ||
|
|
3d17cee393 | ||
|
|
0595aa8fea | ||
|
|
70261592b3 | ||
|
|
bbfd433b8e | ||
|
|
67df58e10d | ||
|
|
f78a6a858a | ||
|
|
6dca968e66 | ||
|
|
822df970dc | ||
|
|
3fcbac1e95 | ||
|
|
f13cf8db11 | ||
|
|
0d8edeccfa | ||
|
|
45dd77938b | ||
|
|
931cebb12f | ||
|
|
39723102a9 | ||
|
|
f2db4651d0 | ||
|
|
5e2dc1e30c | ||
|
|
ab5cb1118d | ||
|
|
6e56d80529 | ||
|
|
dd54d2aad1 | ||
|
|
9ce58ec2ad | ||
|
|
cbfc727cd2 | ||
|
|
c51724942b | ||
|
|
7aae45a67f | ||
|
|
612706e02f | ||
|
|
ea856e1484 | ||
|
|
1342b47f63 | ||
|
|
5b2712490e | ||
|
|
8fb66ef908 | ||
|
|
03f440d064 | ||
|
|
5e84c8d935 | ||
|
|
4eddb181c6 | ||
|
|
af8fc94188 | ||
|
|
ffad873b0f | ||
|
|
becfb799a5 | ||
|
|
6465cfe1ea | ||
|
|
f8d33def59 | ||
|
|
30f44eff1d | ||
|
|
0d6acd82e0 | ||
|
|
f60b5d1c8c | ||
|
|
1d19c67cea | ||
|
|
82a16bc1e9 | ||
|
|
7452d398e5 | ||
|
|
1f03a0e726 | ||
|
|
9685946196 | ||
|
|
34c87b45fe | ||
|
|
cabeff1eee | ||
|
|
93df70417a | ||
|
|
fecd879840 | ||
|
|
f12f77ba46 | ||
|
|
129bc72273 | ||
|
|
21cdcecb81 | ||
|
|
c979f25d02 | ||
|
|
1849e2230c | ||
|
|
589191f532 | ||
|
|
927b6c2cbb | ||
|
|
0e4f16dddc | ||
|
|
7f3be89d9c | ||
|
|
9eaf6b2fdf | ||
|
|
3e612b8407 | ||
|
|
705c3ac8c6 | ||
|
|
f8b8cad95a | ||
|
|
d96e5308a1 | ||
|
|
f079ca3443 | ||
|
|
af11f82d4d | ||
|
|
147ecdd9c6 | ||
|
|
2c0a1b4cb6 | ||
|
|
8454f82ba3 | ||
|
|
a17fe175d2 | ||
|
|
5dc451f159 | ||
|
|
ff969f0048 | ||
|
|
d5d88ae8b8 | ||
|
|
85367ec6d7 | ||
|
|
6830a8581e | ||
|
|
6b7875765d | ||
|
|
60d57f06b7 | ||
|
|
d1a1050e67 | ||
|
|
2911e11033 | ||
|
|
e323c4a88c | ||
|
|
5f0bd0a5c7 | ||
|
|
344dd516a0 | ||
|
|
822a97c8d9 | ||
|
|
737a76918f | ||
|
|
58c0e7d868 | ||
|
|
741bd5da95 | ||
|
|
a2d217ad36 | ||
|
|
a1942ccec7 | ||
|
|
bd9bc77129 | ||
|
|
4134b98701 | ||
|
|
798e93e4a8 | ||
|
|
c6e1730a0a | ||
|
|
e67a55bf86 | ||
|
|
d577b74106 | ||
|
|
c713d540e6 | ||
|
|
22e9452de0 | ||
|
|
e7d528e1d2 | ||
|
|
65538e3ac9 | ||
|
|
8d1e13fd0c | ||
|
|
941df67e24 | ||
|
|
9f0185018e | ||
|
|
ace87a357a | ||
|
|
9c5df232ed | ||
|
|
1044be41a2 | ||
|
|
f644bf1659 | ||
|
|
6ca08afb74 | ||
|
|
24d1f58aca | ||
|
|
5e3ba88dde | ||
|
|
93de5d5f69 | ||
|
|
22edbe79ab | ||
|
|
a22458a592 | ||
|
|
8d16838e6f | ||
|
|
60477ac627 | ||
|
|
5e3e20c552 | ||
|
|
648abeef1f | ||
|
|
a3d37aad1e | ||
|
|
14453560da | ||
|
|
d65c232057 | ||
|
|
726a0589ec | ||
|
|
dc633cdee9 | ||
|
|
ff5c3b9574 | ||
|
|
5bd9906569 | ||
|
|
70bb2afe93 | ||
|
|
076f12cb34 | ||
|
|
6ffe20ddc8 | ||
|
|
1a1edf01b5 | ||
|
|
74fa193b82 | ||
|
|
6da7c3c88e | ||
|
|
f892fbeb18 | ||
|
|
a13376c2d1 | ||
|
|
99ff9adca5 | ||
|
|
9d0d13296d | ||
|
|
091ec36c28 | ||
|
|
0f0dcea773 | ||
|
|
35f35541ff | ||
|
|
53cfb50d75 |
@@ -80,6 +80,13 @@ if(ENABLE_ECL_INPUT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPM_ENABLE_EMBEDDED_PYTHON AND NOT OPM_ENABLE_PYTHON)
|
||||
# This needs to be here to run before source_hook
|
||||
message(WARNING "Inconsistent settings: OPM_ENABLE_PYTHON=OFF and "
|
||||
"OPM_ENABLE_EMBEDDED_PYTHON=ON. Please use OPM_ENABLE_PYTHON=ON to "
|
||||
"activate. Will disable embedded python in this run.")
|
||||
set(OPM_ENABLE_EMBEDDED_PYTHON OFF CACHE BOOL "Enable embedded python?" FORCE)
|
||||
endif()
|
||||
# read the list of components from this file (in the project directory);
|
||||
# it should set various lists with the names of the files to include
|
||||
include (CMakeLists_files.cmake)
|
||||
@@ -130,11 +137,11 @@ macro (sources_hook)
|
||||
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()
|
||||
if (OPM_ENABLE_PYTHON)
|
||||
if (OPM_ENABLE_EMBEDDED_PYTHON)
|
||||
list(INSERT opm-common_SOURCES 0 ${PROJECT_BINARY_DIR}/python/cxx/builtin_pybind11.cpp)
|
||||
endif()
|
||||
endif()
|
||||
set_source_files_properties(src/opm/parser/eclipse/Python/Python.cpp
|
||||
set_source_files_properties(src/opm/input/eclipse/Python/Python.cpp
|
||||
PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
endmacro (sources_hook)
|
||||
|
||||
@@ -192,6 +199,18 @@ if (OPM_ENABLE_PYTHON)
|
||||
else()
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
endif()
|
||||
# Make sure we fail gracefully here without setuptool
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import setuptools"
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
ERROR_VARIABLE SETUPTOOL_ERROR OUTPUT_VARIABLE SETUPTOOL_OUT
|
||||
RESULT_VARIABLE SETUPTOOL_RESULT)
|
||||
if(SETUPTOOL_RESULT GREATER 0)
|
||||
message(WARNING "Trying to test setuptools resulted in error message: ${SETUPTOOL_ERROR}")
|
||||
message(SEND_ERROR "To build the python bindings you need to install setuptool. "
|
||||
"Either use \"apt-get install python3-setuptools\" (on Debian/Ubuntu) "
|
||||
"or \"pip install setuptools\"")
|
||||
endif()
|
||||
|
||||
# Compatibility settings for PythonInterp and PythonLibs
|
||||
# used e.g. in FindCwrap, pybind11
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
@@ -243,10 +262,6 @@ if (ENABLE_MOCKSIM)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_SCHEDULE_DEBUG)
|
||||
add_compile_definitions( SCHEDULE_DEBUG )
|
||||
endif()
|
||||
|
||||
# Build the compare utilities
|
||||
if(ENABLE_ECL_INPUT)
|
||||
add_executable(compareECL
|
||||
@@ -263,11 +278,15 @@ if(ENABLE_ECL_INPUT)
|
||||
test_util/summary.cpp
|
||||
)
|
||||
|
||||
add_executable(arraylist
|
||||
test_util/arraylist.cpp
|
||||
)
|
||||
|
||||
add_executable(rewriteEclFile
|
||||
test_util/rewriteEclFile.cpp
|
||||
)
|
||||
|
||||
foreach(target compareECL convertECL summary rewriteEclFile)
|
||||
foreach(target compareECL convertECL summary rewriteEclFile arraylist)
|
||||
target_link_libraries(${target} opmcommon)
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
endforeach()
|
||||
@@ -301,11 +320,6 @@ if(ENABLE_ECL_INPUT)
|
||||
${PROJECT_BINARY_DIR}/tests
|
||||
)
|
||||
|
||||
foreach(test test_EclIO test_EGrid test_ERft test_ERst test_ESmry test_EInit test_ExtESmry)
|
||||
opm_add_test(${test} CONDITION ENABLE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND
|
||||
LIBRARIES ${_libs}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Install build system files and documentation
|
||||
@@ -320,9 +334,18 @@ install(FILES cmake/OPM-CMake.md
|
||||
install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc)
|
||||
|
||||
if (OPM_ENABLE_PYTHON)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
|
||||
import site, sys
|
||||
try:
|
||||
sys.stdout.write(site.getsitepackages()[-1])
|
||||
except e:
|
||||
sys.stdout.write('')" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES_PATH)
|
||||
# -------------------------------------------------------------------------
|
||||
# 1: Wrap C++ functionality in Python
|
||||
if (EXISTS "/etc/debian_version")
|
||||
if (PYTHON_SITE_PACKAGES_PATH MATCHES ".*/dist-packages/?" AND
|
||||
CMAKE_INSTALL_PREFIX MATCHES "^/usr.*")
|
||||
# dist-packages is only used if we install below /usr and python's site packages
|
||||
# path matches dist-packages
|
||||
set(PYTHON_PACKAGE_PATH "dist-packages")
|
||||
else()
|
||||
set(PYTHON_PACKAGE_PATH "site-packages")
|
||||
@@ -361,7 +384,12 @@ if (OPM_ENABLE_PYTHON)
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
list(APPEND _python_rpath_list "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
if (OPM_INSTALL_PYTHON)
|
||||
list(APPEND _python_rpath_list "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
list(APPEND _python_rpath_list "${PROJECT_BINARY_DIR}/lib")
|
||||
else()
|
||||
list(APPEND _python_rpath_list "${PROJECT_BINARY_DIR}/lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (_python_rpath_list)
|
||||
@@ -393,6 +421,16 @@ if (OPM_ENABLE_PYTHON)
|
||||
set(SETUP_PY_FMT_FLAGS "'-DFMT_HEADER_ONLY'")
|
||||
endif()
|
||||
|
||||
if(cjson_FOUND)
|
||||
list(APPEND opm-common_PYTHON_LINKAGE "'${cjson_LIBRARIES}'")
|
||||
endif()
|
||||
|
||||
# opm-common_PYTHON_LINKAGE is used verbatim in a listin python.
|
||||
# Hence items need to be comma separated.
|
||||
if (opm-common_PYTHON_LINKAGE)
|
||||
string(REPLACE ";" "," SETUP_PY_LINKAGE "${opm-common_PYTHON_LINKAGE}")
|
||||
endif()
|
||||
|
||||
configure_file (${PROJECT_SOURCE_DIR}/python/setup.py.in ${PROJECT_BINARY_DIR}/python/setup.py)
|
||||
file(COPY ${PROJECT_SOURCE_DIR}/python/README.md DESTINATION ${PROJECT_BINARY_DIR}/python)
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} target_name.py
|
||||
@@ -475,11 +513,6 @@ if (OPM_ENABLE_PYTHON)
|
||||
target_link_libraries(opmcommon PUBLIC ${PYTHON_LIBRARY})
|
||||
add_definitions(-DEMBEDDED_PYTHON)
|
||||
endif()
|
||||
else()
|
||||
if (OPM_ENABLE_EMBEDDED_PYTHON)
|
||||
message(WARNING "Inconsistent settings OPM_ENABLE_PYTHON / OPM_ENABLE_EMBEDDED_PYTHON")
|
||||
set(OPM_ENABLE_EMBEDDED_PYTHON OFF CACHE BOOL "Enable embedded python?" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(DIRECTORY docs/man1 DESTINATION ${CMAKE_INSTALL_MANDIR}
|
||||
|
||||
@@ -39,192 +39,198 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
src/opm/common/utility/parameters/ParameterGroup.cpp
|
||||
src/opm/common/utility/parameters/ParameterTools.cpp
|
||||
src/opm/common/utility/numeric/calculateCellVol.cpp
|
||||
src/opm/common/utility/shmatch.cpp
|
||||
src/opm/common/utility/TimeService.cpp
|
||||
)
|
||||
if(ENABLE_ECL_INPUT)
|
||||
list(APPEND MAIN_SOURCE_FILES
|
||||
src/opm/io/eclipse/SummaryNode.cpp
|
||||
src/opm/json/JsonObject.cpp
|
||||
src/opm/parser/eclipse/Deck/Deck.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckTree.cpp
|
||||
src/opm/parser/eclipse/Deck/FileDeck.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckItem.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckValue.cpp
|
||||
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/DeckSection.cpp
|
||||
src/opm/parser/eclipse/Deck/ImportContainer.cpp
|
||||
src/opm/parser/eclipse/Deck/UDAValue.cpp
|
||||
src/opm/parser/eclipse/Python/Python.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/AquiferConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/AquiferCT.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/Aquifetp.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/Aquancon.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/AquiferHelpers.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.cpp
|
||||
src/opm/parser/eclipse/EclipseState/checkDeck.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/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
|
||||
src/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp
|
||||
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/MapAxes.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
|
||||
src/opm/parser/eclipse/EclipseState/Grid/TranCalculator.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp
|
||||
src/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp
|
||||
src/opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Runspec.cpp
|
||||
src/opm/parser/eclipse/EclipseState/TracerConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/MICPpara.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionAST.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionResult.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Actdims.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Actions.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionParser.cpp
|
||||
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/Enums.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/State.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/eval_uda.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateConfig.cpp
|
||||
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/KeywordHandlers.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/AICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Balance.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Branch.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Network/Node.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RPTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RSTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleDeck.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleState.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/SummaryState.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/WriteRestartFileEvents.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/Connection.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/injection.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/PAvg.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/PAvgCalculator.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/PAvgCalculatorCollection.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/NameOrder.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellMatcher.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/WList.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Well/WellEconProductionLimits.cpp
|
||||
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/WellMICPProperties.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/Aqudims.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/DenT.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Eqldims.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/JFunc.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Regdims.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
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TLMixpar.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
|
||||
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/RwgsaltTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Tables/Tabdims.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
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQContext.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.cpp
|
||||
src/opm/parser/eclipse/Parser/ErrorGuard.cpp
|
||||
src/opm/parser/eclipse/Parser/ParseContext.cpp
|
||||
src/opm/parser/eclipse/Parser/Parser.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserEnums.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserItem.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserKeyword.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserRecord.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/RawRecord.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/StarToken.cpp
|
||||
src/opm/parser/eclipse/Units/Dimension.cpp
|
||||
src/opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/parser/eclipse/Utility/Functional.cpp
|
||||
src/opm/input/eclipse/Deck/Deck.cpp
|
||||
src/opm/input/eclipse/Deck/DeckView.cpp
|
||||
src/opm/input/eclipse/Deck/DeckTree.cpp
|
||||
src/opm/input/eclipse/Deck/FileDeck.cpp
|
||||
src/opm/input/eclipse/Deck/DeckItem.cpp
|
||||
src/opm/input/eclipse/Deck/DeckValue.cpp
|
||||
src/opm/input/eclipse/Deck/DeckKeyword.cpp
|
||||
src/opm/input/eclipse/Deck/DeckRecord.cpp
|
||||
src/opm/input/eclipse/Deck/DeckOutput.cpp
|
||||
src/opm/input/eclipse/Deck/DeckSection.cpp
|
||||
src/opm/input/eclipse/Deck/ImportContainer.cpp
|
||||
src/opm/input/eclipse/Deck/UDAValue.cpp
|
||||
src/opm/input/eclipse/Python/Python.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/PyAction.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/AquiferConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/AquiferCT.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/Aquifetp.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/Aquancon.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/AquiferHelpers.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.cpp
|
||||
src/opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.cpp
|
||||
src/opm/input/eclipse/EclipseState/checkDeck.cpp
|
||||
src/opm/input/eclipse/EclipseState/EclipseConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/EclipseState.cpp
|
||||
src/opm/input/eclipse/EclipseState/EndpointScaling.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/FieldProps.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/FieldPropsManager.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/Box.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/BoxManager.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/FaceDir.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/FaultCollection.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/Fault.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/FaultFace.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/GridDims.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/MapAxes.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/MULTREGTScanner.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/NNC.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/Operate.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/PinchMode.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/setKeywordBox.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/TranCalculator.cpp
|
||||
src/opm/input/eclipse/EclipseState/Grid/TransMult.cpp
|
||||
src/opm/input/eclipse/EclipseState/InitConfig/Equil.cpp
|
||||
src/opm/input/eclipse/EclipseState/InitConfig/FoamConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/InitConfig/InitConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/IOConfig/IOConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/Runspec.cpp
|
||||
src/opm/input/eclipse/EclipseState/TracerConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/MICPpara.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionAST.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionContext.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionResult.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/Actdims.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/Actions.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionX.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionParser.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ActionValue.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/ASTNode.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/Condition.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/Enums.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/State.cpp
|
||||
src/opm/input/eclipse/Schedule/Action/WGNames.cpp
|
||||
src/opm/input/eclipse/Schedule/ArrayDimChecker.cpp
|
||||
src/opm/input/eclipse/Schedule/CompletedCells.cpp
|
||||
src/opm/input/eclipse/Schedule/eval_uda.cpp
|
||||
src/opm/input/eclipse/Schedule/Events.cpp
|
||||
src/opm/input/eclipse/Schedule/GasLiftOpt.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GPMaint.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/Group.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GuideRate.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GuideRateConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GuideRateModel.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GConSale.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GConSump.cpp
|
||||
src/opm/input/eclipse/Schedule/Group/GTNode.cpp
|
||||
src/opm/input/eclipse/Schedule/KeywordHandlers.cpp
|
||||
src/opm/input/eclipse/Schedule/MessageLimits.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/icd.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/Compsegs.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/Segment.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/WellSegments.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/AICD.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/SICD.cpp
|
||||
src/opm/input/eclipse/Schedule/MSW/Valve.cpp
|
||||
src/opm/input/eclipse/Schedule/Network/Balance.cpp
|
||||
src/opm/input/eclipse/Schedule/Network/Branch.cpp
|
||||
src/opm/input/eclipse/Schedule/Network/ExtNetwork.cpp
|
||||
src/opm/input/eclipse/Schedule/Network/Node.cpp
|
||||
src/opm/input/eclipse/Schedule/OilVaporizationProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/RFTConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/RPTConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/RSTConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/Schedule.cpp
|
||||
src/opm/input/eclipse/Schedule/ScheduleDeck.cpp
|
||||
src/opm/input/eclipse/Schedule/ScheduleGrid.cpp
|
||||
src/opm/input/eclipse/Schedule/ScheduleState.cpp
|
||||
src/opm/input/eclipse/Schedule/ScheduleTypes.cpp
|
||||
src/opm/input/eclipse/Schedule/SummaryState.cpp
|
||||
src/opm/input/eclipse/Schedule/Tuning.cpp
|
||||
src/opm/input/eclipse/Schedule/WriteRestartFileEvents.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/Connection.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/injection.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/PAvg.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/PAvgCalculator.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/PAvgCalculatorCollection.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/Well.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellConnections.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/NameOrder.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellMatcher.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WList.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WListManager.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellEconProductionLimits.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellFoamProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellInjectionProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellMICPProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellPolymerProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellBrineProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellTracerProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WVFPEXP.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellProductionProperties.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellTestConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/Well/WellTestState.cpp
|
||||
src/opm/input/eclipse/EclipseState/SimulationConfig/BCConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/SimulationConfig/RockConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp
|
||||
src/opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Aqudims.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/ColumnSchema.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/DenT.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Eqldims.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/JFunc.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/PvtxTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Regdims.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/SimpleTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/PolyInjTables.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/StandardCond.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TableColumn.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TableContainer.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TableIndex.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TLMixpar.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TableManager.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/TableSchema.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Tables.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Rock2dTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Rock2dtrTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/PvtwsaltTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/BrineDensityTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/RwgsaltTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/SolventDensityTable.cpp
|
||||
src/opm/input/eclipse/EclipseState/Tables/Tabdims.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQASTNode.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQParams.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQParser.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQSet.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQActive.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQAssign.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQDefine.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQEnums.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQToken.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQConfig.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQContext.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQFunction.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQFunctionTable.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQInput.cpp
|
||||
src/opm/input/eclipse/Schedule/UDQ/UDQState.cpp
|
||||
src/opm/input/eclipse/Schedule/VFPInjTable.cpp
|
||||
src/opm/input/eclipse/Schedule/VFPProdTable.cpp
|
||||
src/opm/input/eclipse/Parser/ErrorGuard.cpp
|
||||
src/opm/input/eclipse/Parser/ParseContext.cpp
|
||||
src/opm/input/eclipse/Parser/Parser.cpp
|
||||
src/opm/input/eclipse/Parser/ParserEnums.cpp
|
||||
src/opm/input/eclipse/Parser/ParserItem.cpp
|
||||
src/opm/input/eclipse/Parser/ParserKeyword.cpp
|
||||
src/opm/input/eclipse/Parser/ParserRecord.cpp
|
||||
src/opm/input/eclipse/Parser/raw/RawKeyword.cpp
|
||||
src/opm/input/eclipse/Parser/raw/RawRecord.cpp
|
||||
src/opm/input/eclipse/Parser/raw/StarToken.cpp
|
||||
src/opm/input/eclipse/Units/Dimension.cpp
|
||||
src/opm/input/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/input/eclipse/Utility/Functional.cpp
|
||||
)
|
||||
|
||||
|
||||
@@ -257,11 +263,11 @@ if(ENABLE_ECL_INPUT)
|
||||
|
||||
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)
|
||||
set_source_files_properties(src/opm/input/eclipse/Python/PythonInterp.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
set_source_files_properties(src/opm/input/eclipse/Schedule/Action/PyAction.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
list( APPEND MAIN_SOURCE_FILES
|
||||
src/opm/parser/eclipse/Python/PythonInterp.cpp
|
||||
src/opm/parser/eclipse/Python/PyRunModule.cpp
|
||||
src/opm/input/eclipse/Python/PythonInterp.cpp
|
||||
src/opm/input/eclipse/Python/PyRunModule.cpp
|
||||
${PYTHON_CXX_SOURCE_FILES})
|
||||
endif()
|
||||
|
||||
@@ -295,10 +301,14 @@ if(ENABLE_ECL_OUTPUT)
|
||||
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/network.cpp
|
||||
src/opm/io/eclipse/rst/udq.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/data/Aquifer.cpp
|
||||
src/opm/output/data/InterRegFlowMap.cpp
|
||||
src/opm/output/data/Solution.cpp
|
||||
src/opm/output/eclipse/ActiveIndexByColumns.cpp
|
||||
src/opm/output/eclipse/AggregateActionxData.cpp
|
||||
src/opm/output/eclipse/AggregateAquiferData.cpp
|
||||
@@ -332,8 +342,6 @@ if(ENABLE_ECL_OUTPUT)
|
||||
src/opm/output/eclipse/WriteRFT.cpp
|
||||
src/opm/output/eclipse/WriteRPT.cpp
|
||||
src/opm/output/eclipse/report/WELSPECS.cpp
|
||||
src/opm/output/data/Aquifer.cpp
|
||||
src/opm/output/data/Solution.cpp
|
||||
src/opm/utility/EModel.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -343,7 +351,6 @@ list (APPEND TEST_SOURCE_FILES
|
||||
tests/test_calculateCellVol.cpp
|
||||
tests/test_cmp.cpp
|
||||
tests/test_cubic.cpp
|
||||
tests/test_FileSystem.cpp
|
||||
tests/test_messagelimiter.cpp
|
||||
tests/test_nonuniformtablelinear.cpp
|
||||
tests/test_OpmInputError_format.cpp
|
||||
@@ -359,6 +366,13 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/test_ERsm.cpp
|
||||
tests/test_GuideRate.cpp
|
||||
tests/test_RestartFileView.cpp
|
||||
tests/test_EclIO.cpp
|
||||
tests/test_EGrid.cpp
|
||||
tests/test_ERft.cpp
|
||||
tests/test_ERst.cpp
|
||||
tests/test_ESmry.cpp
|
||||
tests/test_EInit.cpp
|
||||
tests/test_ExtESmry.cpp
|
||||
tests/parser/ACTIONX.cpp
|
||||
tests/parser/ADDREGTests.cpp
|
||||
tests/parser/AquiferTests.cpp
|
||||
@@ -448,6 +462,8 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/test_EclipseIO.cpp
|
||||
tests/test_DoubHEAD.cpp
|
||||
tests/test_InteHEAD.cpp
|
||||
tests/test_data_InterRegFlow.cpp
|
||||
tests/test_data_InterRegFlowMap.cpp
|
||||
tests/test_LinearisedOutputTable.cpp
|
||||
tests/test_LogiHEAD.cpp
|
||||
tests/test_LGOData.cpp
|
||||
@@ -501,6 +517,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/UDQ_ACTIONX.DATA
|
||||
tests/UDQ_ACTIONX_RESTART.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/5_NETWORK_MODEL5_STDW_NETBAL_PACK.DATA
|
||||
tests/9_4C_WINJ_GINJ_UDQ_MSW-UDARATE_TEST_PACK.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
tests/UDQ_ACTIONX_TEST1_U.DATA
|
||||
@@ -527,10 +544,18 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/action_syntax_error.py
|
||||
tests/action_missing_run.py
|
||||
tests/EMBEDDED_PYTHON.DATA
|
||||
tests/ACTIONX_M1.DATA
|
||||
tests/ACTIONX_M1_MULTIPLE.DATA
|
||||
tests/ACTIONX_M1_RESTART.DATA
|
||||
tests/ACTIONX_M1.UNRST
|
||||
tests/ACTIONX_M1.X0010
|
||||
tests/wclose.py
|
||||
tests/msim/MSIM_PYACTION.DATA
|
||||
tests/msim/MSIM_PYACTION_ACTIONX.DATA
|
||||
tests/msim/action1.py
|
||||
tests/msim/action2.py
|
||||
tests/msim/action3.py
|
||||
tests/msim/action_count.py
|
||||
tests/VFP_CASE.DATA)
|
||||
endif()
|
||||
|
||||
@@ -564,6 +589,7 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/UDQ_WCONPROD_GRID.grdecl
|
||||
tests/UDQ_WCONPROD_RESTART.DATA
|
||||
tests/UDQ_WCONPROD.X0006
|
||||
tests/BASE.UNRST
|
||||
)
|
||||
list (APPEND EXAMPLE_SOURCE_FILES
|
||||
examples/opmi.cpp
|
||||
@@ -627,6 +653,7 @@ list( APPEND PUBLIC_HEADER_FILES
|
||||
opm/common/utility/parameters/ParameterStrings.hpp
|
||||
opm/common/utility/parameters/ParameterTools.hpp
|
||||
opm/common/utility/numeric/calculateCellVol.hpp
|
||||
opm/common/utility/shmatch.hpp
|
||||
opm/common/utility/String.hpp
|
||||
opm/common/utility/TimeService.hpp
|
||||
)
|
||||
@@ -634,245 +661,252 @@ if(ENABLE_ECL_INPUT)
|
||||
list(APPEND PUBLIC_HEADER_FILES
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/json/JsonObject.hpp
|
||||
opm/parser/eclipse/Utility/Functional.hpp
|
||||
opm/parser/eclipse/Utility/Typetools.hpp
|
||||
opm/parser/eclipse/Generator/KeywordGenerator.hpp
|
||||
opm/parser/eclipse/Generator/KeywordLoader.hpp
|
||||
opm/parser/eclipse/Units/UnitSystem.hpp
|
||||
opm/parser/eclipse/Units/Units.hpp
|
||||
opm/parser/eclipse/Units/Dimension.hpp
|
||||
opm/parser/eclipse/Parser/ErrorGuard.hpp
|
||||
opm/parser/eclipse/Parser/ParserItem.hpp
|
||||
opm/parser/eclipse/Parser/Parser.hpp
|
||||
opm/parser/eclipse/Parser/ParserRecord.hpp
|
||||
opm/parser/eclipse/Parser/ParserKeyword.hpp
|
||||
opm/parser/eclipse/Parser/InputErrorAction.hpp
|
||||
opm/parser/eclipse/Parser/ParserEnums.hpp
|
||||
opm/parser/eclipse/Parser/ParseContext.hpp
|
||||
opm/parser/eclipse/Parser/ParserConst.hpp
|
||||
opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp
|
||||
opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Util/IOrderSet.hpp
|
||||
opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp
|
||||
opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/FieldData.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/Keywords.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/GridDims.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/TranCalculator.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/TransMult.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/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/MapAxes.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp
|
||||
opm/parser/eclipse/EclipseState/EndpointScaling.hpp
|
||||
opm/parser/eclipse/EclipseState/TracerConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/MICPpara.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
|
||||
opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp
|
||||
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/PermfactTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RwgsaltTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SaltpvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SolventDensityTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlymwinjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SkprwatTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SkprpolyTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TLMixpar.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/JFunc.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtgwoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/AqutabTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/FoamadsTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/FoammobTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PbvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PvtsolTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RockwnodTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/OverburdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TracerVdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/EclipseState.hpp
|
||||
opm/parser/eclipse/EclipseState/EclipseConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/Aquancon.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/AquiferConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/AquiferCT.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/Aquifetp.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.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/Enums.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/GasLiftOpt.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Balance.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Branch.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/ExtNetwork.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Network/Node.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp
|
||||
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/PAvg.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/PAvgCalculator.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/PAvgCalculatorCollection.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WList.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/NameOrder.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellMatcher.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/WellMICPProperties.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellPolymerProperties.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellTracerProperties.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/RPTConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/RSTConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleDeck.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleState.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/WriteRestartFileEvents.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GPMaint.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GTNode.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp
|
||||
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/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/AICD.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/MSW/SICD.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/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/UDQState.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQToken.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp
|
||||
opm/parser/eclipse/Deck/DeckItem.hpp
|
||||
opm/parser/eclipse/Deck/Deck.hpp
|
||||
opm/parser/eclipse/Deck/FileDeck.hpp
|
||||
opm/parser/eclipse/Deck/DeckSection.hpp
|
||||
opm/parser/eclipse/Deck/DeckTree.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/ImportContainer.hpp
|
||||
opm/parser/eclipse/Deck/UDAValue.hpp
|
||||
opm/parser/eclipse/Deck/value_status.hpp
|
||||
opm/parser/eclipse/Python/Python.hpp)
|
||||
opm/input/eclipse/Utility/Functional.hpp
|
||||
opm/input/eclipse/Utility/Typetools.hpp
|
||||
opm/input/eclipse/Generator/KeywordGenerator.hpp
|
||||
opm/input/eclipse/Generator/KeywordLoader.hpp
|
||||
opm/input/eclipse/Units/UnitSystem.hpp
|
||||
opm/input/eclipse/Units/Units.hpp
|
||||
opm/input/eclipse/Units/Dimension.hpp
|
||||
opm/input/eclipse/Parser/ErrorGuard.hpp
|
||||
opm/input/eclipse/Parser/ParserItem.hpp
|
||||
opm/input/eclipse/Parser/Parser.hpp
|
||||
opm/input/eclipse/Parser/ParserRecord.hpp
|
||||
opm/input/eclipse/Parser/ParserKeyword.hpp
|
||||
opm/input/eclipse/Parser/InputErrorAction.hpp
|
||||
opm/input/eclipse/Parser/ParserEnums.hpp
|
||||
opm/input/eclipse/Parser/ParseContext.hpp
|
||||
opm/input/eclipse/Parser/ParserConst.hpp
|
||||
opm/input/eclipse/EclipseState/InitConfig/InitConfig.hpp
|
||||
opm/input/eclipse/EclipseState/InitConfig/Equil.hpp
|
||||
opm/input/eclipse/EclipseState/InitConfig/FoamConfig.hpp
|
||||
opm/input/eclipse/EclipseState/Util/IOrderSet.hpp
|
||||
opm/input/eclipse/EclipseState/Util/OrderedMap.hpp
|
||||
opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/FieldData.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/Keywords.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/GridDims.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/TranCalculator.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/TransMult.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/PinchMode.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/MULTREGTScanner.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/FaultCollection.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/Fault.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/Box.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/FieldPropsManager.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/FaultFace.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/NNC.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/BoxManager.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/FaceDir.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/MapAxes.hpp
|
||||
opm/input/eclipse/EclipseState/Grid/MinpvMode.hpp
|
||||
opm/input/eclipse/EclipseState/EndpointScaling.hpp
|
||||
opm/input/eclipse/EclipseState/TracerConfig.hpp
|
||||
opm/input/eclipse/EclipseState/MICPpara.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/DenT.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SimpleTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/StandardCond.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PolyInjTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PdvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TlpmixpaTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvdgTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/MsfnTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/GasvisctTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Regdims.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Eqldims.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SpecrockTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtwsaltTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/BrineDensityTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PermfactTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RwgsaltTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SaltSolubilityTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SaltvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SaltpvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SolventDensityTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlydhflfTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlymwinjTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlyshlogTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RsvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SkprwatTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SkprpolyTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SpecheatTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SgcwmisTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Sof2Table.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TLMixpar.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableManager.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SwfnTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/EnptvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SwofTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/FlatTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Aqudims.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/JFunc.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableIndex.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtgTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtgwTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtgwoTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Tabdims.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableSchema.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RocktabTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/EnkrvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlyrockTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtxTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/WatvisctTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableEnums.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RvvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableContainer.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/AqutabTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlyadsTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/FoamadsTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/FoammobTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PbvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SorwmisTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlymaxTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PlyviscTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TableColumn.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SsfnTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvdoTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/OilvisctTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SgfnTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/MiscTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SgwfnTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvdsTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtoTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PvtsolTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Rock2dTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Rock2dtrTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RockwnodTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/OverburdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/ColumnSchema.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/PmiscTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/RtempvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SlgofTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/ImptvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/ImkrvdTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/Sof3Table.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/SgofTable.hpp
|
||||
opm/input/eclipse/EclipseState/Tables/TracerVdTable.hpp
|
||||
opm/input/eclipse/EclipseState/EclipseState.hpp
|
||||
opm/input/eclipse/EclipseState/EclipseConfig.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/Aquancon.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/AquiferConfig.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/AquiferCT.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/Aquifetp.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp
|
||||
opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.hpp
|
||||
opm/input/eclipse/Schedule/Action/ActionAST.hpp
|
||||
opm/input/eclipse/Schedule/Action/ActionContext.hpp
|
||||
opm/input/eclipse/Schedule/Action/ActionResult.hpp
|
||||
opm/input/eclipse/Schedule/Action/ActionValue.hpp
|
||||
opm/input/eclipse/Schedule/Action/Actdims.hpp
|
||||
opm/input/eclipse/Schedule/Action/Actions.hpp
|
||||
opm/input/eclipse/Schedule/Action/ActionX.hpp
|
||||
opm/input/eclipse/Schedule/Action/Condition.hpp
|
||||
opm/input/eclipse/Schedule/Action/Enums.hpp
|
||||
opm/input/eclipse/Schedule/Action/ASTNode.hpp
|
||||
opm/input/eclipse/Schedule/Action/PyAction.hpp
|
||||
opm/input/eclipse/Schedule/Action/SimulatorUpdate.hpp
|
||||
opm/input/eclipse/Schedule/Action/State.hpp
|
||||
opm/input/eclipse/Schedule/Action/WGNames.hpp
|
||||
opm/input/eclipse/Schedule/ArrayDimChecker.hpp
|
||||
opm/input/eclipse/Schedule/GasLiftOpt.hpp
|
||||
opm/input/eclipse/Schedule/Network/Balance.hpp
|
||||
opm/input/eclipse/Schedule/Network/Branch.hpp
|
||||
opm/input/eclipse/Schedule/Network/ExtNetwork.hpp
|
||||
opm/input/eclipse/Schedule/Network/Node.hpp
|
||||
opm/input/eclipse/Schedule/VFPInjTable.hpp
|
||||
opm/input/eclipse/Schedule/VFPProdTable.hpp
|
||||
opm/input/eclipse/Schedule/Well/Connection.hpp
|
||||
opm/input/eclipse/Schedule/Well/ProductionControls.hpp
|
||||
opm/input/eclipse/Schedule/Well/InjectionControls.hpp
|
||||
opm/input/eclipse/Schedule/Well/PAvg.hpp
|
||||
opm/input/eclipse/Schedule/Well/PAvgCalculator.hpp
|
||||
opm/input/eclipse/Schedule/Well/PAvgCalculatorCollection.hpp
|
||||
opm/input/eclipse/Schedule/Well/Well.hpp
|
||||
opm/input/eclipse/Schedule/Well/WList.hpp
|
||||
opm/input/eclipse/Schedule/Well/NameOrder.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellMatcher.hpp
|
||||
opm/input/eclipse/Schedule/Well/WListManager.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellEconProductionLimits.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellFoamProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellBrineProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellInjectionProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellMICPProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellPolymerProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellProductionProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellTracerProperties.hpp
|
||||
opm/input/eclipse/Schedule/Well/WVFPEXP.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellTestConfig.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellTestState.hpp
|
||||
opm/input/eclipse/Schedule/Well/WellConnections.hpp
|
||||
opm/input/eclipse/Schedule/SummaryState.hpp
|
||||
opm/input/eclipse/Schedule/RFTConfig.hpp
|
||||
opm/input/eclipse/Schedule/RPTConfig.hpp
|
||||
opm/input/eclipse/Schedule/RSTConfig.hpp
|
||||
opm/input/eclipse/Schedule/Schedule.hpp
|
||||
opm/input/eclipse/Schedule/ScheduleDeck.hpp
|
||||
opm/input/eclipse/Schedule/ScheduleGrid.hpp
|
||||
opm/input/eclipse/Schedule/ScheduleState.hpp
|
||||
opm/input/eclipse/Schedule/ScheduleTypes.hpp
|
||||
opm/input/eclipse/Schedule/Tuning.hpp
|
||||
opm/input/eclipse/Schedule/WriteRestartFileEvents.hpp
|
||||
opm/input/eclipse/Schedule/Group/GPMaint.hpp
|
||||
opm/input/eclipse/Schedule/Group/GTNode.hpp
|
||||
opm/input/eclipse/Schedule/Group/Group.hpp
|
||||
opm/input/eclipse/Schedule/Group/GuideRate.hpp
|
||||
opm/input/eclipse/Schedule/Group/GConSale.hpp
|
||||
opm/input/eclipse/Schedule/Group/GConSump.hpp
|
||||
opm/input/eclipse/Schedule/Group/GuideRateConfig.hpp
|
||||
opm/input/eclipse/Schedule/Group/GuideRateModel.hpp
|
||||
opm/input/eclipse/Schedule/MessageLimits.hpp
|
||||
opm/input/eclipse/Schedule/CompletedCells.hpp
|
||||
opm/input/eclipse/Schedule/Events.hpp
|
||||
opm/input/eclipse/Schedule/OilVaporizationProperties.hpp
|
||||
opm/input/eclipse/Schedule/MSW/icd.hpp
|
||||
opm/input/eclipse/Schedule/MSW/Segment.hpp
|
||||
opm/input/eclipse/Schedule/MSW/Segment.hpp
|
||||
opm/input/eclipse/Schedule/MSW/WellSegments.hpp
|
||||
opm/input/eclipse/Schedule/MSW/AICD.hpp
|
||||
opm/input/eclipse/Schedule/MSW/SICD.hpp
|
||||
opm/input/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp
|
||||
opm/input/eclipse/EclipseState/SimulationConfig/BCConfig.hpp
|
||||
opm/input/eclipse/EclipseState/SimulationConfig/RockConfig.hpp
|
||||
opm/input/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp
|
||||
opm/input/eclipse/Schedule/MSW/Valve.hpp
|
||||
opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp
|
||||
opm/input/eclipse/EclipseState/checkDeck.hpp
|
||||
opm/input/eclipse/EclipseState/Runspec.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQAssign.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQASTNode.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQDefine.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQContext.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQState.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQConfig.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQEnums.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQParams.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQInput.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQActive.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQSet.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQToken.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQFunction.hpp
|
||||
opm/input/eclipse/Schedule/UDQ/UDQFunctionTable.hpp
|
||||
opm/input/eclipse/Deck/DeckItem.hpp
|
||||
opm/input/eclipse/Deck/Deck.hpp
|
||||
opm/input/eclipse/Deck/DeckView.hpp
|
||||
opm/input/eclipse/Deck/FileDeck.hpp
|
||||
opm/input/eclipse/Deck/DeckSection.hpp
|
||||
opm/input/eclipse/Deck/DeckTree.hpp
|
||||
opm/input/eclipse/Deck/DeckOutput.hpp
|
||||
opm/input/eclipse/Deck/DeckValue.hpp
|
||||
opm/input/eclipse/Deck/DeckKeyword.hpp
|
||||
opm/input/eclipse/Deck/DeckRecord.hpp
|
||||
opm/input/eclipse/Deck/ImportContainer.hpp
|
||||
opm/input/eclipse/Deck/UDAValue.hpp
|
||||
opm/input/eclipse/Deck/value_status.hpp
|
||||
opm/input/eclipse/Python/Python.hpp)
|
||||
endif()
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
list(APPEND PUBLIC_HEADER_FILES
|
||||
@@ -897,6 +931,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/io/eclipse/rst/connection.hpp
|
||||
opm/io/eclipse/rst/group.hpp
|
||||
opm/io/eclipse/rst/header.hpp
|
||||
opm/io/eclipse/rst/network.hpp
|
||||
opm/io/eclipse/rst/segment.hpp
|
||||
opm/io/eclipse/rst/state.hpp
|
||||
opm/io/eclipse/rst/udq.hpp
|
||||
@@ -905,6 +940,8 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/data/Cells.hpp
|
||||
opm/output/data/GuideRateValue.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/data/InterRegFlow.hpp
|
||||
opm/output/data/InterRegFlowMap.hpp
|
||||
opm/output/data/Solution.hpp
|
||||
opm/output/data/Wells.hpp
|
||||
opm/output/eclipse/VectorItems/action.hpp
|
||||
@@ -941,6 +978,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/eclipse/Summary.hpp
|
||||
opm/output/eclipse/Tables.hpp
|
||||
opm/output/eclipse/UDQDims.hpp
|
||||
opm/output/eclipse/WStat.hpp
|
||||
opm/output/eclipse/WindowedArray.hpp
|
||||
opm/output/eclipse/WriteInit.hpp
|
||||
opm/output/eclipse/WriteRFT.hpp
|
||||
|
||||
@@ -13,17 +13,17 @@ if (EXISTS ${BASE_DIR}/python/cxx)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${BASE_DIR}/tmp_gen/include/opm/parser/eclipse/Parser/ParserKeywords/Builtin.hpp
|
||||
${BASE_DIR}/include/opm/parser/eclipse/Parser/ParserKeywords/Builtin.hpp)
|
||||
${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp
|
||||
${BASE_DIR}/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp)
|
||||
|
||||
|
||||
file(GLOB HDRS ${BASE_DIR}/tmp_gen/include/opm/parser/eclipse/Parser/ParserKeywords/*.hpp)
|
||||
file(GLOB HDRS ${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords/*.hpp)
|
||||
|
||||
foreach(HDR ${HDRS})
|
||||
file(RELATIVE_PATH hdr ${BASE_DIR}/tmp_gen/include/opm/parser/eclipse/Parser/ParserKeywords ${HDR})
|
||||
file(RELATIVE_PATH hdr ${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords ${HDR})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${HDR}
|
||||
${BASE_DIR}/include/opm/parser/eclipse/Parser/ParserKeywords/${hdr})
|
||||
${BASE_DIR}/include/opm/input/eclipse/Parser/ParserKeywords/${hdr})
|
||||
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -74,6 +74,15 @@ add_test( NAME rst_deck_test
|
||||
${PROJECT_SOURCE_DIR}/tests/SPE1CASE2_INCLUDE.DATA)
|
||||
|
||||
|
||||
add_test( NAME rst_deck_test2
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/tests/rst_test_driver2.sh
|
||||
${PROJECT_BINARY_DIR}/bin/rst_deck
|
||||
${PROJECT_BINARY_DIR}/bin/opmi
|
||||
${PROJECT_SOURCE_DIR}/tests/ACTIONX_M1.DATA
|
||||
${PROJECT_SOURCE_DIR}/tests/ACTIONX_M1_MULTIPLE.DATA
|
||||
${PROJECT_SOURCE_DIR}/tests/ACTIONX_M1.UNRST
|
||||
${PROJECT_SOURCE_DIR}/tests/ACTIONX_M1.X0010 )
|
||||
|
||||
# opm-tests dependent tests
|
||||
if(HAVE_OPM_TESTS)
|
||||
opm_add_test(parse_write ONLY_COMPILE
|
||||
@@ -94,7 +103,6 @@ if(HAVE_OPM_TESTS)
|
||||
${OPM_TESTS_ROOT}/spe9/SPE9_CP.DATA
|
||||
${OPM_TESTS_ROOT}/spe9/SPE9_CP_GROUP.DATA
|
||||
${OPM_TESTS_ROOT}/spe9/SPE9_CP_SHORT.DATA
|
||||
${OPM_TESTS_ROOT}/spe9/SPE9_CP_SHORT_RESTART.DATA
|
||||
${OPM_TESTS_ROOT}/spe9/SPE9.DATA
|
||||
${OPM_TESTS_ROOT}/spe10model1/SPE10_MODEL1.DATA
|
||||
${OPM_TESTS_ROOT}/spe10model2/SPE10_MODEL2.DATA
|
||||
@@ -120,7 +128,7 @@ if(HAVE_OPM_TESTS)
|
||||
PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH")
|
||||
|
||||
add_test( NAME rst_deck_test_norne
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/tests/rst_test_driver.sh ${CMAKE_BINARY_DIR}/bin/rst_deck ${CMAKE_BINARY_DIR}/bin/opmhash
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/tests/rst_test_driver.sh ${PROJECT_BINARY_DIR}/bin/rst_deck ${PROJECT_BINARY_DIR}/bin/opmhash
|
||||
${OPM_TESTS_ROOT}/norne/NORNE_ATW2013.DATA)
|
||||
|
||||
set_property(TEST rst_deck_test_norne
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
set(genkw_SOURCES src/opm/json/JsonObject.cpp
|
||||
src/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp
|
||||
src/opm/parser/eclipse/Deck/UDAValue.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckTree.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckValue.cpp
|
||||
src/opm/parser/eclipse/Deck/Deck.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckItem.cpp
|
||||
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/Generator/KeywordGenerator.cpp
|
||||
src/opm/parser/eclipse/Generator/KeywordLoader.cpp
|
||||
src/opm/parser/eclipse/Parser/ErrorGuard.cpp
|
||||
src/opm/parser/eclipse/Parser/ParseContext.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserEnums.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserItem.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserKeyword.cpp
|
||||
src/opm/parser/eclipse/Parser/ParserRecord.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/RawRecord.cpp
|
||||
src/opm/parser/eclipse/Parser/raw/StarToken.cpp
|
||||
src/opm/parser/eclipse/Units/Dimension.cpp
|
||||
src/opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/input/eclipse/Parser/createDefaultKeywordList.cpp
|
||||
src/opm/input/eclipse/Deck/UDAValue.cpp
|
||||
src/opm/input/eclipse/Deck/DeckTree.cpp
|
||||
src/opm/input/eclipse/Deck/DeckValue.cpp
|
||||
src/opm/input/eclipse/Deck/Deck.cpp
|
||||
src/opm/input/eclipse/Deck/DeckView.cpp
|
||||
src/opm/input/eclipse/Deck/DeckItem.cpp
|
||||
src/opm/input/eclipse/Deck/DeckKeyword.cpp
|
||||
src/opm/input/eclipse/Deck/DeckRecord.cpp
|
||||
src/opm/input/eclipse/Deck/DeckOutput.cpp
|
||||
src/opm/input/eclipse/Generator/KeywordGenerator.cpp
|
||||
src/opm/input/eclipse/Generator/KeywordLoader.cpp
|
||||
src/opm/input/eclipse/Parser/ErrorGuard.cpp
|
||||
src/opm/input/eclipse/Parser/ParseContext.cpp
|
||||
src/opm/input/eclipse/Parser/ParserEnums.cpp
|
||||
src/opm/input/eclipse/Parser/ParserItem.cpp
|
||||
src/opm/input/eclipse/Parser/ParserKeyword.cpp
|
||||
src/opm/input/eclipse/Parser/ParserRecord.cpp
|
||||
src/opm/input/eclipse/Parser/raw/RawKeyword.cpp
|
||||
src/opm/input/eclipse/Parser/raw/RawRecord.cpp
|
||||
src/opm/input/eclipse/Parser/raw/StarToken.cpp
|
||||
src/opm/input/eclipse/Units/Dimension.cpp
|
||||
src/opm/input/eclipse/Units/UnitSystem.cpp
|
||||
src/opm/common/utility/OpmInputError.cpp
|
||||
src/opm/common/utility/shmatch.cpp
|
||||
src/opm/common/OpmLog/OpmLog.cpp
|
||||
src/opm/common/OpmLog/Logger.cpp
|
||||
src/opm/common/OpmLog/StreamLog.cpp
|
||||
@@ -36,9 +38,9 @@ add_executable(genkw ${genkw_SOURCES})
|
||||
target_link_libraries(genkw ${opm-common_LIBRARIES})
|
||||
|
||||
# Generate keyword list
|
||||
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
|
||||
string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/src/opm/parser/eclipse/share/keywords/\\1" keyword_files "${keywords}")
|
||||
configure_file(src/opm/parser/eclipse/keyword_list.argv.in keyword_list.argv)
|
||||
include(src/opm/input/eclipse/share/keywords/keyword_list.cmake)
|
||||
string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/src/opm/input/eclipse/share/keywords/\\1" keyword_files "${keywords}")
|
||||
configure_file(src/opm/input/eclipse/keyword_list.argv.in keyword_list.argv)
|
||||
|
||||
# Generate keyword source
|
||||
|
||||
@@ -46,7 +48,7 @@ set( genkw_argv 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
|
||||
opm/input/eclipse/Parser/ParserKeywords
|
||||
${PROJECT_BINARY_DIR}/tmp_gen/TestKeywords.cpp)
|
||||
|
||||
set( _tmp_output
|
||||
@@ -122,7 +124,7 @@ endif()
|
||||
add_custom_command( OUTPUT
|
||||
${_tmp_output}
|
||||
COMMAND genkw ${genkw_argv}
|
||||
DEPENDS genkw ${keyword_files} src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
|
||||
DEPENDS genkw ${keyword_files} src/opm/input/eclipse/share/keywords/keyword_list.cmake)
|
||||
|
||||
# To avoid some rebuilds
|
||||
add_custom_command(OUTPUT
|
||||
|
||||
26
README.md
26
README.md
@@ -1,3 +1,23 @@
|
||||
# opm-common
|
||||
Contains common components used throughout all of OPM,
|
||||
in particular CMake modules for the build system.
|
||||
# opm-common: Tools for Eclipse reservoir simulation files
|
||||
|
||||
The Open Porous Media (OPM) software suite provides libraries and
|
||||
tools for modeling and simulation of porous media processes,
|
||||
especially for simulating CO2 sequestration and improved and enhanced
|
||||
oil recovery. The Eclipse file format is widely used in the reservoir
|
||||
simulation community. This package provides a library containing code
|
||||
for processing files in Eclipse format, Python binding for accessing
|
||||
Eclipse files and utility code used by other OPM modules (e.g. CMake
|
||||
modules used).
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
The library is distributed under the GNU General Public License,
|
||||
version 3 or later (GPLv3+).
|
||||
|
||||
Requirements
|
||||
-----------
|
||||
|
||||
- C++17 compatible compiler
|
||||
- CMake >= 3.10
|
||||
- Posix compatibility
|
||||
|
||||
31
cmake/Modules/FindGMP.cmake
Normal file
31
cmake/Modules/FindGMP.cmake
Normal file
@@ -0,0 +1,31 @@
|
||||
# - Find the GNU Multiprecision library.
|
||||
#
|
||||
# Will define the following imported target for usage:
|
||||
# - GMP::gmp Target for linking/compiling with C library
|
||||
# - GMP::gmpxx Target for linking/compiling with C++ library
|
||||
find_path(GMP_INCLUDE_DIR gmp.h)
|
||||
find_library(GMP_LIBRARY gmp)
|
||||
find_path(GMPXX_INCLUDE_DIR gmpxx.h)
|
||||
find_library(GMPXX_LIBRARY gmpxx)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GMP
|
||||
DEFAULT_MSG
|
||||
GMPXX_LIBRARY GMPXX_INCLUDE_DIR GMP_INCLUDE_DIR GMP_LIBRARY)
|
||||
|
||||
if(GMP_FOUND)
|
||||
if(NOT TARGET GMP::gmp)
|
||||
add_library(GMP::gmp UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(GMP::gmp PROPERTIES
|
||||
IMPORTED_LOCATION ${GMP_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GMP_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT TARGET GMP::gmpxx)
|
||||
add_library(GMP::gmpxx UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(GMP::gmpxx PROPERTIES
|
||||
IMPORTED_LOCATION ${GMPXX_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GMPXX_INCLUDE_DIR}
|
||||
TARGET_LINK_LIBRARIES GMP::gmp)
|
||||
endif()
|
||||
endif()
|
||||
@@ -70,6 +70,20 @@ if(PTSCOTCH_FOUND)
|
||||
set(PTSCOCH_LINK_FLAGS "${DUNE_MPI_LINK_FLAGS}"
|
||||
CACHE STRING "PT-Scotch link flags")
|
||||
set(HAVE_PTSCOTCH 1)
|
||||
if(NOT TARGET PTScotch::Scotch)
|
||||
add_library(PTScotch::Scotch UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(PTScotch::Scotch PROPERTIES
|
||||
IMPORTED_LOCATION "${SCOTCH_LIBRARY}"
|
||||
INCLUDE_DIRECTORIES "${PTSCOTCH_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${PTSCOTCHERR_LIBRARY}")
|
||||
endif()
|
||||
if(NOT TARGET PTScotch::PTScotch)
|
||||
add_library(PTScotch::PTScotch UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(PTScotch::PTScotch PROPERTIES
|
||||
IMPORTED_LOCATION "${PTSCOTCH_LIBRARY}"
|
||||
INCLUDE_DIRECTORIES "${PTSCOTCH_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "PTScotch::Scotch;${MPI_DUNE_LIBRARIES}")
|
||||
endif()
|
||||
# log result
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determing location of PT-Scotch succeded:\n"
|
||||
|
||||
@@ -102,6 +102,13 @@ if(PARMETIS_FOUND)
|
||||
"Include directory: ${PARMETIS_INCLUDE_DIRS}\n"
|
||||
"Library directory: ${PARMETIS_LIBRARIES}\n\n")
|
||||
|
||||
if(NOT TARGET ParMETIS::ParMETIS)
|
||||
add_library(ParMETIS::ParMETIS UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(ParMETIS::ParMETIS PROPERTIES
|
||||
IMPORTED_LOCATION ${PARMETIS_LIBRARY}
|
||||
INCLUDE_DIRECTORIES "${PARMETIS_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${METIS_LIBRARIES};${MPI_C_LIBRARIES}")
|
||||
endif()
|
||||
endif(PARMETIS_FOUND)
|
||||
|
||||
mark_as_advanced(PARMETIS_INCLUDE_DIRS PARMETIS_LIBRARIES HAVE_PARMETIS)
|
||||
|
||||
@@ -34,6 +34,11 @@ int main(void){
|
||||
if (QUADMATH_FOUND)
|
||||
set(QUADMATH_LIBRARIES "quadmath")
|
||||
set(HAVE_QUAD "${QUADMATH_FOUND}")
|
||||
add_library(QuadMath::QuadMath INTERFACE IMPORTED)
|
||||
set_target_properties(QuadMath::QuadMath PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES quadmath
|
||||
INTERFACE_COMPILE_DEFINITIONS _GLIBCXX_USE_FLOAT128
|
||||
INTERFACE_COMPILE_OPTIONS $<$<CXX_COMPILER_ID:GNU>:-fext-numeric-literals>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -259,9 +259,9 @@ foreach (module IN LISTS SuiteSparse_FIND_COMPONENTS)
|
||||
set (SuiteSparse_FOUND FALSE)
|
||||
# use empty string instead of zero, so it can be tested with #ifdef
|
||||
# as well as #if in the source code
|
||||
set (HAVE_SUITESPARSE_${MODULE}_H "" CACHE INT "Is ${module} header present?")
|
||||
set (HAVE_SUITESPARSE_${MODULE}_H "" CACHE STRING "Is ${module} header present?")
|
||||
else (NOT SuiteSparse_${MODULE}_FOUND)
|
||||
set (HAVE_SUITESPARSE_${MODULE}_H 1 CACHE INT "Is ${module} header present?")
|
||||
set (HAVE_SUITESPARSE_${MODULE}_H 1 CACHE STRING "Is ${module} header present?")
|
||||
list (APPEND SuiteSparse_LIBRARIES "${${MODULE}_LIBRARIES}")
|
||||
list (APPEND SuiteSparse_LINKER_FLAGS "${${MODULE}_LINKER_FLAGS}")
|
||||
list (APPEND SuiteSparse_INCLUDE_DIRS "${${MODULE}_INCLUDE_DIRS}")
|
||||
@@ -280,6 +280,32 @@ if (SuiteSparse_LIBRARIES)
|
||||
list (REVERSE SuiteSparse_LIBRARIES)
|
||||
endif (SuiteSparse_LIBRARIES)
|
||||
|
||||
if(SuiteSparse_FOUND)
|
||||
if(NOT TARGET SuiteSparse::SuiteSparse)
|
||||
add_library(SuiteSparse::SuiteSparse INTERFACE IMPORTED GLOBAL)
|
||||
set_property(TARGET SuiteSparse::SuiteSparse PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${SuiteSparse_INCLUDE_DIRS})
|
||||
if(config_LIBRARY)
|
||||
set_property(TARGET SuiteSparse::SuiteSparse PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${config_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
foreach(_module ${SuiteSparse_MODULES})
|
||||
string (TOUPPER ${_module} _MODULE)
|
||||
if(SuiteSparse_${_MODULE}_FOUND)
|
||||
if(NOT TARGET SuiteSparse::${_module})
|
||||
message(STATUS "Creating target SuitSparse::${_module}")
|
||||
add_library(SuiteSparse::${_module} UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(SuiteSparse::${_module} PROPERTIES
|
||||
IMPORTED_LOCATION ${${_MODULE}_LIBRARY}
|
||||
INCLUDE_DIRECTORIES ${${_MODULE}_INCLUDE_DIRS}
|
||||
INTERFACE_LINK_LIBRARIES "${config_LIBRARY}")
|
||||
target_link_libraries(SuiteSparse::SuiteSparse
|
||||
INTERFACE SuiteSparse::${_module})
|
||||
endif()
|
||||
endif()
|
||||
endforeach(_module)
|
||||
endif()
|
||||
# print a message to indicate status of this package
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (SuiteSparse
|
||||
|
||||
@@ -180,6 +180,16 @@ if(SUPERLU_FOUND)
|
||||
if (SUPERLU_BLAS_LIBRARY)
|
||||
list(APPEND SUPERLU_LIBRARIES ${SUPERLU_BLAS_LIBRARY})
|
||||
endif()
|
||||
if(NOT TARGET SuperLU::SuperLU)
|
||||
add_library(SuperLU::SuperLU UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(SuperLU::SuperLU PROPERTIES
|
||||
IMPORTED_LOCATION ${SUPERLU_LIBRARY}
|
||||
INCLUDE_DIRECTORIES ${SUPERLU_INCLUDE_DIRS})
|
||||
if(SUPERLU_BLAS_LIBRARY)
|
||||
set_property(TARGET SuperLU::SuperLU PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${SUPERLU_BLAS_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
cmake_pop_check_state()
|
||||
|
||||
34
cmake/Modules/FindTBB.cmake
Normal file
34
cmake/Modules/FindTBB.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
# Poor man's FindTBB that will create the CMake targets
|
||||
# used by DUNE.
|
||||
# If the TBB version is new enough it will ship its own
|
||||
# TBBConfig.cmake and we are good
|
||||
find_package(TBB QUIET CONFIG)
|
||||
|
||||
if(NOT TBB_FOUND)
|
||||
# Fall back to using pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgConfigTBB IMPORTED_TARGET GLOBAL tbb QUIET)
|
||||
if(NOT TARGET PkgConfig::PkgConfigTBB)
|
||||
# workaround bug in old FindPkgConfig.cmake which adds
|
||||
# pkgcfg_lib_PkgConfigTBB_atomic-NOTFOUND because it cannot
|
||||
# find the atomic lib of the compiler (not in platforms default
|
||||
# library path. It will therefore not create the target and we
|
||||
# try that manually.
|
||||
string(REPLACE ";pkgcfg_lib_PkgConfigTBB_atomic-NOTFOUND" "" _find_tbb_libs "${PkgConfigTBB_LINK_LIBRARIES}")
|
||||
if(_find_tbb_libs)
|
||||
add_library(PkgConfig::PkgConfigTBB INTERFACE IMPORTED GLOBAL)
|
||||
set_property(TARGET PkgConfig::PkgConfigTBB PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES "${_find_tbb_libs}")
|
||||
endif()
|
||||
endif()
|
||||
if(TARGET PkgConfig::PkgConfigTBB)
|
||||
if(NOT TARGET TBB::tbb)
|
||||
message(STATUS "Found TBB library using pkg config")
|
||||
add_library(TBB::tbb ALIAS PkgConfig::PkgConfigTBB)
|
||||
endif()
|
||||
endif()
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
else()
|
||||
message(STATUS "Found TBB library using config mode")
|
||||
endif(NOT TBB_FOUND)
|
||||
@@ -36,8 +36,8 @@ find_library (CJSON_LIBRARY
|
||||
${_no_default_path} )
|
||||
|
||||
# setup list of all required libraries to link with cjson
|
||||
set (CJSON_INCLUDE_DIRS ${CJSON_INCLUDE_DIR})
|
||||
set (CJSON_LIBRARIES ${CJSON_LIBRARY})
|
||||
set (cjson_INCLUDE_DIRS ${CJSON_INCLUDE_DIR})
|
||||
set (cjson_LIBRARIES ${CJSON_LIBRARY})
|
||||
|
||||
# math library (should exist on all unices; automatically linked on Windows)
|
||||
if (UNIX)
|
||||
@@ -72,10 +72,7 @@ endif ()
|
||||
|
||||
# if the test program didn't compile, but was required to do so, bail
|
||||
# out now and display an error; otherwise limp on
|
||||
set (CJSON_FIND_REQUIRED ${cjson_FIND_REQUIRED})
|
||||
set (CJSON_FIND_QUIETLY ${cjson_FIND_QUIETLY})
|
||||
find_package_handle_standard_args (CJSON
|
||||
find_package_handle_standard_args (cjson
|
||||
DEFAULT_MSG
|
||||
CJSON_INCLUDE_DIRS CJSON_LIBRARIES HAVE_CJSON
|
||||
cjson_INCLUDE_DIRS cjson_LIBRARIES HAVE_CJSON
|
||||
)
|
||||
set (cjson_FOUND ${CJSON_FOUND})
|
||||
|
||||
@@ -19,7 +19,9 @@ find_opm_package (
|
||||
"BLAS REQUIRED;
|
||||
LAPACK REQUIRED;
|
||||
CxaDemangle;
|
||||
MPI
|
||||
MPI;
|
||||
TBB;
|
||||
GMP
|
||||
"
|
||||
# header to search for
|
||||
"dune/common/fvector.hh"
|
||||
|
||||
@@ -24,7 +24,8 @@ find_opm_package (
|
||||
dune-alugrid;
|
||||
ZLIB;
|
||||
ZOLTAN;
|
||||
METIS
|
||||
METIS;
|
||||
Quadmath
|
||||
"
|
||||
# header to search for
|
||||
"dune/fem/space/shapefunctionset/legendre.hh"
|
||||
|
||||
@@ -338,7 +338,7 @@ macro(opm_add_test TestName)
|
||||
# has been specified to supervise the test binary, use it else
|
||||
# run the test binary "naked".
|
||||
if (CURTEST_DRIVER)
|
||||
set(CURTEST_COMMAND ${CURTEST_DRIVER} ${CURTEST_DRIVER_ARGS} ${CURTEST_EXE_NAME} ${CURTEST_TEST_ARGS})
|
||||
set(CURTEST_COMMAND ${CURTEST_DRIVER} ${CURTEST_DRIVER_ARGS} -e ${CURTEST_EXE_NAME} -- ${CURTEST_TEST_ARGS})
|
||||
else()
|
||||
set(CURTEST_COMMAND ${PROJECT_BINARY_DIR}/bin/${CURTEST_EXE_NAME})
|
||||
if (CURTEST_TEST_ARGS)
|
||||
|
||||
@@ -17,6 +17,9 @@ message("-- Writing version information to local header project-version.h")
|
||||
string (TIMESTAMP build_timestamp "%Y-%m-%d at %H:%M:%S hrs")
|
||||
|
||||
string (TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_upper_)
|
||||
set(OPM_BINARY_PACKAGE_VERSION "" CACHE STRING
|
||||
"Version of the binary Linux package built (will be printed in PRT file of flow if not empty)")
|
||||
string(LENGTH "${OPM_BINARY_PACKAGE_VERSION}" _BINARY_PACKAGE_VERSION_LENGTH)
|
||||
if (cmake_build_type_upper_ MATCHES DEBUG)
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
||||
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
@@ -43,22 +46,30 @@ else ()
|
||||
# system, so there is "no" way we can update the SHA. notice
|
||||
# that this is a slightly different version of the label than
|
||||
# above.
|
||||
if (NOT GIT_FOUND)
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
||||
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"unknown git version\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (unknown git version)\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
# Write header file with build timestamp
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#ifndef OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
if (NOT GIT_FOUND OR NOT EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||
if(_BINARY_PACKAGE_VERSION_LENGTH GREATER 0)
|
||||
set(_PROJECT_VERSION_HASH "${OPM_BINARY_PACKAGE_VERSION}")
|
||||
else()
|
||||
set(_PROJECT_VERSION_HASH "unknown git version")
|
||||
endif()
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.h"
|
||||
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"${_PROJECT_VERSION_HASH}\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (${_PROJECT_VERSION_HASH})\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
# Write header file with build timestamp
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#ifndef OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n"
|
||||
"#define OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n")
|
||||
if (_BINARY_PACKAGE_VERSION_LENGTH EQUAL 0)
|
||||
file(APPEND "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n")
|
||||
endif()
|
||||
file(APPEND "${PROJECT_BINARY_DIR}/project-timestamp.h"
|
||||
"#endif // OPM_GENERATED_OPM_TIMESTAMP_HEADER_INCLUDED\n")
|
||||
else ()
|
||||
add_custom_target (update-version ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
||||
@@ -9,5 +9,6 @@ Name: @name@
|
||||
Description: @description@ @major@.@minor@
|
||||
Version: @major@.@minor@
|
||||
URL: http://opm-project.org
|
||||
Libs: @target@ @libs@
|
||||
Libs.private: @libs@
|
||||
Libs: @target@
|
||||
Cflags: @includes@ @defs@
|
||||
|
||||
5
debian/changelog
vendored
5
debian/changelog
vendored
@@ -1,5 +0,0 @@
|
||||
opm-common (2019.04-pre~xenial) xenial; urgency=medium
|
||||
|
||||
* New release
|
||||
|
||||
-- Arne Morten Kvarving <arne.morten.kvarving@sintef.no> Mon, 19 Oct 2015 10:49:00 +0200
|
||||
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
9
|
||||
64
debian/control
vendored
64
debian/control
vendored
@@ -1,64 +0,0 @@
|
||||
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, graphviz,
|
||||
texlive-latex-extra, texlive-latex-recommended,
|
||||
ghostscript, libboost-system-dev, libboost-test-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
|
||||
Vcs-Git: git://github.com/OPM/opm-common.git
|
||||
Vcs-Browser: https://github.com/OPM/opm-common
|
||||
|
||||
Package: libopm-common1
|
||||
Section: libs
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
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
|
||||
Multi-Arch: foreign
|
||||
Provides: libopm-common-dev
|
||||
Suggests: libopm-common1-doc
|
||||
Depends: libopm-common1 (= ${binary:Version})
|
||||
Description: OPM common library -- development files
|
||||
The OPM common library contains the shared buildsystem
|
||||
and helpers shared across all OPM modules.
|
||||
|
||||
Package: libopm-common1-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
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}
|
||||
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
|
||||
13
debian/copyright
vendored
13
debian/copyright
vendored
@@ -1,13 +0,0 @@
|
||||
License: GPL-3+
|
||||
This package 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.
|
||||
|
||||
This package 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 this program. If not, see <http://www.gnu.org/licenses/>
|
||||
2
debian/docs
vendored
2
debian/docs
vendored
@@ -1,2 +0,0 @@
|
||||
LICENSE
|
||||
README.md
|
||||
1
debian/libopm-common1-bin.install
vendored
1
debian/libopm-common1-bin.install
vendored
@@ -1 +0,0 @@
|
||||
usr/bin/*
|
||||
6
debian/libopm-common1-dev.install
vendored
6
debian/libopm-common1-dev.install
vendored
@@ -1,6 +0,0 @@
|
||||
usr/include/*
|
||||
usr/lib/dunecontrol/*
|
||||
usr/lib/*/pkgconfig/*
|
||||
usr/share/cmake/*
|
||||
usr/share/opm/*
|
||||
usr/lib/*/lib*.so
|
||||
1
debian/libopm-common1-doc.install
vendored
1
debian/libopm-common1-doc.install
vendored
@@ -1 +0,0 @@
|
||||
usr/share/doc/*
|
||||
1
debian/libopm-common1.install
vendored
1
debian/libopm-common1.install
vendored
@@ -1 +0,0 @@
|
||||
usr/lib/*/lib*.so.*
|
||||
1
debian/python3-opm-common.install
vendored
1
debian/python3-opm-common.install
vendored
@@ -1 +0,0 @@
|
||||
usr/lib/python*/*
|
||||
29
debian/rules
vendored
29
debian/rules
vendored
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
override_dh_auto_clean:
|
||||
dh_auto_clean --buildsystem=cmake
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build --buildsystem=cmake
|
||||
|
||||
# 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 -DOPM_ENABLE_PYTHON=1 -DOPM_INSTALL_PYTHON=1 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DOPM_ENABLE_EMBEDDED_PYTHON=1
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- install-html
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs --link-doc=libopm-common1
|
||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
||||
1.0
|
||||
@@ -297,7 +297,7 @@ composite units based on the dimension of the composite quantity. As a
|
||||
consequence the list of dimensions supported by the parser is long,
|
||||
and growing. The current list can be found in the source file:
|
||||
|
||||
opm/parser/eclipse/Units/UnitSystem.cpp
|
||||
opm/input/eclipse/Units/UnitSystem.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
27
docs/tm/tm.tex
Normal file
27
docs/tm/tm.tex
Normal file
@@ -0,0 +1,27 @@
|
||||
\documentclass[a4paper,11pt]{book}
|
||||
\usepackage{verbatim}
|
||||
|
||||
|
||||
\newcommand{\kw}[1]{\texttt{#1}}
|
||||
\newcommand{\inlinecode}[1]{\texttt{#1}}
|
||||
\newcommand{\flow}[0]{\texttt{flow}}
|
||||
\newcommand{\eclipse}[0]{\texttt{Eclipse}}
|
||||
\newcommand{\path}[1]{\texttt{#1}}
|
||||
\newenvironment{deck}[0]{\verbatim}{\endverbatim}
|
||||
\newenvironment{code}[0]{\verbatim}{\endverbatim}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{titlepage}
|
||||
\begin{center}
|
||||
\Huge
|
||||
\textbf{Technical manual}
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
\tableofcontents
|
||||
|
||||
\input{udq_actionx/udq}
|
||||
\input{udq_actionx/actionx}
|
||||
\input{udq_actionx/pyaction}
|
||||
|
||||
\end{document}
|
||||
437
docs/tm/udq_actionx/actionx.tex
Normal file
437
docs/tm/udq_actionx/actionx.tex
Normal file
@@ -0,0 +1,437 @@
|
||||
\newcommand{\actionx}{\kw{ACTIONX}}
|
||||
\chapter{Programming in the deck: \actionx}
|
||||
\label{actionx}
|
||||
The \actionx{} keyword is the most direct way to \emph{program} in the deck. The
|
||||
\actionx{} functionality consist of the \actionx{} keyword itself, with some
|
||||
metadata and a condition and then a list of keywords which are injected into the
|
||||
in-memory representation of the \kw{SCHEDULE} section at the point in time where
|
||||
the condition evaluates to true. The \actionx{} statement is evaluated at the
|
||||
end of every timestep, and if it evaluates to true the new keywords should take
|
||||
effect immediately. The \actionx{} conditions are less sophisticated than the
|
||||
expressions used in \udq{}, this implies that a common pattern is to make
|
||||
involved calculations as \udq{} expressions, and then use a simple test as
|
||||
\actionx{} condition.
|
||||
|
||||
The \actionx{} keyword is also documented in section 12.3.6 in the \flow{}
|
||||
reference manual.
|
||||
|
||||
\section{Structure of the \actionx{} keyword}
|
||||
\label{actionx_structure}
|
||||
The \actionx{} keyword itself consist of multiple records. The first record is
|
||||
metadata with name of the action, the number of times the action can be
|
||||
triggered and the minimum time elapsed before an action is eligible for a second
|
||||
run. The subsequent records are \emph{conditions}, all the conditions are of the
|
||||
same form
|
||||
\begin{code}
|
||||
lhs comparison rhs
|
||||
\end{code}
|
||||
and subsequent conditions are combined with \inlinecode{AND} or \inlinecode{OR}.
|
||||
The \inlinecode{lhs} is a field, well or group quantity, in addition you can use
|
||||
time variables \kw{DAY}, \kw{MNTH} and \kw{YEAR} as left hand
|
||||
side\footnote{\eclipse{} supports a wider list of summary variables like region,
|
||||
block and aquifer quantities on both left and right hand side.}. As with the
|
||||
\udq{} variables the well and group variables are \emph{sets}, and the
|
||||
evaluation status is maintained individually for each well and group.
|
||||
|
||||
The comparison is one of the ordinary mathematical comparison operators
|
||||
\inlinecode{>,<,=,!=, <=} and \inlinecode{>=}. Numerical comparisons are done
|
||||
with the corresponding plain C++ operators, this is in contrast to the \udq{}
|
||||
implementation where an epsilon defined in \kw{UDQPARAMS} is used in floating
|
||||
point comparisons.
|
||||
|
||||
The \inlinecode{rhs} is a numerical scalar, or a field, well or group quantity.
|
||||
If your \inlinecode{rhs} is a well or group quantity the \inlinecode{lhs} and
|
||||
\inlinecode{rhs} must be of the same type. If you use the symbol \kw{MNTH} as
|
||||
\inlinecode{lhs} you can compare with named months, i.e. the following will
|
||||
trigger on leap days
|
||||
\begin{deck}
|
||||
ACTIONX
|
||||
LEAP 1000 /
|
||||
MNTH=FEB AND /
|
||||
DAY=29 /
|
||||
/
|
||||
...
|
||||
...
|
||||
ENDACTIO
|
||||
\end{deck}
|
||||
When there is a well/group quantity as \inlinecode{lhs} the evaluation status is
|
||||
maintained individually for each well/group. The complete condition evaluates to
|
||||
true if \emph{any} of the wells/groups satisfy the condition. In the case of
|
||||
wells the wells matching the condition can subsequently be accessed with
|
||||
wellname '?' in the \kw{ACTIONX} keywords, this is a quite common pattern to
|
||||
e.g. close the well with highest watercut.
|
||||
|
||||
If there are more conditions they must be joined with a trailing \kw{AND} or
|
||||
\kw{OR}, furthermore conditions can be grouped with paranthesis. The \actionx{}
|
||||
expressions can only contain the four arithmetic operators $+,-,*,/$ and not
|
||||
mathematical functions like $\log()$, for more advanced expressions the natural
|
||||
approach is to first define a \udq{} and then use the \udq{} symbol in the
|
||||
\actionx{}, this is illustrated in section \ref{uda}. When multiple conditions
|
||||
involving the same well set are evaluated, the list of matching wells available
|
||||
in '?' will contain all the wells from the final condition, i.e. for
|
||||
\begin{code}
|
||||
WWCT = {"OP1": 0.25, "OP2": 0.50, "OP3": 0.75}
|
||||
\end{code}
|
||||
and the action
|
||||
\begin{deck}
|
||||
ACTIONX
|
||||
WWCT /
|
||||
WWCT > 0.33 AND /
|
||||
WWCT < 0.66 /
|
||||
/
|
||||
...
|
||||
ENDACTIO
|
||||
\end{deck}
|
||||
the set of wells available for further use in '?' are \emph{all} the wells
|
||||
matching the condition \inlinecode{WWCT < 0.66} i.e. OP1 and OP2 and \emph{not}
|
||||
the wells matching the combined expression \inlinecode{0.33 < WWCT < 0.66}. In
|
||||
order to select wells in a range as attempted here you will have to create an
|
||||
indicator variable with \udq{} first and then select based on that indicator -
|
||||
e.g. something like
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE WUCTR (WWCT < 0.66) * (WWCT > 0.33) /
|
||||
/
|
||||
|
||||
ACTIONX
|
||||
WUCTR /
|
||||
WUCTR = 1 /
|
||||
/
|
||||
|
||||
...
|
||||
|
||||
ENDACTIO
|
||||
\end{deck}
|
||||
|
||||
The \actionx{} implementation is located in
|
||||
\path{opm/input/eclipse/Schedule/Action} and all the classes are in namespace
|
||||
\inlinecode{Action::}. As with the \udq{} the input parser needs some special
|
||||
case to handle '/' and '*' as division operator and multiplier respectively, but
|
||||
that is the only code shared between the \udq{} and the \actionx{}
|
||||
implementation\footnote{It might be possible to share more code between the two,
|
||||
in particular both have an internal recursive descent parser, but both \udq{}
|
||||
and \actionx{} have so much ``personality'' that at least initially separate
|
||||
implementations was the simplest.}.
|
||||
|
||||
The condition part of the \actionx{} keyword is internalized while the
|
||||
\kw{SCHEDULE} section is parsed, the final product is maintained in a class
|
||||
\inlinecode{Action::ActionX} which has a \inlinecode{eval()} method waiting to
|
||||
be called. The keywords in the \actionx{} block are stored in the
|
||||
\inlinecode{Action::ActionX} keyword for future use. All of the \actionx{}
|
||||
keywords are stored in a container \inlinecode{Action::Actions} which will
|
||||
eventually manage the book keeping of which actions are eligible for evaluation.
|
||||
|
||||
\section{The structure of the \inlinecode{Schedule} implementation}
|
||||
\label{schedule_design}
|
||||
\flow{} internalizes all keywords from the input deck and passes fully baked
|
||||
datastructures to the simulator, whereas our impression is that \eclipse{} works
|
||||
more like a reservoir model interepreter, executing one keywords at a time.
|
||||
Mostly the \flow{} approach has worked out well, however for the \actionx{}
|
||||
functionality the difference in execution model is quite acute, and the nature
|
||||
of the \actionx{} keyword has had quite strong influence on the final Schedule
|
||||
implementation. Although not required for use of \actionx{} it is valuable to
|
||||
understand how the \actionx{} functionality has influenced the design of the
|
||||
Schedule class, that way you will hopefully better understand problems or bugs
|
||||
which might arise in the future.
|
||||
|
||||
At the very first pass the \kw{SCHEDULE} section is split in \emph{blocks}, with
|
||||
one block for each report step. The blocks are implemented with the class
|
||||
\inlinecode{ScheduleBlock}. Each block has a starting time and a list of
|
||||
keywords, the keywords are maintained in the input format
|
||||
\inlinecode{DeckKeyword}. Then the entire \kw{SCHEDULE} section is internalized
|
||||
in the class \inlinecode{ScheduleDeck} which essentially contains a list of
|
||||
\inlinecode{ScheduleBlock} instances. Consider the \kw{SCHEDULE} section
|
||||
\begin{deck}
|
||||
START
|
||||
1 'JAN' 2020 /
|
||||
|
||||
...
|
||||
...
|
||||
|
||||
SCHEDULE
|
||||
|
||||
WELSPECS
|
||||
'PROD' 'G1' 10 10 8400 'OIL' /
|
||||
'INJ' 'G1' 1 1 8335 'GAS' /
|
||||
/
|
||||
|
||||
COMPDAT
|
||||
'PROD' 10 10 3 3 'OPEN' 1* 1* 0.5 /
|
||||
'INJ' 1 1 1 1 'OPEN' 1* 1* 0.5 /
|
||||
/
|
||||
|
||||
-- End of block 0
|
||||
|
||||
DATES
|
||||
1 'FEB' 2020 /
|
||||
/
|
||||
|
||||
WCONPROD
|
||||
'PROD' 'OPEN' 'ORAT' 20000 4* 1000 /
|
||||
/
|
||||
|
||||
WCONINJE
|
||||
'INJ' 'GAS' 'OPEN' 'RATE' 100000 1* 9014 /
|
||||
/
|
||||
|
||||
-- End of block 1
|
||||
|
||||
DATES
|
||||
1 'MAR' 2020 /
|
||||
/
|
||||
|
||||
-- End of block 2
|
||||
END
|
||||
|
||||
\end{deck}
|
||||
|
||||
When this is internalized we get a \inlinecode{ScheduleDeck} instance with three
|
||||
\inlinecode{ScheduleBlock} values:
|
||||
|
||||
\begin{code}
|
||||
ScheduleDeck sched_deck = [
|
||||
ScheduleBlock {
|
||||
start = "2020-01-01",
|
||||
keywords = ["WELSPECS","COMPDAT"]
|
||||
},
|
||||
ScheduleBlock {
|
||||
start = "2020-02-01",
|
||||
keywords = ["WCONPROD","WCONINJE"]
|
||||
},
|
||||
ScheduleBlock {
|
||||
start = "2020-03-01",
|
||||
keywords = []
|
||||
}
|
||||
]
|
||||
\end{code}
|
||||
|
||||
The \inlinecode{Schedule} class has a \inlinecode{ScheduleDeck} member. The
|
||||
processed content of the \inlinecode{Schedule} class is managed in vector of
|
||||
\inlinecode{ScheduleState} instances, where one \inlinecode{ScheduleState}
|
||||
represents the complete dynamic input state at a particular report step. The
|
||||
processed \kw{SCHEDULE} code is created with the method
|
||||
\begin{code}
|
||||
Schedule::iterateScheduleSection().
|
||||
\end{code}
|
||||
|
||||
When \inlinecode{Schedule::iterateScheduleSection(report\_step)} is called it
|
||||
starts by clearing the vector of \inlinecode{ScheduleState} instances from
|
||||
\inlinecode{report\_step} to the end of the simulation, and then recreates those
|
||||
by treating the \inlinecode{ScheduleBlock}. The advantage of this approach is
|
||||
that the \inlinecode{Schedule::iterateScheduleSection(report\_step)} method is
|
||||
idempotent - it can be called repeatedly, from an arbitrary point in the
|
||||
timeseries.
|
||||
|
||||
The implementation of the \actionx{} functionality is just to append the
|
||||
\actionx{} keywords in the \inlinecode{ScheduleBlock} instance corresponding to
|
||||
the current report step and then rerun the
|
||||
\inlinecode{Schedule::iterateScheduleSection()} from this report step.
|
||||
|
||||
|
||||
|
||||
\section{Forward references of wells and groups}
|
||||
When a well or group is defined as an \actionx{} keyword and then
|
||||
unconditionally referenced in the deck we get a challenge at the first pass
|
||||
through the \kw{SCHEDULE} section. In the example below a new well \kw{W1} is
|
||||
defined with the \kw{WELSPECS} keyword when the action \inlinecode{NEW\_WELL}
|
||||
evaluates to true. At 1.st of January 2025 the well \kw{W1} is opened with the
|
||||
\kw{WCONPROD} keyword. The engineer making this model assumes that the
|
||||
\inlinecode{NEW\_WELL} action will evaluate to true sometime before 1.st of
|
||||
January 2025, and thereby ensure that the well is fully defined when it is
|
||||
eventually opened with \kw{WCONPROD}:
|
||||
\begin{deck}
|
||||
ACTIONX
|
||||
'NEW_WELL/
|
||||
WWCT OPX > 0.75 /
|
||||
/
|
||||
|
||||
WELSPECS
|
||||
'W1' 'OP' 1 1 3.33 'OIL' 7*/
|
||||
/
|
||||
|
||||
ENDACTIO
|
||||
|
||||
TSTEP
|
||||
10*30 /
|
||||
|
||||
DATES
|
||||
1 'JAN' 2025 /
|
||||
/
|
||||
|
||||
WCONPROD
|
||||
'W1' 'OPEN' 'ORAT' 0.000 0.000 0.000 5* /
|
||||
/
|
||||
|
||||
TSTEP
|
||||
10*30 /
|
||||
|
||||
\end{deck}
|
||||
|
||||
For \flow{} this creates problems because the entire \kw{SCHEDULE} section is
|
||||
parsed when the simulator starts, and at first pass the well \kw{W1} is unknown
|
||||
in the \kw{WCONPROD} keyword. This is ``solved'' in the following way:
|
||||
\begin{enumerate}
|
||||
\item At first pass we inspect the keywords inside the \actionx{} block and if
|
||||
we discover \kw{WELSPECS} we store the name of the well which will be defined
|
||||
at a later stage through \actionx{}.
|
||||
\item When we parse further on as part of the first pass and said well is
|
||||
referenced e.g. in a \kw{WCONPROD} keyword, we verify that the well will
|
||||
eventually appear via \actionx{} - we issue a warning and ignore the well in
|
||||
the \kw{WCONPROD} keyword\footnote{If the well is not registered as ``will
|
||||
appear through \actionx{}'' there will be a runtime error with unknown well
|
||||
name when parsing \kw{WCONPROD}.}.
|
||||
\item When the \actionx{} evaluates to true the well will be properly defined,
|
||||
and when reiterating over the Schedule keywords the \kw{WCONPROD} keyword will
|
||||
now be properly internalized. If the \actionx{} never evaluates to true the
|
||||
\kw{WCONPROD} keyword will never be applied, and the warning from point 2 will
|
||||
be the only trace of this well.
|
||||
\end{enumerate}
|
||||
It should be mentioned that the functionality with forward referencing of well
|
||||
names is quite new\footnote{In January 2022}, there might be well keywords in
|
||||
the \kw{SCHEDULE} section where the implementation is not yet prepared for this.
|
||||
Furthermore the forward referencing is not at all implemented for groups. The
|
||||
relevant data structure is the member \inlinecode{Action::WGNames
|
||||
action\_wgnames} in the \inlinecode{Schedule} class.
|
||||
|
||||
|
||||
\section{To enable a new keyword for \actionx}
|
||||
The keywords must be explicitly enabled to be available in an \actionx{} block,
|
||||
and enabling a new keyword requires recompiling \flow{}. The keywords available
|
||||
as \actionx{} keywords are listed in the static method
|
||||
\inlinecode{ActionX::valid\_keyword()} in
|
||||
\path{opm/input/eclipse/Schedule/Action/ActionX.cpp}. In principle it should
|
||||
just be to add the keyword to the \inlinecode{ActionX::valid\_keyword()} method
|
||||
and rebuild \flow{}, but experience has unfortunately shown that problems of
|
||||
various kinds have had a tendency to pop up when new keywords are tried out as
|
||||
\actionx{} keywords. Most commonly the problems have been in the interaction
|
||||
between the \inlinecode{Schedule} class in opm-common and the simulator - things
|
||||
have a tendency to go out of sync.
|
||||
|
||||
|
||||
\section{Running \actionx{} during simulation}
|
||||
The first part of the \actionx{} treatment is parsing the keyword and conditions
|
||||
and assemble a syntax tree which can be used to evaluate the conditions. This
|
||||
parsing takes place when the \kw{SCHEDULE} section is parsed for the first time.
|
||||
This takes place fully within the realms of the opm-common codebase, and is
|
||||
quite mature.
|
||||
|
||||
When the simulation actually runs the \actionx{} behavior consists of three
|
||||
distinct parts, taking place in the simulator, in opm-common and again in the
|
||||
simulator. The simulator will manage an instance of \inlinecode{Action::State}
|
||||
which will hold on to the time of last run and the latest results for the
|
||||
various actions.
|
||||
|
||||
\subsection{Prepare and evaluate}
|
||||
As with \udq{} the \inlinecode{SummaryState} instance is the most important
|
||||
variable to provide context to the \actionx{} evaluation, i.e. the
|
||||
\inlinecode{SummaryState} variable must be evaluated before \actionx{}. In
|
||||
addition the \udq{} variables must be evaluated and available in the
|
||||
\inlinecode{SummaryState} instance before we invoke the \actionx{}
|
||||
functionality.
|
||||
|
||||
The evaluation of actions is called from the method \inlinecode{applyActions()}
|
||||
in \path{eclproblem.hh}. The method will evaluate which actions are eligible for
|
||||
running by inspecting the \inlinecode{Action::Actions} variable and call the
|
||||
\inlinecode{ActionX::eval()} method.
|
||||
|
||||
\subsection{Recreate \inlinecode{Schedule}}
|
||||
When an \actionx{} has evaluated to \inlinecode{true} the simulator will call
|
||||
into the opm-common method \inlinecode{Schedule::applyAction(report\_step)}.
|
||||
That function will add the keywords from the \actionx{} keyword to the
|
||||
\inlinecode{ScheduleBlock} for the correct report step, and then reiterate
|
||||
through the \kw{SCHEDULE} section to the end of the simulation.
|
||||
|
||||
This reiterate process will recreate all internal members in the
|
||||
\inlinecode{Schedule} class, i.e. if the simulator was holding on to a reference
|
||||
to an internal \inlinecode{Schedule} datastructure that will be invalidated.
|
||||
|
||||
While recreating the \inlinecode{Schedule} instance there is some book keeping
|
||||
as to which datastructures need to be recalculated in the simulator as a
|
||||
consequence of the \actionx{}. That information is maintained in the data
|
||||
structure \inlinecode{Action::SimulatorUpdate} which is returned back to the
|
||||
simulator.
|
||||
|
||||
|
||||
\subsection{Updating simulator data structures}
|
||||
The \actionx{} implementation is in the module opm-common, whereas when the
|
||||
simulation is proceeding it is the simulator code which is clearly in control.
|
||||
If an action has evaluated to true and new keywords are injected in the Schedule
|
||||
object the complete simulator state is updated. This is complex, and many of the
|
||||
bugs in \actionx{} functionality have been in the interaction between the
|
||||
simulator and opm-common, in particular when an action has evaluated to true.
|
||||
|
||||
An assumption permeating the simulator code is that changes to the well and
|
||||
group configuration only take place at report steps, and in between those the
|
||||
simulator ``owns'' the well and group data. Unfortunately this is no longer the
|
||||
case when \actionx{} is active, and depending on the keywords in the \actionx{}
|
||||
block we need to update the simulator data structures after \actionx{} has been
|
||||
evaluated to true. Some details of what is currently updated is decsribed below.
|
||||
This update mechanism will probably need to be continously updated in the
|
||||
future.
|
||||
|
||||
The simulator code makes \emph{copies} of many of the objects like wells and
|
||||
connections from the \inlinecode{Schedule} class, and also assembles many
|
||||
simulator specific data structures which to a large extent consist of extracts
|
||||
of information from the internals of the \inlinecode{Schedule} object. Some of
|
||||
the interaction between the simulator and the input layer could probably be
|
||||
simplified if the simulator would call the \inlinecode{Schedule} object when
|
||||
e.g. a well or connection is needed, instead of storing references or copies to
|
||||
the \inlinecode{Schedule} objects internally.
|
||||
|
||||
There are currently three categories of changes that can take place due to
|
||||
\actionx{}:
|
||||
|
||||
|
||||
\subsubsection{General changes in well status}
|
||||
\label{actionx_change_well}
|
||||
When there is well related keyword in the \actionx{} block - e.g. \kw{WELOPEN}
|
||||
to open or close a well or \kw{WCONPROD} to adjust rates, the simulator is
|
||||
required update it's internal data structures with the updated input information.
|
||||
This will be communicated by flagging all the wells which need an update in the
|
||||
\inlinecode{Action::SimulatorUpdate} instance which is passed from the
|
||||
simulator.
|
||||
|
||||
|
||||
\subsubsection{Changes in geo properties}
|
||||
The grid keywords are in general not permitted in the \kw{SCHEDULE} section,
|
||||
however there are a few geo multipliers like \kw{MULTZ} and \kw{MULTFLT} which
|
||||
are allowed in the \kw{SCHEDULE} section, and thereby also in \actionx{}. If one
|
||||
of these keywords are encountered in the \actionx{} block we set the flag
|
||||
\inlinecode{Action::SimulatorUpdate::tran\_update = true} to encourage the
|
||||
simulator to recalculate the transmissibilities.
|
||||
|
||||
|
||||
\subsubsection{WELPI}
|
||||
\label{actionx_welpi}
|
||||
The \kw{WELPI} keyword is quite complex from the outset, when it is included as
|
||||
an \actionx{} keyword it gets even more complicated. In order to support
|
||||
\kw{WELPI} in \actionx{} the simulator needs to inspect the \actionx{} keywords
|
||||
before invoking them, and if \kw{WELPI} is included the PI values must be
|
||||
assembled from the simulator and passed to the
|
||||
\inlinecode{Schedule::applyAction()}. This is implemented and works, but it is
|
||||
complex and the special treatment in order to support the combination \kw{WELPI}
|
||||
+ \actionx{} is quite considerable.
|
||||
|
||||
|
||||
\section{Problems in parallel}
|
||||
\label{actionx_paralle}
|
||||
The operation environment for \actionx{} is quite similar to \udq{} when it
|
||||
comes to parallel behavior - see section \ref{udq_parallel}, in addition we
|
||||
need to be aware of parallel challenges after the \actionx{} has completed. If
|
||||
the \actionx{} keyword changes the well structure there will be problems with
|
||||
with the parallel well distribution in the simulator. \emph{As of Januarry 2022
|
||||
this will fail undetected.}
|
||||
|
||||
|
||||
\section{\actionx{} restart output}
|
||||
As with the \udq{} keyword some of the structure and complexity of the
|
||||
\actionx{} datastructures are there primarily to enable \eclipse{} compatible
|
||||
restart. Regarding restart of \actionx{} related data:
|
||||
\begin{enumerate}
|
||||
\item The restart output contains the result of parsing an \actionx{}
|
||||
condition in an intermediate representation which has been reverse
|
||||
engineered, this is complex and might not be 100\% correct.
|
||||
\item When restarting \flow{} from an \eclipse{} formatted restart file the
|
||||
\actionx{} conditions are reparsed based on string data in the restart file
|
||||
and the intermediate representation mentioned in point 1 is not utilised.
|
||||
\end{enumerate}
|
||||
405
docs/tm/udq_actionx/pyaction.tex
Normal file
405
docs/tm/udq_actionx/pyaction.tex
Normal file
@@ -0,0 +1,405 @@
|
||||
\newcommand{\pyaction}{\kw{PYACTION}}
|
||||
\chapter{Programming in the deck: \pyaction{}}
|
||||
\label{pyaction}
|
||||
The \pyaction{} keyword is a \flow{} specific keyword which allows for Python
|
||||
programming in the \kw{SCHEDULE} section. The \pyaction{} keyword is inspired by
|
||||
the \actionx{} keyword, but instead of a \inlinecode{.DATA} formatted condition
|
||||
you are allowed to implement the condition with a general Python script. The
|
||||
\actionx{} keywords are very clearly separated in a condition part and an action
|
||||
part in the form of a list of keywords which are effectively injected in the
|
||||
\kw{SCHEDULE} section when the condition evaluates to true. This is not so for
|
||||
\pyaction{} where there is only one Python script which can both evaluate
|
||||
conditions and apply changes. In principle the script can run arbitrary code,
|
||||
but due to the complexity of the \kw{SCHEDULE} datamodel the ``current best''
|
||||
way to actually change the course of the simulation is through the use of an
|
||||
additional dummy \actionx{} keyword.
|
||||
|
||||
In order to enable the \pyaction{} keyword \flow{} must be compiled with the
|
||||
\path{cmake} switches \inlinecode{-DOPM\_ENABLE\_EMBEDDED\_PYTHON=ON} and
|
||||
\inlinecode{-DOPM\_ENABLE\_PYTHON=ON}, the default is to build with these switches
|
||||
set to \inlinecode{OFF}. Before you enable \pyaction{} in your \flow{}
|
||||
installation please read carefully through section \ref{pyaction_security} for
|
||||
security implications of \pyaction{}.
|
||||
|
||||
\section{Python - wrapping and embedding}
|
||||
Python is present in the \flow{} codebase in two different ways. For many of
|
||||
the classes in the \flow{} codebase - in particular in opm-common, there are
|
||||
\emph{Python wrappers} available. That means that you can invoke the C++
|
||||
functionality in \flow{} classes from Python - e.g. this Python script can be used to
|
||||
load a deck and print all the keywords:
|
||||
|
||||
\begin{code}
|
||||
import sys
|
||||
from opm.io.parser import Parser
|
||||
|
||||
input_file = sys.argv[1]
|
||||
parser = Parser()
|
||||
|
||||
deck = parser.parse_file(input_file)
|
||||
for kw in deck:
|
||||
print(kw.name)
|
||||
\end{code}
|
||||
|
||||
When used this way the Python interpreter is the main program running, and the
|
||||
\flow{} classes like \inlinecode{Opm::Parser} are loaded to extend the Python
|
||||
interpreter. This can also be flipped around, the Python interpreter can be
|
||||
\emph{embedded} in the \flow{} executable. When Python is embedded, \flow{} is
|
||||
the main program running, and with help of the embedded interpreter the \flow{}
|
||||
program can be extended with Python plugins. The \pyaction{} keyword can be
|
||||
perceived as a Python plugin. To really interact with the state of the \flow{}
|
||||
simulation the plugin needs to utilize the functionality which wraps the C++
|
||||
functionality, so for \pyaction{} both wrapping and embedding is at play.
|
||||
|
||||
Exporting more functionality from C++ to Python in the form of new and updated
|
||||
wrappers is a quite simple and mechanical process. If you need a particular
|
||||
functionality which is already available in C++ also in Python it will probably
|
||||
be a quite limited effort for a developer who is already familiar with the code.
|
||||
|
||||
|
||||
\section{The \pyaction{} keyword}
|
||||
The \pyaction{} keyword is in the \kw{SCHEDULE} section like \actionx{}. The
|
||||
first record is the name of the action and a string identifier for how many
|
||||
times the action should run, then there is a path to a Python module:
|
||||
|
||||
\begin{deck}
|
||||
PYACTION
|
||||
PYTEST 'FIRST_TRUE' /
|
||||
'pytest.py' /
|
||||
\end{deck}
|
||||
|
||||
This keyword defines a \pyaction{} called \kw{PYTEST} which will run at the end
|
||||
of every timestep until the first time a \inlinecode{true} value is returned. In
|
||||
addition to \kw{FIRST\_TRUE} you can choose \kw{SINGLE} to run exactly once and
|
||||
\kw{UNLIMITED} to continue running at the end of every timestep for the entire
|
||||
simulation. The second record is the path to a file with Python code which will
|
||||
run when this \pyaction{} is invoked. The path to the module will be interpreted
|
||||
relative to the location of the \path{.DATA} file.
|
||||
|
||||
The python module can be quite arbitrary, but it must contain a function
|
||||
\inlinecode{run} with the correct signature:
|
||||
\begin{code}
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
print('Running python code in PYACTION')
|
||||
return True
|
||||
\end{code}
|
||||
The \pyaction{} machinery is not as robust as the simulator proper: while
|
||||
loading the \kw{PYACTION} keyword \flow{} will check that the Python module
|
||||
contains syntactically valid Python code, and that it contains a
|
||||
\inlinecode{run()} function, but it will \emph{not} check the signature of the
|
||||
\inlinecode{run()} function. If the signature is wrong you will get a hard to
|
||||
diagnose runtime error.
|
||||
|
||||
When the Python module is loaded it does so in an environment where the path to
|
||||
the \path{.DATA} file has been appended to the Python load path by manipulating
|
||||
the internal \inlinecode{sys.path} variable.
|
||||
|
||||
|
||||
\subsection{The different arguments}
|
||||
The \inlinecode{run()} function will be called with exactly five arguments which
|
||||
your implementation can use. These arguments point to datastructures in the
|
||||
simulator, and is the way to interact with the state of the simulation. The five
|
||||
arguments are:
|
||||
\begin{description}
|
||||
\item[\inlinecode{ecl\_state}:] An instance of the \inlinecode{Opm::EclipseState}
|
||||
class - this is a representation of \emph{all static properties} in the model,
|
||||
ranging from porosity to relperm tables. The content of the
|
||||
\inlinecode{ecl\_state} is immutable - you are not allowed to change the static
|
||||
properties at runtime\footnote{This could certainly be interesting, but this
|
||||
is beyond the scope of the \pyaction{} keyword.}.
|
||||
\item[\inlinecode{schedule}:] An instance of the \inlinecode{Opm::Schedule}
|
||||
class - this is a representation of all the content from the \kw{SCHEDULE}
|
||||
section, notably all well and group information and the timestepping. Being
|
||||
able to change the \kw{SCHEDULE} information runtime is certainly one of the
|
||||
main motivations for this functionality, however due to the complexity of
|
||||
the \inlinecode{Opm::Schedule} class (section \ref{schedule_design})
|
||||
the recommended way to actually mutate the \inlinecode{Opm::Schedule} is
|
||||
through the use of a dummy \actionx{} keyword (section
|
||||
\ref{pyaction_actionx}).
|
||||
\item[\inlinecode{report\_step}:] This is an integer for the report step we
|
||||
are currently working on. Observe that the \pyaction{} is called for every
|
||||
simulator timestep, i.e. it will typically be called multiple times with
|
||||
the same value for the $\mathrm{report\_step}$ argument.
|
||||
\item[\inlinecode{summary\_state}:] An instance of the
|
||||
\inlinecode{Opm::SummaryState} class, this is where the current summary
|
||||
results of the simulator are stored. The \inlinecode{SummaryState} class has
|
||||
methods to get hold of well, group and general variables
|
||||
\begin{code}
|
||||
# Print all well names
|
||||
for well in summary_state.wells:
|
||||
print(well)
|
||||
|
||||
# Assign all group names to the variable group_names
|
||||
group_names = summary_state.groups
|
||||
|
||||
# Sum the oil rate from all wells.
|
||||
sum_wopr = 0
|
||||
for well in summary_state.wells:
|
||||
sum_wopr += summary_state.well_var(well, 'WOPR')
|
||||
|
||||
# Directly fetch the FOPR from the summary_state
|
||||
fopr = summary_state['FOPR']
|
||||
\end{code}
|
||||
The \inlinecode{summary\_state} variable can also be updated with the
|
||||
\inlinecode{update()}, \inlinecode{update\_well\_var()} and
|
||||
\inlinecode{update\_group\_var()} methods.
|
||||
\item[\inlinecode{actionx\_callback}:] The \inlinecode{actionx\_callback} is a
|
||||
specialized function which is used to update the \inlinecode{Schedule} object
|
||||
by applying the keywords from a normal \actionx{} keyword. This is described
|
||||
in detail in section \ref{pyaction_actionx}.
|
||||
\end{description}
|
||||
|
||||
\subsection{Holding state}
|
||||
The \pyaction{} keywords will often be invoked multiple times, a Python
|
||||
dictionary \inlinecode{state} has been injected in the module - that dictionary
|
||||
can be used to maintain state between invocations. Let us assume we want to
|
||||
detect when the field oil production starts curving down - i.e. when
|
||||
$\partial^2_{t} \mathrm{FOPR} < 0$, in order to calculate that we need to keep
|
||||
track of the timesteps and the $\mathrm{FOPR}$ as function of time - this is one
|
||||
possible implementation:
|
||||
\begin{code}
|
||||
def diff(pair1, pair2):
|
||||
return (pair1[0] - pair2[0], pair1[1] - pair2[1])
|
||||
|
||||
def fopr_diff2(summary_state):
|
||||
fopr = summary_state.get('FOPR')
|
||||
sim_time = summary_state.get('TIME')
|
||||
if not 'fopr' in state:
|
||||
state['fopr'] = []
|
||||
fopr_series = state['fopr']
|
||||
fopr_series.append( (sim_time, fopr) )
|
||||
|
||||
if len(fopr_series) < 2:
|
||||
return None
|
||||
|
||||
pair0 = fopr_series[-1]
|
||||
pair1 = fopr_series[-2]
|
||||
pair2 = fopr_series[-3]
|
||||
|
||||
dt1, df1 = diff(pair0, pair1)
|
||||
dt2, df2 = diff(pair1, pair2)
|
||||
|
||||
return 2*(df1/dt1 - df2/dt2)/(dt1 + dt2)
|
||||
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
fopr_d2 = fopr_diff2(summary_state)
|
||||
if not fopr_d2 is None:
|
||||
if fopr_d2 < 0:
|
||||
print('Hmmm - this is going the wrong way')
|
||||
else:
|
||||
print('All good - sky is the limit!')
|
||||
\end{code}
|
||||
|
||||
\section{Changing the \inlinecode{Schedule} object - using a ``normal'' \actionx{}}
|
||||
\label{pyaction_actionx}
|
||||
Before reading this section you should make sure to understand the
|
||||
\inlinecode{Schedule} design described in section \ref{schedule_design}. The
|
||||
initial plan when implementing the \pyaction{} keyword was to be able to make
|
||||
function calls like
|
||||
\begin{code}
|
||||
schedule.close_well(w1, report_step)
|
||||
schedule.set_orat(w2, 1000, report_step)
|
||||
\end{code}
|
||||
to close a well and set the oil rate of another well. Unfortunately it proved
|
||||
very complex to get good semantics for combining such runtime changes with the
|
||||
keyword based model for \kw{SCHEDULE} section. The current recommendation is to
|
||||
apply changes to the \kw{SCHEDULE} section using callbacks to \kw{ACTIONX}
|
||||
keywords from Python code, this is illustrated in the example
|
||||
below\footnote{From a programmers point of view the solution seems very
|
||||
unsatisfactory, but it works and it plays nicely with the \kw{ACTIONX} behavior.
|
||||
If/when the underlying \inlinecode{Schedule} implementation changes there is
|
||||
nothing per se in the \pyaction{} design which inhibits use of a better
|
||||
\inlinecode{Schedule} api in the future.}.
|
||||
|
||||
The recommended way to achieve this is to create a normal \actionx{} keyword
|
||||
which is set up to run zero times, and then explicitly invoke that from the
|
||||
Python \inlinecode{run()} function. In the example below we create an \actionx{}
|
||||
\inlinecode{CLOSEWELLS} which will close all matching wells (the wellname '?')
|
||||
\begin{deck}
|
||||
ACTIONX
|
||||
CLOSEWELLS 0 /
|
||||
/
|
||||
/
|
||||
|
||||
WELOPEN
|
||||
'?' 'CLOSE' /
|
||||
/
|
||||
|
||||
ENDACTIO
|
||||
\end{deck}
|
||||
The \inlinecode{CLOSEWELLS} action is set up to run zero times, so the normal
|
||||
\actionx{} machinery will never run this action\footnote{The \kw{CLOSEWELL}
|
||||
action has an \emph{empty condition}, the \actionx{} keywords with empty
|
||||
condition will always evaluate as false.}. Then in the Python run function we go
|
||||
through all the wells and call the \inlinecode{CLOSEWELL} action to close those
|
||||
with \inlinecode{OPR < 1000}:
|
||||
\begin{code}
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
close_wells = []
|
||||
for well in summary_state.wells:
|
||||
if summary_state.well_var(well, 'WOPR') < 1000:
|
||||
close_wells.append(well)
|
||||
|
||||
if close_wells:
|
||||
actionx_callback('CLOSEWELLS', close_wells)
|
||||
\end{code}
|
||||
The implementation of this is quite complex with thread of execution going from
|
||||
C++ to Python, then invoking a callback to C++ which will call
|
||||
\inlinecode{Schedule::iterateScheduleSection()}, going back to Python to
|
||||
complete the \inlinecode{run()} method before the function pointers pops back to
|
||||
C++ and continues the simulator execution\footnote{This is documented in some
|
||||
detail as code comments of \inlinecode{Schedule::applyPyAction()} in the
|
||||
\path{Schedule.cpp} file.}.
|
||||
|
||||
|
||||
\section{Implementing \udq{} like behavior}
|
||||
The \udq{} keyword has three different purposes - all based on defining
|
||||
complex quantities from the current state of the simulation:
|
||||
|
||||
\begin{enumerate}
|
||||
\item Define a complex quantity to be used in a \actionx{} condition.
|
||||
\item Define a complex quantity for reporting in the summary file.
|
||||
\item Define a quantity which can used as a control in \kw{UDA}.
|
||||
\end{enumerate}
|
||||
|
||||
All of these can be achieved by using the \pyaction{} keyword, although for the
|
||||
two latter alternatives you must specify the \udq{} keyword in the deck first,
|
||||
but you can let the \pyaction{} implementation override the value:
|
||||
\begin{deck}
|
||||
-- Observe that this UDQ will be assigned from a PYACTION keyword,
|
||||
-- the value used in the ASSIGN statement below is pure dummy.
|
||||
UDQ
|
||||
ASSIGN WUGOOD 1 /
|
||||
ASSIGN FUGOOD 1 /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
\subsection{Using \pyaction{} instead of \udq{} + \actionx{}}
|
||||
Towards the end of section \ref{actionx_structure} it is demonstrated how \udq{}
|
||||
and \actionx{} can be combined to implement an action in case a complicated
|
||||
condition applies. As described in section \ref{pyaction_actionx} the best way
|
||||
to actually invoke changes on the \kw{SCHEDULE} section is through the use of a
|
||||
dummy \actionx{} keyword, but \pyaction{} is very well suited to evaluate
|
||||
complex conditions. In the example below we close all wells which have
|
||||
consistently produced less than 1000 $\mathrm{m^3/day}$ for more than 60 days:
|
||||
|
||||
\begin{code}
|
||||
wopr_limit = 1000
|
||||
time_limit = 60 * 3600 * 24
|
||||
|
||||
def init_state(summary_state):
|
||||
if 'closed_wells' in state:
|
||||
return
|
||||
|
||||
state['closed_wells'] = set()
|
||||
bad_wells = {}
|
||||
for well in summary_state.wells:
|
||||
bad_wells[well] = None
|
||||
state['bad_wells'] = bad_wells
|
||||
|
||||
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
shut_wells = []
|
||||
init_state(summary_state)
|
||||
for well in summary_state.wells:
|
||||
if well in state['closed_wells']:
|
||||
continue
|
||||
|
||||
if summary_state.well_var(well, 'WOPR') < wopr_limit:
|
||||
elapsed = summary_state.elapsed()
|
||||
if state['bad_wells'][well] is None:
|
||||
state['bad_wells'][well] = elapsed
|
||||
else:
|
||||
bad_time = elapsed - state['bad_wells'][well]
|
||||
if bad_time > time_limit:
|
||||
shut_wells.append(well)
|
||||
state['closed_wells'].add( well )
|
||||
else:
|
||||
state['bad_wells'][well] = None
|
||||
|
||||
if shut_wells:
|
||||
actionx_callback(shut_wells)
|
||||
|
||||
\end{code}
|
||||
|
||||
\subsection{Using \pyaction{} to report to the summary file}
|
||||
The important point when using \pyaction{} to report complex results to the
|
||||
summary file is just that the \inlinecode{summary\_state} argument to the
|
||||
\inlinecode{run()} function is \emph{writable} with \inlinecode{updata\_xxx}
|
||||
calls. Assuming dummy \udq{} variables \kw{WUGOOD} and \kw{FUGOOD} have been
|
||||
defined as per the example above, we can use \pyaction{} to set variable
|
||||
\kw{FUGOOD} to one for all wells with rate above a limit, and the \kw{FUGOOD}
|
||||
variable can be the count of such wells:
|
||||
\begin{code}
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
good_count = 0
|
||||
opr_limit = 1000
|
||||
for wname in schedule.well_names():
|
||||
if summary_state.well_var(wname, 'FOPR') > opr_limit:
|
||||
good_count += 1
|
||||
summary_state.update_well_var(wname, 'WUGOOD', 1)
|
||||
else:
|
||||
summary_state.update_well_var(wname, 'WUGOOD', 0)
|
||||
|
||||
summary_state.update_var('FUGOOD', good_count)
|
||||
\end{code}
|
||||
|
||||
|
||||
|
||||
\subsection{Using \pyaction{} to set a \kw{UDA} control}
|
||||
Using \pyaction{} to set \kw{UDA} controls is quite simple. Again the \udq{}
|
||||
keyword must have been defined with a dummy value in the \kw{SCHEDULE} section,
|
||||
and the \kw{UDA} keyword used in e.g. a \kw{WCONDPROD} keyword. Then the
|
||||
\inlinecode{run()} function can just be used to assign to the \udq{} variable.
|
||||
In the example below we use a \kw{UDA} to control the oil production rate, and
|
||||
the value is set to the average value of the producing wells:
|
||||
\begin{deck}
|
||||
-- Define dummy UDQ WUOPR to be used as control in the WCONPROD
|
||||
-- keyword. The actual value for this UDQ is assigned in a PYACTION
|
||||
-- keyword
|
||||
UDQ
|
||||
ASSIGN WUOPR 0 /
|
||||
/
|
||||
...
|
||||
...
|
||||
-- Need to define a well list with all the production wells.
|
||||
-- This is to ensure that the WCONPROD keyword is only applied
|
||||
-- to producers.
|
||||
WLIST
|
||||
'PROD' P1 P2 P3 .../
|
||||
|
||||
WCONPROD
|
||||
'*PROD' 'OPEN' 'ORAT' 'WUOPR' /
|
||||
/
|
||||
\end{deck}
|
||||
This can then be combined with the python code:
|
||||
\begin{code}
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
num_prod_wells = 0
|
||||
for wname in schedule.well_names():
|
||||
if summary_state.well_var(wname, 'WOPR') > 0:
|
||||
num_prod_wells += 1
|
||||
|
||||
fopr = summary_state['FOPR']
|
||||
new_rate = fopr / num_prod_wells
|
||||
for wname in schedule.well_names():
|
||||
summary_state.update_well_var(wname, 'WUOPR', new_rate)
|
||||
\end{code}
|
||||
|
||||
|
||||
\section{Security implications of \pyaction{}}
|
||||
\label{pyaction_security}
|
||||
The \pyaction{} keyword allows for execution of arbitrary user supplied Python
|
||||
code, with the priviliges of the user actually running \flow{}. If you have a
|
||||
setup where \flow{} runs with a different user account than the person
|
||||
submitting the simulation you should be \emph{very careful} about enabling the
|
||||
embedded Python functionality and the \pyaction{} keyword. As a scary example
|
||||
this script will wipe your disks:
|
||||
\begin{code}
|
||||
import shutil
|
||||
|
||||
def run(ecl_state, schedule, report_step, summary_state, actionx_callback):
|
||||
shutil.rmtree('/')
|
||||
\end{code}
|
||||
|
||||
If the user running \flow{} has different security credentials than the user
|
||||
submits the job, this has significant security implications.
|
||||
599
docs/tm/udq_actionx/udq.tex
Normal file
599
docs/tm/udq_actionx/udq.tex
Normal file
@@ -0,0 +1,599 @@
|
||||
\newcommand{\udq}{\kw{UDQ}}
|
||||
\chapter{Programming in the deck: \udq{}}
|
||||
\udq{} and \kw{ACTIONX} are two keywords which offer a sort of
|
||||
\emph{programming} in the input deck. \udq{} is an acronym for \emph{User
|
||||
Defined Quantity}, and the essence of the \udq{} keyword is the ability to
|
||||
define arithmetic expressions based on the result vectors of the ongoing
|
||||
simulation. The quantites evaluated with \udq{} can then be output as summary
|
||||
variables, and they can be used as controls in keywords like \kw{WCONPROD} and
|
||||
\kw{GCONINJE}. When used as controls the \udq{} variables are called \emph{User
|
||||
Defined Arguments} (UDA).
|
||||
|
||||
For both the \udq{} and \kw{ACTIONX} keywords evaluating an arithmetic
|
||||
expression based on the current results of the ongoing simulation is an
|
||||
important part of the concept, and they are often referenced in pair as
|
||||
\udq{}/\kw{ACTIONX}, this is slightly misleading as the two are fully
|
||||
independent and share very little both as concepts in \flow{} and in the C++
|
||||
implementation. The \kw{ACTIONX} keyword is described in chapter \ref{actionx}.
|
||||
|
||||
The \udq{} keyword is also documented in section 12.3.233 in the \flow{}
|
||||
reference manual.
|
||||
|
||||
\section{Defining a new \udq{} keyword}
|
||||
New \udq{} variables are defined with the \udq{} keyword in the \kw{SCHEDULE}
|
||||
section. The \udq{} keyword is a sort of a super keyword with four additional
|
||||
subcommands: \kw{DEFINE}, \kw{ASSIGN}, \kw{UNIT} and \kw{UPDATE}. The
|
||||
\kw{DEFINE} subcommand is the most important command, that is used to
|
||||
\emph{define} an arithmetic expression for a \udq{} variable, which is evaluated
|
||||
at the end of every simulator time step. \kw{ASSIGN} is used to define a \udq{}
|
||||
variable with a constant numerical value, in addition the \kw{ASSIGN} subcommand
|
||||
is often used as a ``forward reference'' to enable using a \udq{} keyword in
|
||||
another \kw{DEFINE} expression. The \kw{UNIT} command is used to assign a unit
|
||||
string to a \udq{} variable, see section \ref{udq_units} for more details about
|
||||
\udq{} variables and units. The \kw{UPDATE ON} and \kw{UPDATE OFF} commands can
|
||||
be used to switch updating of \udq{} variables on and off. The \udq{} variables
|
||||
are created in mode \kw{ON}.
|
||||
|
||||
All \udq{} keywords must have the letter \emph{U} as their second character, the
|
||||
first character should be 'F', 'G' or 'W' to indicate whether this is a field,
|
||||
group or well quantity\footnote{In \eclipse{} also the characters 'S', 'C', 'A'
|
||||
and 'B' are used to denote \emph{segment}, \emph{connection} \emph{aquifer} and
|
||||
\emph{block} variables respectively. None of these are supported in \flow{}.}.
|
||||
|
||||
The simplest way to define a \udq{} is just using the \kw{ASSIGN} subcommand of
|
||||
the \udq{} keyword:
|
||||
\begin{deck}
|
||||
UDQ
|
||||
ASSIGN FUVAR1 123 /
|
||||
ASSIGN FUVAR2 456 /
|
||||
/
|
||||
\end{deck}
|
||||
This way we will assign to variables \inlinecode{FUVAR1} and \inlinecode{FUVAR2}
|
||||
with values 123 and 456 respectively. These values can output to the summary
|
||||
file, be used as control values in a control keyword like \kw{WELTARG} and be
|
||||
used to recursively define another \udq{} keyword.
|
||||
|
||||
The more interesting \udq{} subcommand is \kw{DEFINE} which is used to define an
|
||||
arithmetic expression for a \udq{} variable, the arithmetic expression will be
|
||||
evaluated at the end of every timestep. The expressions are built from the
|
||||
normal arithmetic operators +,-,*,/, a predefined set of available functions
|
||||
(see \ref{udq_functions}) and results from the ongoing simulation.
|
||||
|
||||
In the example below we create \udq{} variables \kw{FUWCT1} and \kw{FUWCT2} as
|
||||
user defined field water cut, one based on the summary variables \kw{FWPR} and
|
||||
\kw{FOPR} and one based on summing \kw{WOPR} and \kw{WWPR} over all wells
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE FUWCT1 FWPR/(FWPR + FOPR) /
|
||||
DEFINE FUWCT2 SUM(WWPR)/(SUM(WWPR) + SUM(WOPR)) /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
A \udq{} variable can be redefined during the simulation, and also change from
|
||||
constant \kw{ASSIGN} to variable \kw{DEFINE}. Observe that \udq{} values are
|
||||
always evaluated in order of occurence in the input deck. For instance for this
|
||||
input
|
||||
\begin{deck}
|
||||
UDQ
|
||||
ASSIGN FU1 100 /
|
||||
DEFINE FU2 FU1 + FOPR /
|
||||
DEFINE FU1 FWPR /
|
||||
/
|
||||
\end{deck}
|
||||
the evaluation order will be \{\kw{FU1}, \kw{FU2}\}\footnote{Maintaining the
|
||||
input order and whether a certain \udq{} symbol is now a \kw{ASSIGN} or
|
||||
\kw{DEFINE} keyword is also very important for the restart code.}. \kw{ASSIGN}
|
||||
statements take effect at input time, making the newly defined symbol
|
||||
immediately available for reuse in a subsequent defintion. This is utilized in
|
||||
the \udq{} keyword above where the symbol \kw{FU1} is referenced in the
|
||||
defintion of \kw{FU2}. As used in this example the \kw{ASSIGN FU1 100} can be
|
||||
seen as a \emph{forward reference}. When we have completed the first timestep
|
||||
and it is time to evalute the \udq{} expressions they will be evaluated in order
|
||||
of \emph{first appearance}, i.e. \{\kw{FU1}, \kw{FU2}\}. At this stage the
|
||||
active definition of \kw{FU1} is \inlinecode{FU1 = FWPR}, i.e. the value
|
||||
\inlinecode{100} from the initial definition \inlinecode{FU1 = 100} is never
|
||||
actually used.
|
||||
|
||||
\section{Different types of \udq{} - field, group and well}
|
||||
The \udq{} keywords can be of different types, \flow{} supports \emph{field},
|
||||
\emph{well} and \emph{group} keywords\footnote{\eclipse{} also supports
|
||||
connection, segment and aquifer variables.}. The field keywords are scalar,
|
||||
whereas the well and group keywords are sets with values for every well/group.
|
||||
|
||||
The type of a \udq{} keyword is inferred from the name in the same manner as the
|
||||
summary keywords, i.e. for this \udq{} keyword
|
||||
\begin{deck}
|
||||
UDQ
|
||||
ASSIGN FU1 100 /
|
||||
ASSIGN WU1 200 /
|
||||
ASSIGN GU1 300 /
|
||||
/
|
||||
\end{deck}
|
||||
we will define one scalar keyword \kw{FU1}, one well set \kw{WU1} and one group
|
||||
set \kw{GU1}. The well sets will have one slot for each well in the model, it is
|
||||
not possible to create a well set with only a subset of wells, but the well set
|
||||
can have \emph{undefined} value for a subset of wells. The set maintains a
|
||||
\inlinecode{is\_defined()} status for each element and most operations only
|
||||
apply to the defined elements\footnote{The C++ implementation of the \udq{}
|
||||
value set is the equivalent of \texttt{std::map<std::string,
|
||||
std::optional<double>>}.}.
|
||||
|
||||
As indicated with \kw{ASSIGN WU1 200} you can assign a scalar value to a set
|
||||
keyword, then all elements in the set will have the same value. Assuming we have
|
||||
a model with wells OP1, OP2, WI and GI the \kw{WU1} will look like
|
||||
\begin{code}
|
||||
WU1 = {"OP1": 100, "OP2": 100, "WI": 100, "GI": 100}.
|
||||
\end{code}
|
||||
When defining a well \udq{} it is natural to refer to well summary variables, in
|
||||
the example below we define \kw{WUBHP} which is the bottom hole pressure
|
||||
for each well, \kw{WUOPR1} which is the oil production rate for a subset of
|
||||
wells and \kw{WUOPR2} which is the oil production rate for well OP1 \emph{broadcasted to all wells}.
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE WUBHP WBHP /
|
||||
DEFINE WUOPR1 WOPR 'OP*' /
|
||||
DEFINE WUOPR2 WOPR OP1 /
|
||||
/
|
||||
\end{deck}
|
||||
After evaluation these \udq{} values will be\footnote{The numerical values are
|
||||
arbitrary, just to illustrate that they are \emph{defined}, in contrast to the
|
||||
[ ] which is used to illustrate an \emph{undefined} value.}:
|
||||
\begin{code}
|
||||
WUBHP = {"OP1": 20, "OP2": 30, "WI": 10, "GI": 15}
|
||||
WUOPR1 = {"OP1": 13, "OP2": 17, "WI": [ ], "GI": [ ]}
|
||||
WUOPR2 = {"OP1": 13, "OP2": 13, "WI": 13, "GI": 13}
|
||||
\end{code}
|
||||
Observe how well variables like \kw{WBHP} and \kw{WOPR} can be qualified with a
|
||||
wellname pattern. If no wellname is supplied the expression will be evaluated
|
||||
for all wells, as for \kw{WUBHP}, for \kw{WUOPR1} the pattern 'OP*' will select
|
||||
wells \{OP1, OP2\} and leave the injectors \{WI, GI\} undefined. For \kw{WUOPR2}
|
||||
the well pattern 'OP1' specifies a well completely, i.e. this will be evaluated
|
||||
as a scalar, and then the scalar value \inlinecode{WOPR:OP1 == 13} is
|
||||
broadcasted to all the wells in \kw{WUOPR2}.
|
||||
|
||||
\udq{} sets with different sets of defined wells can be combined, in most cases
|
||||
the operations will be applied to the intersection of all defined wells,
|
||||
consider for example\label{udq_diff}:
|
||||
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE WUBHP WBHP /
|
||||
DEFINE WUTHP WTHP OP* /
|
||||
DEFINE WUPDIFF WUBHP - WUTHP
|
||||
/
|
||||
\end{deck}
|
||||
When these \udq{} statements are evaluated we will get:
|
||||
\begin{code}
|
||||
WUBHP = {"OP1": 20, "OP2": 30, "WI": 10, "GI": 15}
|
||||
WUTHP = {"OP1": 13, "OP2": 17, "WI": [ ], "GI": [ ]}
|
||||
WUPDIFF = {"OP1": 7, "OP2": 13, "WI": [ ], "GI": [ ]}
|
||||
\end{code}
|
||||
As we see the undefined property for wells GI and WI in \kw{WUTHP} is contagious
|
||||
when the two expressions are combined with \inlinecode{WUPDIFF = WUBHP - WUTHP},
|
||||
see however section \ref{udq_union_functions} for a collection of functions
|
||||
which operate on the union of values.
|
||||
|
||||
When an undefined variable is output to the summary file it will get a value
|
||||
given as item 3 of the \kw{UDQPARAM} keyword. Summary output is the \emph{only}
|
||||
point where the undefined value can be dereferenced, the numerical value given
|
||||
in \kw{UDQPARAM} will not be available either for \udq{} nor \kw{ACTIONX}
|
||||
evaluations.
|
||||
|
||||
|
||||
\section{Functions available in \udq{} defintions}
|
||||
\label{udq_functions}
|
||||
\flow{} supports all the \udq{} functions available in \eclipse{}, for the
|
||||
future it would be a quite simple C++ task to extend the list of available
|
||||
functions, although that will affect \eclipse{} compatibility.
|
||||
|
||||
\subsection{Ordinary binary functions}
|
||||
The \udq{} framework supports all the ordinary arithmetic operators +,-,*,/ and
|
||||
\^{} and the comparison operators $>, \ge, <, \le, \ne, ==$. For all of these
|
||||
operations sets and scalars can be combined freely. When combining a scalar and
|
||||
a set the scalar will be promoted to a set with all values equal, i.e. for
|
||||
\begin{deck}
|
||||
UDQ
|
||||
ASSIGN WULIMIT 100 /
|
||||
/
|
||||
\end{deck}
|
||||
the numerical value 100 will be broadcasted to all wells:
|
||||
\begin{code}
|
||||
WULIMIT = {"OP1": 100, "OP2": 100, "WI": 100, "GI": 100}.
|
||||
\end{code}
|
||||
|
||||
In the case of set arguments the operations are only applied to the union of
|
||||
values which are defined in both argument sets. The comparison operators produce
|
||||
numerical 0 or 1 depending on the result of the comparison, the result from a
|
||||
comparison operation can be used numerically in further computations. In the
|
||||
following example \kw{FUWCNT} will be the number of wells producing with oil
|
||||
production rate above 1000\footnote{Remember: 1000 has the units of the
|
||||
deck, i.e. $\mathrm{stb/day}$ in FIELD units and $\mathrm{m^3/day}$ in metric
|
||||
units.}.
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE FUWCNT SUM( WOPR > 1000 ) /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
|
||||
|
||||
\subsection{Functions over a set returning a scalar}
|
||||
The \udq{} framework has several functions which iterate over all the defined
|
||||
members of a set and return a scalar. In the example
|
||||
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE FU1 SUM(WOPR 'OP*') /
|
||||
/
|
||||
\end{deck}
|
||||
The scalar variable \kw{FU1} will be equal to the sum of oil production rates
|
||||
for all wells matching the pattern \kw{OP*}, the wells with a name not matching
|
||||
\kw{OP*} will not contribute to the sum. The complete list of functions iterating
|
||||
over a set and returning a scalar are:
|
||||
|
||||
\begin{description}
|
||||
\item[SUM] Sum all defined elements in the argument set and return a scalar.
|
||||
\item[AVEA] The arithmetic average of the elements in the set.
|
||||
\item[AVEG] The geometric average of the elements in the set.
|
||||
\item[AVEH] The harmonic average of the elements in the set.
|
||||
\item[MAX] The maximum element in the set.
|
||||
\item[MIN] The minimum element in the set.
|
||||
\item[NORM1] The $\mathrm{L^1}$ norm of the elements in the set.
|
||||
\item[NORM2] The $\mathrm{L^2}$ norm of the elements in the set.
|
||||
\item[NORMI] The $\mathrm{L^\infty}$ norm of the elements in the set.
|
||||
\item[PROD] The product of all the elements in the set.
|
||||
\end{description}
|
||||
|
||||
|
||||
\subsection{Elemental functions}
|
||||
There is a family of functions which take a vector or scalar as argument, run
|
||||
through all the elements in the argument and return a result of the same shape
|
||||
as the argument, where a function has been applied to all the defined elements.
|
||||
Assume that the \kw{WU1} has the following value:
|
||||
|
||||
\begin{code}
|
||||
WU1 = {"OP1": -2, "OP2": -1, "WI": 1, "GI": []},
|
||||
\end{code}
|
||||
|
||||
then \kw{DEFINE WUABS ABS(WU1)} will give
|
||||
|
||||
\begin{code}
|
||||
WUABS = {"OP1": 2, "OP2": 1, "WI": 1, "GI": []}.
|
||||
\end{code}
|
||||
|
||||
The available elemental functions of this kind come in different categories:
|
||||
|
||||
\subsubsection*{Mathematical functions}
|
||||
\begin{description}
|
||||
\item[EXP] Return a new set where all defined elements have been exponentiated.
|
||||
\item[ABS] Return a new set with the absolute value of all elements.
|
||||
\item[LN] Return a new set with the \emph{natural logarithm} of all elements.
|
||||
\item[LOG] Return a new set with $\log_{10}$ of all elements.
|
||||
\item[NINT] Return a new set where all elements have been converted to the
|
||||
nearest integer.
|
||||
\end{description}
|
||||
|
||||
\subsubsection*{Sorting functions}
|
||||
The \udq{} functionality supports functions \kw{SORTA} and \kw{SORTD} to sort a
|
||||
set in ascending or descending order respectively. Observe that these functions
|
||||
do not sort the sets in place - the udqset does not have any notion of ordering,
|
||||
rather they create a permutation set with values 1,2,3, ... The following
|
||||
combination of \udq{} and \kw{ACTIONX} will use the \kw{SORTD} function to close
|
||||
the two wells with the highest watercut:
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE WUWCTS SORTD(WWCT OP*) /
|
||||
/
|
||||
\end{deck}
|
||||
assuming the \kw{WWCT} looks like
|
||||
\begin{code}
|
||||
WWCT = {"OP1": 0.5, "OP2": 0.2, "OP3": 0.1, "OP4":0.7, "WI": 0, "GI": 0}
|
||||
\end{code}
|
||||
then the \kw{WUWCTS} set will look like
|
||||
\begin{code}
|
||||
WUWCTS = {"OP1": 2, "OP2": 3, "OP3": 4, "OP4":1 "WI": [], "GI": []}
|
||||
\end{code}
|
||||
|
||||
When this is combined with the \kw{ACTIONX}(see chapter \ref{actionx})
|
||||
\begin{code}
|
||||
ACTIONX
|
||||
CW /
|
||||
WUWCTS <= 2 /
|
||||
/
|
||||
|
||||
WELOPEN
|
||||
'?' 'CLOSE' /
|
||||
/
|
||||
|
||||
ENDACTIO
|
||||
\end{code}
|
||||
the two wells with highest watercut will be selected in the \inlinecode{WUWCTS
|
||||
<= 2} statement and that will be expanded to \{OP4, OP1\} by the '?'
|
||||
expression in the \kw{WELOPEN} keyword.
|
||||
|
||||
|
||||
\subsubsection*{Random functions}
|
||||
The \udq{} machinery has functionality to sample random numbers, there are one
|
||||
set of random number functions which are seeded deterministically by item 1 of
|
||||
\kw{UDQPARAMS} and an alternative set which is seeded by the clock. The random
|
||||
number functions take a \udq{} variable as argument, that is only to ensure that
|
||||
the shape of the result value is correct.
|
||||
|
||||
\begin{description}
|
||||
\item[RANDN] Random numbers from distribution $N(0,1)$ seeded deterministically
|
||||
by item 1 in \kw{UDQPARAMS}.
|
||||
\item[RANDU] Random numbers from distribution $U(-1,1)$ seeded deterministically
|
||||
by item 1 in \kw{UDQPARAMS}.
|
||||
\item[RRNDN] Random numbers from distribution $N(0,1)$ seeded by the clock.
|
||||
\item[RRNDU] Random numbers from distribution $U(-1,1)$ seeded by the clock.
|
||||
\end{description}
|
||||
|
||||
Assuming the argument vector \kw{WU1} looks like
|
||||
\begin{code}
|
||||
WU1 = {"OP1": -2, "OP2": [], "WI": 1, "GI": []},
|
||||
\end{code}
|
||||
the result of \kw{DEFINE WURAND RANDU(WU1)} could be like
|
||||
\begin{code}
|
||||
WURAND = {"OP1": 0.576, "OP2": [], "WI": -0.132, "GI": []}.
|
||||
\end{code}
|
||||
|
||||
\subsubsection*{Work with defined status}
|
||||
The functions \kw{DEF}, \kw{UNDEF} and \kw{IDV} can be used to inspect the
|
||||
defined/not defined status of the elements in a \udq{} set.
|
||||
|
||||
\begin{description}
|
||||
\item[DEF] Return a set with value 1 for all defined elements.
|
||||
\item[UNDEF] Return a set with value 1 for all undefined elements.
|
||||
\item[IDV] Return a set with value 1 for all defined elements and value 0 for
|
||||
all undefined elements.
|
||||
\end{description}
|
||||
|
||||
Assuming the input argument
|
||||
|
||||
\begin{code}
|
||||
WU1 = {"OP1": -2, "OP2": [], "WI": 1, "GI": []},
|
||||
\end{code}
|
||||
|
||||
the \udq{} assignments
|
||||
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE WUDEF DEF(WU1) /
|
||||
DEFINE WUUNDEF UNDEF(WU1) /
|
||||
DEFINE WUIDV IDV(WU1) /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
will produce:
|
||||
|
||||
\begin{code}
|
||||
WUDEF = {"OP1": 1, "OP2": [], "WI": 1, "GI": []},
|
||||
WUUNDEF = {"OP1": [], "OP2": 1, "WI": [], "GI": 1},
|
||||
WUIDV = {"OP1": 1, "OP2": 0, "WI": 1, "GI": 0},
|
||||
\end{code}
|
||||
|
||||
|
||||
|
||||
\subsection{Union functions}
|
||||
\label{udq_union_functions}
|
||||
There are a list of functions \kw{Uxxx} which operate on the union of the values
|
||||
found in the two sets, i.e. a result is assigned if at at least one set has
|
||||
defined value for this well/group.
|
||||
\begin{description}
|
||||
\item[UADD] Will add the items from the two sets.
|
||||
\item[UMUL] Will multiply the items from the two sets.
|
||||
\item[UMAX] The maximum value from the two sets.
|
||||
\item[UMIN] The minumum value from the two sets.
|
||||
\end{description}
|
||||
In the case where only one of the sets has a defined value the operation will be
|
||||
performed \emph{as if} the function \kw{Uxxx} is the identity function.
|
||||
|
||||
|
||||
As an example consider the two sets:
|
||||
\begin{code}
|
||||
WU1 = {"OP1": 1, "OP2": [], "WI": 2, "GI": []},
|
||||
WU2 = {"OP1": 6, "OP2": 5, "WI": [], "GI": []},
|
||||
\end{code}
|
||||
|
||||
and the \udq{} expression \kw{DEFINE WUUADD WU1 UADD WU2}, then the resulting
|
||||
set \kw{WUUADD} will be
|
||||
\begin{code}
|
||||
WUUADD = {"OP1": 7, "OP2": 5, "WI": 2, "GI": []}.
|
||||
\end{code}
|
||||
This in contrast to a normal $+$ which only operates on the intersection of the
|
||||
two sets, only well OP1 would have a defined value in this case.
|
||||
|
||||
|
||||
\section{Used as a control: UDA}
|
||||
\label{uda}
|
||||
Probably one of the most important uses of the \udq{} functionality is the
|
||||
ability to use a \udq{} as control in e.g. the \kw{WCONINJE} keyword. In the
|
||||
example below we calculate the produced liquid volume from a group of wells and
|
||||
use that as injection target for a water injector:
|
||||
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE FULPR (WOPR P* + WWPR P*) * 1.25 /
|
||||
/
|
||||
|
||||
...
|
||||
...
|
||||
|
||||
WCONINJE
|
||||
WI 'WATER' 'OPEN' 'RATE' 'FULPR' /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
In the following insane example we distribute the current oil production rate
|
||||
randomly among the producers and use that as target for the next timestep - do
|
||||
not try this at home:
|
||||
\begin{deck}
|
||||
UDQ
|
||||
-- Create a 0 / 1 mask with 0 for injectors and 1 for producers.
|
||||
DEFINE WUPROD WOPR > 0 /
|
||||
|
||||
-- Create a vector of random numbers [0,1] for all producers
|
||||
DEFINE WURAND 0.5 * (RANDU(WUPROD) + 1) * WUPROD /
|
||||
|
||||
-- Create a vector where all producers get a random fraction of
|
||||
-- the current total oil production rate
|
||||
DEFINE WUOPR FOPR * WURAND / SUM(WURAND) /
|
||||
/
|
||||
|
||||
-- Need to have a well list or similar to select all producers for
|
||||
-- the WCONPROD keyword.
|
||||
WLIST
|
||||
'P' 'ADD' ..... /
|
||||
|
||||
|
||||
WCONPROD
|
||||
'*P' 'OPEN' 'ORAT' 'WUOPR' /
|
||||
/
|
||||
\end{deck}
|
||||
One point about this example is that the \udq{} variable \kw{WUOPR} which is
|
||||
used as as control in the \kw{WCONPROD} is a well set, the lookup machinery will
|
||||
automatically use the correct well index when assigning control value to a
|
||||
particular well.
|
||||
|
||||
From an implementation point of view the \kw{UDA} functionality creates a
|
||||
significant complexity, because the actual rate to use in the simulation must be
|
||||
evaluated \emph{just in time}.
|
||||
|
||||
\section{\udq{} units}
|
||||
\label{udq_units}
|
||||
The \udq{} subcommand \kw{UNIT} can be used to assign a string which is used as
|
||||
output unit when the \udq{} variable is output to the summary file. This is
|
||||
\emph{only} a string and does not induce any unit conversion. All \udq{}
|
||||
evaluations are in terms of the corre deck units - irrespective of the \kw{UNIT}
|
||||
subcommand. Consider the following
|
||||
\begin{deck}
|
||||
RUNSPEC
|
||||
|
||||
FIELD
|
||||
|
||||
...
|
||||
...
|
||||
|
||||
SCHEDULE
|
||||
|
||||
UDQ
|
||||
DEFINE WUI WWIR - 100 /
|
||||
/
|
||||
\end{deck}
|
||||
|
||||
\begin{enumerate}
|
||||
\item The simulation runs in SI units; hence the water injection rate is
|
||||
calculated in $\mathrm{m^3/s}$.
|
||||
\item As part of the summary evaluation the \inlinecode{SummaryState} will
|
||||
contain the water injection rate converted to field units.
|
||||
\item The \udq{} variable \kw{WUI} is evaluated as the water injection rate from
|
||||
\inlinecode{SummaryState} subtracted numerical value 100, \emph{it is solely the users
|
||||
responsability that the numerical value 100 represents water injection rate in
|
||||
field units.}
|
||||
\end{enumerate}
|
||||
|
||||
Observe that the units are complicated, and non intuitive for \kw{UDA} values.
|
||||
The \kw{UDA} evaluation is based on the \inlinecode{SummaryState} class which is
|
||||
in deck units, the controls determined by \kw{UDA} evaluation must therefor be
|
||||
converted to SI units just when it is passed to the simulator. The initial
|
||||
design ambition was to block the deck units at the IO boundary, keeping the
|
||||
internals fully in SI. The \kw{UDA} concept is the exception which manages to
|
||||
inject deck units quite far into the code.
|
||||
|
||||
|
||||
\section{Implementation details}
|
||||
The significant part of the UDQ implementation is in classes located in
|
||||
\path{opm/input/eclipse/Schedule/UDQ}, in addition the restart output of
|
||||
\udq{}/\kw{UDA} values is in \path{opm/output/eclipse/AggregateUDQData.cpp}.
|
||||
Finally the \udq{} parser makes use of the type \inlinecode{RawString} to treat
|
||||
literal ``/'' and ``*'' different from ordinary parsing where ``/'' signifies
|
||||
end of line and ``*'' is either a default or part of a multiplier expression.
|
||||
|
||||
\subsection*{\inlinecode{UDQConfig}}
|
||||
The class \inlinecode{UDQConfig} internalizes the parsing of the \udq{} keywords
|
||||
from the input deck. The \inlinecode{UDQConfig} instance is time-versioned and
|
||||
managed by the \inlinecode{ScheduleState} class. The \inlinecode{UDQConfig} is
|
||||
immutable while the simulator is executing. The \inlinecode{UDQConfig} contains
|
||||
two main classes \inlinecode{UDQDefine} and \inlinecode{UDQAssign} in addition
|
||||
to book-keeping code to keep track of what type of expression a \udq{} keyword
|
||||
is at the time. A significant part of the book-keeping is only required to be
|
||||
able to output restart files in \eclipse{} format.
|
||||
|
||||
\subsection*{\inlinecode{UDQDefine} and \inlinecode{UDQASTNode}}
|
||||
The \inlinecode{UDQDefine} manages a parsed \udq{} expresssion along with a
|
||||
chunck of metadata. The parsed \udq{} expression is managed in an instance of
|
||||
\inlinecode{UDQASTNode}. The \inlinecode{UDQASTNode} contains a parsed tree
|
||||
representation of the \udq{} input expression. The parsing of \udq{} expressions
|
||||
happens at input time, and for the rest of the simulation the
|
||||
\inlinecode{UDQASTnode} instances are immutable.
|
||||
|
||||
Many scalar \udq{} types are defined in the file \path{UDQEenums.hpp} and in the
|
||||
namespace \inlinecode{UDQ} there are many small utility functions to work with
|
||||
these enums.
|
||||
|
||||
|
||||
\subsection*{\inlinecode{SummaryState}}
|
||||
\label{summarystate}
|
||||
The \inlinecode{SummaryState} class is not part of the \udq{} implementation,
|
||||
but it is a very important class for the \udq{} functionality. At the end of
|
||||
every timestep the simulator will call the method \inlinecode{evalSummary} which
|
||||
will call into opm-common and evaluate all summary variables and store them in a
|
||||
\inlinecode{SummaryState} instance\footnote{Observe that during initialization
|
||||
the \udq{} expressions are inspected, and we make sure that all summary
|
||||
variables needed to evaulate \udq{} expressions are evaluated in the Summary
|
||||
evaluation.}. The \inlinecode{SummaryState} class manages a set of maps with
|
||||
well, group and field variables, when evaluating e.g. the \kw{WOPR} the results
|
||||
will be stored in a two level map first indexed with keyword \kw{WOPR} and then
|
||||
with well name. Afterwards the \udq{} layer can fetch values with
|
||||
\inlinecode{SummaryState::get\_well\_var()}. The values in the
|
||||
\inlinecode{SummaryState} have been converted to output units, this is important
|
||||
for the \kw{UDA} evaluation.
|
||||
|
||||
At the end of every timestep the \inlinecode{UDQConfig::eval()} method is called
|
||||
to evaluate all the \udq{} expressions, the evaluated values will end up in the
|
||||
active \inlinecode{SummaryState} instance, i.e. for this \udq{}
|
||||
\begin{deck}
|
||||
UDQ
|
||||
DEFINE FUOPR SUM(WOPR) /
|
||||
DEFINE WUGWR WGPR / WWPR /
|
||||
/
|
||||
\end{deck}
|
||||
we will get \inlinecode{SummaryState} entries for \kw{FUOPR} and \kw{WUGWR} for
|
||||
\emph{all} wells in the model. These \inlinecode{SummaryState} values can then
|
||||
be output to the summary file, be used when evaluating \kw{ACTIONX} keywords or
|
||||
to evaluate \kw{UDA} control values.
|
||||
|
||||
In addition to the \inlinecode{SummaryState} variable there is an instance of
|
||||
type \inlinecode{UDQState} which is updated runtime, the \inlinecode{UDQState}
|
||||
instance holds on to the results of \udq{} evaluations with more context than
|
||||
\inlinecode{SummaryState} and is used to output \udq{} and \kw{UDA} state to the
|
||||
restart files. While evaluating the simulator will create a \kw{UDQContext}
|
||||
variable which will manage both the \inlinecode{SummaryState},
|
||||
\inlinecode{UDQState} and also some \udq{} parameters from the \kw{RUNSPEC}
|
||||
section. The lifetime of the \kw{UDQContext} instance is only one \udq{}
|
||||
evaluation.
|
||||
|
||||
While evaluating the \udq{} expressions the results will be instances of
|
||||
\inlinecode{UDQSet} which is a small container class which keeps track of
|
||||
well/group names and whether a value is defined or not. The \inlinecode{UDQSet}
|
||||
class overrides the arithmetic operators like \inlinecode{UDQSet::operator+()}
|
||||
so that expressions like \kw{2 * WOPR 'OP*'} can be easily evaluated in code.
|
||||
|
||||
\subsection*{Paralell awareness}
|
||||
\label{udq_parallel}
|
||||
The opm-common code where the \udq{} functionality is implemented is totally
|
||||
unaware of parallel execution, so to be certain that this works for a parallel
|
||||
simulator care must be taken. In flow this is handled as:
|
||||
\begin{enumerate}
|
||||
\item The \inlinecode{Schedule} class as a whole is identical on all
|
||||
processes.
|
||||
\item The state variables \inlinecode{UDQState} and \inlinecode{SummaryState}
|
||||
are distributed so they are equal on all processes before the \udq{}
|
||||
evaluation. This communication is performed in the simulator.
|
||||
\end{enumerate}
|
||||
The \udq{} evaluation is invoked from
|
||||
\path{opm-simulators/ebos/eclgenericwriter.cc} function
|
||||
\inlinecode{evalSummary()}.
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Module: opm-common
|
||||
Description: Open Porous Media Initiative shared infrastructure
|
||||
Version: 2021.10-pre
|
||||
Label: 2021.10-pre
|
||||
Version: 2022.04-pre
|
||||
Label: 2022.04-pre
|
||||
Maintainer: opm@opm-project.org
|
||||
MaintainerName: OPM community
|
||||
Url: http://opm-project.org
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
@@ -31,7 +32,6 @@
|
||||
|
||||
#include <opm/io/eclipse/ESmry.hpp>
|
||||
#include <opm/io/eclipse/EclUtil.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
|
||||
static void printHelp() {
|
||||
@@ -93,9 +93,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
#pragma omp parallel for
|
||||
for (int f = argOffset; f < argc; f ++){
|
||||
Opm::filesystem::path inputFileName = argv[f];
|
||||
std::filesystem::path inputFileName = argv[f];
|
||||
|
||||
Opm::filesystem::path esmryFileName = inputFileName.parent_path() / inputFileName.stem();
|
||||
std::filesystem::path esmryFileName = inputFileName.parent_path() / inputFileName.stem();
|
||||
esmryFileName = esmryFileName += ".ESMRY";
|
||||
|
||||
if (Opm::EclIO::fileExists(esmryFileName) && (force))
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <opm/msim/msim.hpp>
|
||||
@@ -51,8 +51,8 @@ int main(int /* argc */, char** argv) {
|
||||
error_guard.terminate();
|
||||
}
|
||||
|
||||
Opm::msim msim(state);
|
||||
Opm::msim msim(state, schedule);
|
||||
Opm::EclipseIO io(state, state.getInputGrid(), schedule, summary_config);
|
||||
msim.run(schedule, io, false);
|
||||
msim.run(io, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
#include <cstdlib>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
|
||||
|
||||
struct keyword {
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/OpmLog/StreamLog.hpp>
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/I.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/P.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>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/I.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/P.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/G.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
Opm::Deck pack_deck( const char * deck_file, std::ostream& os) {
|
||||
Opm::ParseContext parseContext(Opm::InputError::WARN);
|
||||
@@ -154,16 +154,14 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
using IMPORT = Opm::ParserKeywords::IMPORT;
|
||||
for (std::size_t import_index = 0; import_index < deck.count<IMPORT>(); import_index++) {
|
||||
const auto& import_keyword = deck.getKeyword<IMPORT>(import_index);
|
||||
for (const auto& import_keyword : deck.get<IMPORT>()) {
|
||||
const auto& fname = import_keyword.getRecord(0).getItem<IMPORT::FILE>().get<std::string>(0);
|
||||
copy_file(input_arg.parent_path(), fname, output_dir);
|
||||
}
|
||||
|
||||
|
||||
using PYACTION = Opm::ParserKeywords::PYACTION;
|
||||
for (std::size_t pyaction_index = 0; pyaction_index < deck.count<PYACTION>(); pyaction_index++) {
|
||||
const auto& pyaction_keyword = deck.getKeyword<PYACTION>(pyaction_index);
|
||||
for (const auto& pyaction_keyword : deck.get<PYACTION>()) {
|
||||
const auto& fname = pyaction_keyword.getRecord(1).getItem<PYACTION::FILENAME>().get<std::string>(0);
|
||||
copy_file(input_arg.parent_path(), fname, output_dir);
|
||||
}
|
||||
@@ -171,7 +169,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
using GDFILE = Opm::ParserKeywords::GDFILE;
|
||||
if (deck.hasKeyword<GDFILE>()) {
|
||||
const auto& gdfile_keyword = deck.getKeyword<GDFILE>();
|
||||
const auto& gdfile_keyword = deck.get<GDFILE>().back();
|
||||
const auto& fname = gdfile_keyword.getRecord(0).getItem<GDFILE::filename>().get<std::string>(0);
|
||||
copy_file(input_arg.parent_path(), fname, output_dir);
|
||||
}
|
||||
|
||||
@@ -18,28 +18,30 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <fmt/format.h>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/I.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/P.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/G.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/R.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/S.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>
|
||||
#include <opm/parser/eclipse/Deck/FileDeck.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/input/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/I.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/P.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/G.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/R.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/S.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Deck/FileDeck.hpp>
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
const std::unordered_set<std::string> remove_from_solution = {"EQUIL", "PRESSURE", "SWAT", "SGAS"};
|
||||
|
||||
@@ -63,7 +65,7 @@ output the program will update the SOLUTION and SCHEDULE sections. All keywords
|
||||
from the SOLUTION section will be cleared out(1) and a RESTART keyword will be
|
||||
inserted. In the SCHEDULE section the program can either remove all keywords up
|
||||
until the restart date, or alternatively insert SKIPREST immediately following
|
||||
the SCHEDULE keyword(2).
|
||||
the SCHEDULE keyword.
|
||||
|
||||
When creating the updated restart deck the program can either link to unmodified
|
||||
include files with INCLUDE statements, create a copy of deck structure in an
|
||||
@@ -76,9 +78,35 @@ Arguments:
|
||||
|
||||
1. The data file we are starting with.
|
||||
|
||||
2. The basename of the restart file - with an optional path prefix and a :N to
|
||||
restart from step N(3). A restart step value of 0 is interpreted as a dry run
|
||||
- a deck which has not been set up for restart will be written out.
|
||||
2. The restart source; this can either be a basename with an optional path
|
||||
prefix and a :N to restart from step N; alternatively you can point to an
|
||||
existing restart file. If you point to an existing restart file the input
|
||||
will be validated in several ways:
|
||||
|
||||
a) Unified/multiple files will be checked against the UNIFIN setting of
|
||||
the deck.
|
||||
|
||||
b) Formatted/unformatted will be checked against the FMTIn setting of the
|
||||
deck.
|
||||
|
||||
c) If a single file like /path/to/case/HISTORY.X0067 is given as argument the
|
||||
:N notation to denote report step should not be used.
|
||||
|
||||
If the restart argument is given as the path to an existing file the content
|
||||
of the RESTART keyword will be updated to contain the correct path from the
|
||||
location of the restart deck to the location of the restart file. This path
|
||||
awareness will be fooled if the restart deck is redirected from stdout to a
|
||||
path different from cwd. If the restart argument is given as an absolute
|
||||
filename the RESTART keyword will have an absolute path, if the restart
|
||||
argument is a relative path the RESTART keyword will get a relative path -
|
||||
although an absolute path will be used if the restart file and the output
|
||||
deck have different roots. If the restart argument is given as a string not
|
||||
pointing to an existing file it will be inserted verbatim in the restart
|
||||
deck.
|
||||
|
||||
A restart step value of 0 is interpreted as a dry run - a deck which has not
|
||||
been set up for restart will be written out.
|
||||
|
||||
|
||||
3. Basename of the restart deck we create, can optionally contain a path prefix;
|
||||
the path will be created if it does not already exist. This argument is
|
||||
@@ -91,7 +119,7 @@ Options:
|
||||
-s: Manipulate the SCHEDULE section by inserting a SKIPREST keyword immediately
|
||||
following the SCHEDULE keyword. If the -s option is not used the SCHEDULE
|
||||
section will be modified by removing all keywords until we reach the restart
|
||||
date. NB: Currently the -s option is required
|
||||
date.
|
||||
|
||||
-m: [share|inline|copy] The restart deck can reuse the unmodified include files
|
||||
from the base case, this is mode 'share' and is the default. With mode
|
||||
@@ -102,7 +130,7 @@ Options:
|
||||
In the case of 'share' and 'copy' the correct path to include files will be
|
||||
negotiated based on the path given to the output case in the third argument.
|
||||
If the restart deck is passed to stdout the include files will be resolved
|
||||
based on output in cwd.
|
||||
based on output in cwd.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -111,14 +139,6 @@ Example:
|
||||
1: The program has a compiled list of keywords which will be retained in the
|
||||
SOLUTION section. The current value of that list is: {}
|
||||
|
||||
2: Current version of the program *only* supports the SKIPREST option, and the
|
||||
-s option is required.
|
||||
|
||||
3: The second argument is treated purely as a string and inserted verbatim into
|
||||
the updated restart deck. In a future version we might interpret the second
|
||||
argument as a file path and check the content and also do filesystem
|
||||
manipulations from it.
|
||||
|
||||
)", keep_keywords);
|
||||
|
||||
std::cerr << help_text << std::endl;
|
||||
@@ -130,17 +150,19 @@ Example:
|
||||
|
||||
|
||||
|
||||
struct options {
|
||||
struct Options {
|
||||
std::string input_deck;
|
||||
std::pair<std::string, int> restart;
|
||||
std::optional<std::string> target;
|
||||
std::string restart_base;
|
||||
int restart_step;
|
||||
std::optional<std::string> target_path;
|
||||
std::optional<std::string> target_fname;
|
||||
|
||||
Opm::FileDeck::OutputMode mode{Opm::FileDeck::OutputMode::SHARE};
|
||||
bool skiprest{false};
|
||||
};
|
||||
|
||||
|
||||
Opm::FileDeck load_deck(const options& opt) {
|
||||
Opm::Deck load_deck(const Options& opt) {
|
||||
Opm::ParseContext parseContext(Opm::InputError::WARN);
|
||||
Opm::ErrorGuard errors;
|
||||
Opm::Parser parser;
|
||||
@@ -150,8 +172,7 @@ Opm::FileDeck load_deck(const options& opt) {
|
||||
parseContext.update(Opm::ParseContext::PARSE_MISSING_DIMS_KEYWORD, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_WELL, Opm::InputError::WARN);
|
||||
parseContext.update(Opm::ParseContext::SUMMARY_UNKNOWN_GROUP, Opm::InputError::WARN);
|
||||
auto deck = parser.parseFile(opt.input_deck, parseContext, errors);
|
||||
return Opm::FileDeck{ deck };
|
||||
return parser.parseFile(opt.input_deck, parseContext, errors);
|
||||
}
|
||||
|
||||
|
||||
@@ -169,17 +190,86 @@ Opm::FileDeck::OutputMode mode(const std::string& mode_arg) {
|
||||
return Opm::FileDeck::OutputMode::INLINE;
|
||||
}
|
||||
|
||||
std::pair<std::string, std::size_t> split_restart(const std::string& restart_base) {
|
||||
auto sep_pos = restart_base.rfind(':');
|
||||
if (sep_pos == std::string::npos)
|
||||
print_help_and_exit(fmt::format("Expected restart argument on the form: BASE:NUMBER - e.g. HISTORY:60"));
|
||||
std::optional<std::size_t> verify_extension(const std::string& extension, bool unified, bool formatted) {
|
||||
if (unified) {
|
||||
if (formatted) {
|
||||
if (extension == ".FUNRST")
|
||||
return std::nullopt;
|
||||
print_help_and_exit("Deck has specified formatted unified input - expected restart extension: .FUNRST");
|
||||
|
||||
return std::make_pair(restart_base.substr(0, sep_pos), std::stoi(restart_base.substr(sep_pos + 1)));
|
||||
}
|
||||
if (extension == ".UNRST")
|
||||
return std::nullopt;
|
||||
print_help_and_exit("Deck has expected unformatted unified input - expected restart extension: .UNRST");
|
||||
}
|
||||
|
||||
std::size_t report_step;
|
||||
if ((formatted && (extension[1] == 'F')) || (!formatted && (extension[1] == 'X'))) {
|
||||
try {
|
||||
report_step = std::stoi(extension.substr(2));
|
||||
return report_step;
|
||||
}
|
||||
catch (...) {}
|
||||
}
|
||||
print_help_and_exit("Deck has specified multiple input files - expected restart extension: .Xnnnn / .Fnnnn");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
options load_options(int argc, char **argv) {
|
||||
options opt;
|
||||
bool same_mount(const fs::path& p1, const fs::path& p2) {
|
||||
auto abs1 = fs::absolute(p1);
|
||||
auto abs2 = fs::absolute(p2);
|
||||
|
||||
auto iter1 = abs1.begin(); iter1++;
|
||||
auto iter2 = abs2.begin(); iter2++;
|
||||
|
||||
auto mnt1 = *iter1;
|
||||
auto mnt2 = *iter2;
|
||||
return (mnt1 == mnt2);
|
||||
}
|
||||
|
||||
|
||||
void update_restart_path(Options& opt, const std::string& restart_arg, const Opm::IOConfig& io_config) {
|
||||
std::string base;
|
||||
std::optional<std::size_t> rst_step;
|
||||
auto sep_pos = restart_arg.rfind(':');
|
||||
|
||||
auto base_arg = restart_arg.substr(0, sep_pos);
|
||||
if (fs::exists(base_arg)) {
|
||||
auto unif = io_config.getUNIFIN();
|
||||
auto fmt = io_config.getFMTIN();
|
||||
auto path = fs::path(base_arg);
|
||||
auto extension = path.extension();
|
||||
rst_step = verify_extension(extension, unif, fmt);
|
||||
if (path.is_absolute()) {
|
||||
path.replace_extension();
|
||||
base = path;
|
||||
} else {
|
||||
auto target_path = fs::current_path();
|
||||
if (opt.target_path.has_value())
|
||||
target_path = fs::path(opt.target_path.value());
|
||||
|
||||
if (same_mount(path, target_path))
|
||||
base = fs::relative(path, target_path).replace_extension();
|
||||
else
|
||||
base = fs::canonical(fs::absolute(path)).replace_extension();
|
||||
}
|
||||
} else
|
||||
base = base_arg;
|
||||
|
||||
if (!rst_step.has_value()) {
|
||||
if (sep_pos == std::string::npos)
|
||||
print_help_and_exit(fmt::format("Expected restart argument on the form: BASE:NUMBER - e.g. HISTORY:60"));
|
||||
rst_step = std::stoi(restart_arg.substr(sep_pos + 1));
|
||||
}
|
||||
|
||||
opt.restart_step = rst_step.value();
|
||||
opt.restart_base = base;
|
||||
}
|
||||
|
||||
|
||||
std::pair<Options, std::string> load_options(int argc, char **argv) {
|
||||
Options opt;
|
||||
while (true) {
|
||||
int c;
|
||||
c = getopt(argc, argv, "hm:s");
|
||||
@@ -204,11 +294,21 @@ options load_options(int argc, char **argv) {
|
||||
print_help_and_exit();
|
||||
|
||||
opt.input_deck = argv[arg_offset];
|
||||
opt.restart = split_restart(argv[arg_offset + 1]);
|
||||
std::string restart_arg = argv[arg_offset + 1];
|
||||
if ((argc - arg_offset) >= 3) {
|
||||
opt.target = argv[arg_offset + 2];
|
||||
auto target_arg = argv[arg_offset + 2];
|
||||
|
||||
if (fs::is_directory(target_arg)) {
|
||||
opt.target_path = target_arg;
|
||||
opt.target_fname = fs::path(opt.input_deck).filename();
|
||||
} else {
|
||||
auto target_path = fs::path( fs::absolute(target_arg) );
|
||||
opt.target_path = fs::absolute(target_path.parent_path());
|
||||
opt.target_fname = target_path.filename();
|
||||
}
|
||||
|
||||
if (opt.mode == Opm::FileDeck::OutputMode::COPY) {
|
||||
auto target = fs::path(opt.target.value()).parent_path();
|
||||
auto target = fs::path(target_arg).parent_path();
|
||||
if (fs::exists(target)) {
|
||||
auto input = fs::path(opt.input_deck).parent_path();
|
||||
if (fs::equivalent(target, input))
|
||||
@@ -220,13 +320,13 @@ options load_options(int argc, char **argv) {
|
||||
print_help_and_exit("When writing output to stdout you must use inline|share mode");
|
||||
}
|
||||
|
||||
return opt;
|
||||
return {opt, restart_arg};
|
||||
}
|
||||
|
||||
|
||||
void update_solution(const options& opt, Opm::FileDeck& file_deck)
|
||||
void update_solution(const Options& opt, Opm::FileDeck& file_deck)
|
||||
{
|
||||
if (opt.restart.second == 0)
|
||||
if (opt.restart_step == 0)
|
||||
return;
|
||||
|
||||
const auto solution = file_deck.find("SOLUTION");
|
||||
@@ -237,35 +337,33 @@ void update_solution(const options& opt, Opm::FileDeck& file_deck)
|
||||
if (!summary.has_value())
|
||||
print_help_and_exit(fmt::format("Could not find SUMMARY section in input deck: {}", opt.input_deck));
|
||||
|
||||
file_deck.rst_solution(opt.restart.first, opt.restart.second);
|
||||
file_deck.rst_solution(opt.restart_base, opt.restart_step);
|
||||
}
|
||||
|
||||
|
||||
void update_schedule(const options& opt, Opm::FileDeck& file_deck)
|
||||
void update_schedule(const Options& opt, Opm::FileDeck& file_deck)
|
||||
{
|
||||
if (opt.restart.second == 0)
|
||||
if (opt.restart_step == 0)
|
||||
return;
|
||||
|
||||
if (opt.skiprest)
|
||||
file_deck.insert_skiprest();
|
||||
else
|
||||
file_deck.skip(opt.restart_step);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
auto options = load_options(argc, argv);
|
||||
auto file_deck = load_deck(options);
|
||||
auto [options, restart_arg] = load_options(argc, argv);
|
||||
auto deck = load_deck(options);
|
||||
Opm::FileDeck file_deck(deck);
|
||||
|
||||
update_restart_path(options, restart_arg, Opm::IOConfig(deck));
|
||||
update_solution(options, file_deck);
|
||||
update_schedule(options, file_deck);
|
||||
if (!options.target.has_value())
|
||||
if (!options.target_path.has_value())
|
||||
file_deck.dump_stdout(fs::current_path(), options.mode);
|
||||
else {
|
||||
std::string target = options.target.value();
|
||||
if (fs::is_directory(target))
|
||||
file_deck.dump( fs::absolute(target), fs::path(options.input_deck).filename(), options.mode );
|
||||
else {
|
||||
auto target_path = fs::path( fs::absolute(options.target.value()) );
|
||||
file_deck.dump( fs::absolute(target_path.parent_path()), target_path.filename(), options.mode );
|
||||
}
|
||||
}
|
||||
else
|
||||
file_deck.dump( options.target_path.value(), options.target_fname.value(), options.mode);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,24 +17,24 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/OpmLog/StreamLog.hpp>
|
||||
#include <opm/common/OpmLog/LogUtil.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
|
||||
inline void createDot(const Opm::Schedule& schedule, const std::string& casename)
|
||||
@@ -85,6 +85,7 @@ inline void createDot(const Opm::Schedule& schedule, const std::string& casename
|
||||
}
|
||||
os << "}\n";
|
||||
std::cout << "complete." << std::endl;
|
||||
std::cout << "Convert output to PDF with 'dot -Tpdf " << casename << ".gv > " << casename << ".pdf'\n" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ int main(int argc, char** argv)
|
||||
for (int iarg = 1; iarg < argc; iarg++) {
|
||||
const std::string filename = argv[iarg];
|
||||
const auto sched = loadSchedule(filename);
|
||||
const auto casename = Opm::filesystem::path(filename).stem();
|
||||
const auto casename = std::filesystem::path(filename).stem();
|
||||
createDot(sched, casename);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
declare -A configurations
|
||||
|
||||
declare -A EXTRA_MODULE_FLAGS
|
||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON -DOPM_ENABLE_PYTHON=ON -DBUILD_FLOW_POLY_GRID=ON"
|
||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_FLOW_VARIANTS=ON -DOPM_ENABLE_PYTHON=ON -DBUILD_FLOW_POLY_GRID=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
|
||||
@@ -226,7 +226,7 @@ function build_module_full {
|
||||
PY_MINOR=`python3 --version | awk -F ' ' '{print $2}' | awk -F '.' '{print $2}'`
|
||||
for configuration in ${!configurations[@]}
|
||||
do
|
||||
export PYTHONPATH="$WORKSPACE/$configuration/install/lib/python$PY_MAJOR.$PY_MINOR/dist-packages"
|
||||
export PYTHONPATH="$WORKSPACE/$configuration/install/lib/python$PY_MAJOR.$PY_MINOR/site-packages"
|
||||
|
||||
# Build upstream modules
|
||||
build_upstreams
|
||||
|
||||
@@ -33,7 +33,7 @@ else
|
||||
then
|
||||
cp $OPM_TESTS_ROOT $WORKSPACE/deps/opm-tests -R
|
||||
pushd $WORKSPACE/deps/opm-tests
|
||||
echo "opmt-tests-revision: `git rev-parse HEAD`"
|
||||
echo "opm-tests-revision: `git rev-parse HEAD`"
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -22,6 +22,7 @@ upstreamRev[opm-grid]=master
|
||||
upstreamRev[opm-models]=master
|
||||
upstreamRev[opm-simulators]=master
|
||||
upstreamRev[opm-upscaling]=master
|
||||
upstreamRev[opm-tests]=master
|
||||
|
||||
# Setup revision tables
|
||||
parseRevisions
|
||||
@@ -43,6 +44,12 @@ done
|
||||
|
||||
# Do the commit
|
||||
export REASON
|
||||
if [ "${upstreamRev[opm-tests]}" == "master" ]
|
||||
then
|
||||
export BRANCH_BASE=origin/master
|
||||
else
|
||||
export BRANCH_BASE=${upstreamRev[opm-tests]}
|
||||
fi
|
||||
export BRANCH_NAME
|
||||
$WORKSPACE/deps/opm-simulators/tests/update_reference_data.sh $OPM_TESTS_ROOT $WORKSPACE/$configuration/build-opm-simulators $WORKSPACE/$configuration/install/bin/convertECL
|
||||
if test $? -eq 5
|
||||
|
||||
@@ -6,17 +6,19 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Schedule/SummaryState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Action/State.hpp>
|
||||
|
||||
#include <opm/output/data/Solution.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
#include <opm/parser/eclipse/Deck/UDAValue.hpp>
|
||||
#include <opm/input/eclipse/Deck/UDAValue.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -29,34 +31,36 @@ class SummaryState;
|
||||
class UDQState;
|
||||
class WellTestState;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
}
|
||||
|
||||
class msim {
|
||||
|
||||
public:
|
||||
using well_rate_function = double(const EclipseState&, const Schedule&, const SummaryState& st, const data::Solution&, size_t report_step, double seconds_elapsed);
|
||||
using solution_function = void(const EclipseState&, const Schedule&, data::Solution&, size_t report_step, double seconds_elapsed);
|
||||
|
||||
msim(const EclipseState& state);
|
||||
msim(const EclipseState& state, const Schedule& schedule_arg);
|
||||
|
||||
Opm::UDAValue uda_val();
|
||||
|
||||
void well_rate(const std::string& well, data::Rates::opt rate, std::function<well_rate_function> func);
|
||||
void solution(const std::string& field, std::function<solution_function> func);
|
||||
void run(Schedule& schedule, EclipseIO& io, bool report_only);
|
||||
void post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, const time_point& sim_time);
|
||||
void run(EclipseIO& io, bool report_only);
|
||||
void post_step(data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, const time_point& sim_time);
|
||||
|
||||
private:
|
||||
|
||||
void run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, EclipseIO& io) const;
|
||||
void run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const;
|
||||
void output(Action::State& action_state, WellTestState& wtest_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_data, EclipseIO& io) const;
|
||||
void simulate(const Schedule& schedule, WellTestState& wtest_state, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double seconds_elapsed, double time_step) const;
|
||||
void run_step(WellTestState& wtest_state, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, EclipseIO& io);
|
||||
void run_step(WellTestState& wtest_state, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io);
|
||||
void output(WellTestState& wtest_state, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_data, EclipseIO& io);
|
||||
void simulate(data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double seconds_elapsed, double time_step);
|
||||
|
||||
EclipseState state;
|
||||
std::map<std::string, std::map<data::Rates::opt, std::function<well_rate_function>>> well_rates;
|
||||
std::map<std::string, std::function<solution_function>> solutions;
|
||||
|
||||
public:
|
||||
Schedule schedule;
|
||||
Action::State action_state;
|
||||
SummaryState st;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -27,32 +27,30 @@
|
||||
#include <opm/output/data/Solution.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/State.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Action/ActionContext.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/msim/msim.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
msim::msim(const EclipseState& state_arg) :
|
||||
state(state_arg)
|
||||
msim::msim(const EclipseState& state_arg, const Schedule& schedule_arg)
|
||||
: state(state_arg)
|
||||
, schedule(schedule_arg)
|
||||
, st(TimeService::from_time_t(this->schedule.getStartTime()))
|
||||
{}
|
||||
|
||||
void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
void msim::run(EclipseIO& io, bool report_only) {
|
||||
const double week = 7 * 86400;
|
||||
data::Solution sol;
|
||||
SummaryState st(TimeService::from_time_t(schedule.getStartTime()));
|
||||
UDQState udq_state(schedule.getUDQConfig(0).params().undefinedValue());
|
||||
UDQState udq_state(this->schedule.getUDQConfig(0).params().undefinedValue());
|
||||
WellTestState wtest_state;
|
||||
Action::State action_state;
|
||||
Python python;
|
||||
|
||||
io.writeInitial();
|
||||
@@ -60,13 +58,13 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
data::Wells well_data;
|
||||
data::GroupAndNetworkValues group_nwrk_data;
|
||||
if (report_only)
|
||||
run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, io);
|
||||
run_step(wtest_state, udq_state, sol, well_data, group_nwrk_data, report_step, io);
|
||||
else {
|
||||
double time_step = std::min(week, 0.5*schedule.stepLength(report_step - 1));
|
||||
run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, group_nwrk_data, report_step, time_step, io);
|
||||
run_step(wtest_state, udq_state, sol, well_data, group_nwrk_data, report_step, time_step, io);
|
||||
}
|
||||
auto sim_time = TimeService::from_time_t( schedule.simTime(report_step) );
|
||||
post_step(schedule, action_state, st, sol, well_data, group_nwrk_data, report_step, sim_time);
|
||||
post_step(sol, well_data, group_nwrk_data, report_step, sim_time);
|
||||
const auto& exit_status = schedule.exitStatus();
|
||||
if (exit_status.has_value())
|
||||
return;
|
||||
@@ -78,33 +76,33 @@ UDAValue msim::uda_val() {
|
||||
}
|
||||
|
||||
|
||||
void msim::post_step(Schedule& schedule, Action::State& action_state, SummaryState& st, data::Solution& /* sol */, data::Wells& /* well_data */, data::GroupAndNetworkValues& /* grp_nwrk_data */, size_t report_step, const time_point& sim_time) {
|
||||
const auto& actions = schedule[report_step].actions.get();
|
||||
void msim::post_step(data::Solution& /* sol */, data::Wells& /* well_data */, data::GroupAndNetworkValues& /* grp_nwrk_data */, size_t report_step, const time_point& sim_time) {
|
||||
const auto& actions = this->schedule[report_step].actions.get();
|
||||
if (actions.empty())
|
||||
return;
|
||||
|
||||
Action::Context context( st , schedule[report_step].wlist_manager.get());
|
||||
Action::Context context( this->st , this->schedule[report_step].wlist_manager.get());
|
||||
|
||||
for (const auto& action : actions.pending(action_state, std::chrono::system_clock::to_time_t(sim_time))) {
|
||||
for (const auto& action : actions.pending(this->action_state, std::chrono::system_clock::to_time_t(sim_time))) {
|
||||
auto result = action->eval(context);
|
||||
if (result)
|
||||
schedule.applyAction(report_step, sim_time, *action, result, {});
|
||||
this->schedule.applyAction(report_step, *action, result.wells(), {});
|
||||
}
|
||||
|
||||
for (const auto& pyaction : actions.pending_python())
|
||||
pyaction->run(this->state, schedule, report_step, st);
|
||||
for (const auto& pyaction : actions.pending_python(this->action_state))
|
||||
this->schedule.runPyAction(report_step, *pyaction, this->action_state, this->state, this->st);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& grp_nwrk_data, size_t report_step, EclipseIO& io) const {
|
||||
this->run_step(schedule, action_state, wtest_state, st, udq_state, sol, well_data, grp_nwrk_data, report_step, schedule.stepLength(report_step - 1), io);
|
||||
void msim::run_step(WellTestState& wtest_state, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& grp_nwrk_data, size_t report_step, EclipseIO& io) {
|
||||
this->run_step(wtest_state, udq_state, sol, well_data, grp_nwrk_data, report_step, schedule.stepLength(report_step - 1), io);
|
||||
}
|
||||
|
||||
|
||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, WellTestState& wtest_state, SummaryState& st, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) const {
|
||||
double start_time = schedule.seconds(report_step - 1);
|
||||
double end_time = schedule.seconds(report_step);
|
||||
void msim::run_step(WellTestState& wtest_state, UDQState& udq_state, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& group_nwrk_data, size_t report_step, double dt, EclipseIO& io) {
|
||||
double start_time = this->schedule.seconds(report_step - 1);
|
||||
double end_time = this->schedule.seconds(report_step);
|
||||
double seconds_elapsed = start_time;
|
||||
|
||||
while (seconds_elapsed < end_time) {
|
||||
@@ -112,11 +110,11 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, WellT
|
||||
if ((seconds_elapsed + time_step) > end_time)
|
||||
time_step = end_time - seconds_elapsed;
|
||||
|
||||
this->simulate(schedule, wtest_state, st, sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
||||
this->simulate(sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
||||
|
||||
seconds_elapsed += time_step;
|
||||
|
||||
io.summary().eval(st,
|
||||
io.summary().eval(this->st,
|
||||
report_step,
|
||||
seconds_elapsed,
|
||||
well_data,
|
||||
@@ -126,11 +124,9 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, WellT
|
||||
{},
|
||||
{});
|
||||
|
||||
schedule.getUDQConfig( report_step ).eval(report_step, schedule.wellMatcher(report_step), st, udq_state);
|
||||
this->schedule.getUDQConfig( report_step ).eval(report_step, schedule.wellMatcher(report_step), this->st, udq_state);
|
||||
|
||||
this->output(action_state,
|
||||
wtest_state,
|
||||
st,
|
||||
this->output(wtest_state,
|
||||
udq_state,
|
||||
report_step,
|
||||
(seconds_elapsed < end_time),
|
||||
@@ -144,11 +140,11 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, WellT
|
||||
|
||||
|
||||
|
||||
void msim::output(Action::State& action_state, WellTestState& wtest_state, SummaryState& st, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_nwrk_data, EclipseIO& io) const {
|
||||
void msim::output(WellTestState& wtest_state, const UDQState& udq_state, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, const data::GroupAndNetworkValues& group_nwrk_data, EclipseIO& io) {
|
||||
RestartValue value(sol, well_data, group_nwrk_data, {});
|
||||
io.writeTimeStep(action_state,
|
||||
io.writeTimeStep(this->action_state,
|
||||
wtest_state,
|
||||
st,
|
||||
this->st,
|
||||
udq_state,
|
||||
report_step,
|
||||
substep,
|
||||
@@ -157,15 +153,15 @@ void msim::output(Action::State& action_state, WellTestState& wtest_state, Summa
|
||||
}
|
||||
|
||||
|
||||
void msim::simulate(const Schedule& schedule, WellTestState&, const SummaryState& st, data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& /* group_nwrk_data */, size_t report_step, double seconds_elapsed, double time_step) const {
|
||||
void msim::simulate(data::Solution& sol, data::Wells& well_data, data::GroupAndNetworkValues& /* group_nwrk_data */, size_t report_step, double seconds_elapsed, double time_step) {
|
||||
for (const auto& sol_pair : this->solutions) {
|
||||
auto func = sol_pair.second;
|
||||
func(this->state, schedule, sol, report_step, seconds_elapsed + time_step);
|
||||
func(this->state, this->schedule, sol, report_step, seconds_elapsed + time_step);
|
||||
}
|
||||
|
||||
for (const auto& well_pair : this->well_rates) {
|
||||
const std::string& well_name = well_pair.first;
|
||||
const auto& sched_well = schedule.getWell(well_name, report_step);
|
||||
const auto& sched_well = this->schedule.getWell(well_name, report_step);
|
||||
bool well_open = (sched_well.getStatus() == Well::Status::OPEN);
|
||||
|
||||
data::Well& well = well_data[well_name];
|
||||
@@ -174,7 +170,7 @@ void msim::simulate(const Schedule& schedule, WellTestState&, const SummaryState
|
||||
auto func = rate_pair.second;
|
||||
|
||||
if (well_open)
|
||||
well.rates.set(rate, func(this->state, schedule, st, sol, report_step, seconds_elapsed + time_step));
|
||||
well.rates.set(rate, func(this->state, this->schedule, this->st, sol, report_step, seconds_elapsed + time_step));
|
||||
else
|
||||
well.rates.set(rate, 0.0);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef ACTIVEGRIDCELLS_HPP
|
||||
#define ACTIVEGRIDCELLS_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/GridDims.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
|
||||
@@ -19,31 +19,15 @@
|
||||
#ifndef OPM_FILESYSTEM_HPP
|
||||
#define OPM_FILESYSTEM_HPP
|
||||
|
||||
#if __cplusplus < 201703L || \
|
||||
(defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__))
|
||||
#include <experimental/filesystem>
|
||||
#else
|
||||
#include <filesystem>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
#if __cplusplus < 201703L || \
|
||||
(defined(__GNUC__) && __GNUC__ < 8 && !defined(__clang__))
|
||||
namespace filesystem = std::experimental::filesystem;
|
||||
filesystem::path proximate(const filesystem::path& p,
|
||||
const filesystem::path& base = filesystem::current_path());
|
||||
#else
|
||||
namespace filesystem = std::filesystem;
|
||||
using filesystem::proximate;
|
||||
#endif
|
||||
|
||||
// A poor man's filesystem::unique_path
|
||||
std::string unique_path(const std::string& input);
|
||||
|
||||
} // end namespace Opm
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckRecord.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
0
opm/common/utility/numeric/calculateCellVol.hpp
Executable file → Normal file
0
opm/common/utility/numeric/calculateCellVol.hpp
Executable file → Normal file
37
opm/common/utility/shmatch.hpp
Normal file
37
opm/common/utility/shmatch.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2022 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_UTILITY_SHMATCH_HPP
|
||||
#define OPM_UTILITY_SHMATCH_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/*
|
||||
The shmatch() function is an implementation of the shell matching algorithm
|
||||
used in posix function fnmatch(). It is implemented here based on std::regex
|
||||
to avoid using a posix function.
|
||||
*/
|
||||
|
||||
bool shmatch(const std::string& pattern, const std::string& symbol);
|
||||
|
||||
|
||||
}
|
||||
#endif //OPM_UTILITY_STRING_HPP
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef DECK_HPP
|
||||
#define DECK_HPP
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
@@ -27,9 +28,10 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckTree.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckView.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckTree.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/input/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
#ifdef OPM_PARSER_DECK_API_WARNING
|
||||
#ifndef OPM_PARSER_DECK_API
|
||||
@@ -56,81 +58,14 @@ namespace Opm {
|
||||
*/
|
||||
class DeckOutput;
|
||||
|
||||
class DeckView {
|
||||
|
||||
|
||||
class Deck {
|
||||
public:
|
||||
typedef std::vector< DeckKeyword >::const_iterator const_iterator;
|
||||
|
||||
bool hasKeyword( const DeckKeyword& keyword ) const;
|
||||
bool hasKeyword( const std::string& keyword ) const;
|
||||
template< class Keyword >
|
||||
bool hasKeyword() const {
|
||||
return hasKeyword( Keyword::keywordName );
|
||||
}
|
||||
|
||||
const DeckKeyword& getKeyword( const std::string& keyword, size_t index ) const;
|
||||
const DeckKeyword& getKeyword( const std::string& keyword ) const;
|
||||
const DeckKeyword& getKeyword( size_t index ) const;
|
||||
|
||||
const DeckKeyword& operator[](std::size_t index) const;
|
||||
DeckKeyword& getKeyword( size_t index );
|
||||
template< class Keyword >
|
||||
const DeckKeyword& getKeyword() const {
|
||||
return getKeyword( Keyword::keywordName );
|
||||
}
|
||||
template< class Keyword >
|
||||
const DeckKeyword& getKeyword( size_t index ) const {
|
||||
return getKeyword( Keyword::keywordName, index );
|
||||
}
|
||||
template< class Keyword >
|
||||
std::size_t count() const {
|
||||
return count( Keyword::keywordName );
|
||||
}
|
||||
|
||||
const std::vector< const DeckKeyword* > getKeywordList( const std::string& keyword ) const;
|
||||
template< class Keyword >
|
||||
const std::vector< const DeckKeyword* > getKeywordList() const {
|
||||
return getKeywordList( Keyword::keywordName );
|
||||
}
|
||||
|
||||
size_t count(const std::string& keyword) const;
|
||||
size_t size() const;
|
||||
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
|
||||
|
||||
protected:
|
||||
void add( const DeckKeyword*, const_iterator, const_iterator );
|
||||
|
||||
const std::vector< size_t >& offsets( const std::string& ) const;
|
||||
|
||||
DeckView( const_iterator first, const_iterator last );
|
||||
explicit DeckView( std::pair< const_iterator, const_iterator > );
|
||||
DeckView() = default;
|
||||
void init( const_iterator, const_iterator );
|
||||
|
||||
private:
|
||||
const_iterator first;
|
||||
const_iterator last;
|
||||
std::map< std::string, std::vector< size_t > > keywordMap;
|
||||
|
||||
};
|
||||
|
||||
class Deck : private DeckView {
|
||||
public:
|
||||
using DeckView::const_iterator;
|
||||
using DeckView::hasKeyword;
|
||||
using DeckView::getKeyword;
|
||||
using DeckView::getKeywordList;
|
||||
using DeckView::count;
|
||||
using DeckView::size;
|
||||
using DeckView::begin;
|
||||
using DeckView::end;
|
||||
using DeckView::operator[];
|
||||
|
||||
using iterator = std::vector< DeckKeyword >::iterator;
|
||||
using const_iterator = std::vector< DeckKeyword >::const_iterator;
|
||||
|
||||
Deck();
|
||||
Deck() = default;
|
||||
Deck( const Deck& );
|
||||
Deck( Deck&& );
|
||||
|
||||
@@ -142,8 +77,6 @@ namespace Opm {
|
||||
void addKeyword( DeckKeyword&& keyword );
|
||||
void addKeyword( const DeckKeyword& keyword );
|
||||
|
||||
DeckKeyword& getKeyword( size_t );
|
||||
|
||||
const UnitSystem& getDefaultUnitSystem() const;
|
||||
const UnitSystem& getActiveUnitSystem() const;
|
||||
UnitSystem& getActiveUnitSystem();
|
||||
@@ -163,6 +96,22 @@ namespace Opm {
|
||||
iterator end();
|
||||
void write( DeckOutput& output ) const ;
|
||||
friend std::ostream& operator<<(std::ostream& os, const Deck& deck);
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
|
||||
Opm::DeckView operator[](const std::string& keyword) const;
|
||||
const DeckKeyword& operator[](std::size_t index) const;
|
||||
|
||||
template< class Keyword >
|
||||
Opm::DeckView get() const {
|
||||
return this->operator[](Keyword::keywordName);
|
||||
}
|
||||
|
||||
std::vector< const DeckKeyword* > getKeywordList( const std::string& keyword ) const;
|
||||
template< class Keyword >
|
||||
std::vector< const DeckKeyword* > getKeywordList() const {
|
||||
return getKeywordList( Keyword::keywordName );
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
@@ -173,21 +122,42 @@ namespace Opm {
|
||||
serializer(m_dataFile);
|
||||
serializer(input_path);
|
||||
serializer(unit_system_access_count);
|
||||
if (!serializer.isSerializing())
|
||||
this->init(this->keywordList.begin(), this->keywordList.end());
|
||||
}
|
||||
|
||||
bool hasKeyword( const std::string& keyword ) const;
|
||||
|
||||
template< class Keyword >
|
||||
bool hasKeyword() const {
|
||||
return this->hasKeyword( Keyword::keywordName );
|
||||
}
|
||||
|
||||
|
||||
|
||||
const std::vector<std::size_t> index(const std::string& keyword) const {
|
||||
return this->global_view().index(keyword);
|
||||
}
|
||||
|
||||
template< class Keyword >
|
||||
std::size_t count() const {
|
||||
return count( Keyword::keywordName );
|
||||
}
|
||||
size_t count(const std::string& keyword) const;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Deck(std::vector<DeckKeyword>&& keywordList);
|
||||
|
||||
std::vector< DeckKeyword > keywordList;
|
||||
UnitSystem defaultUnits;
|
||||
std::unique_ptr<UnitSystem> activeUnits;
|
||||
std::optional<UnitSystem> activeUnits;
|
||||
|
||||
std::optional<std::string> m_dataFile;
|
||||
std::string input_path;
|
||||
DeckTree file_tree;
|
||||
mutable std::size_t unit_system_access_count = 0;
|
||||
|
||||
const DeckView& global_view() const;
|
||||
mutable std::unique_ptr<DeckView> m_global_view{nullptr};
|
||||
};
|
||||
}
|
||||
#endif /* DECK_HPP */
|
||||
@@ -25,10 +25,10 @@
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
#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>
|
||||
#include <opm/input/eclipse/Units/Dimension.hpp>
|
||||
#include <opm/input/eclipse/Utility/Typetools.hpp>
|
||||
#include <opm/input/eclipse/Deck/UDAValue.hpp>
|
||||
#include <opm/input/eclipse/Deck/value_status.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -113,7 +113,7 @@ 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 -
|
||||
itrespective of whether they have been set explicitly or
|
||||
irrespective of whether they have been set explicitly or
|
||||
have been defaulted.
|
||||
*/
|
||||
bool equal(const DeckItem& other, bool cmp_default, bool cmp_numeric) const;
|
||||
@@ -130,6 +130,7 @@ namespace Opm {
|
||||
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 >(); };
|
||||
bool is_raw_string() { return type == get_type< RawString >(); };
|
||||
|
||||
UDAValue& get_uda() { return uval[0]; };
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/Deck/value_status.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/input/eclipse/Deck/value_status.hpp>
|
||||
#include <opm/common/OpmLog/KeywordLocation.hpp>
|
||||
|
||||
namespace Opm {
|
||||
@@ -77,8 +77,8 @@ namespace Opm {
|
||||
void write_TITLE( DeckOutput& output ) const;
|
||||
|
||||
template <class Keyword>
|
||||
bool isKeyword() const {
|
||||
if (Keyword::keywordName == m_keywordName)
|
||||
bool is() const {
|
||||
if (Keyword::keywordName == this->m_keywordName)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckItem.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace Opm {
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
|
||||
void write(DeckOutput& writer) const;
|
||||
void write_data(DeckOutput& writer) const;
|
||||
void write(DeckOutput& writer, std::size_t item_offset = 0) const;
|
||||
void write_data(DeckOutput& writer, std::size_t item_offset = 0) const;
|
||||
friend std::ostream& operator<<(std::ostream& os, const DeckRecord& record);
|
||||
|
||||
bool equal(const DeckRecord& other, bool cmp_default, bool cmp_numeric) const;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -43,7 +43,6 @@ enum class Section {
|
||||
|
||||
class DeckSection : public DeckView {
|
||||
public:
|
||||
using DeckView::const_iterator;
|
||||
|
||||
DeckSection( const Deck& deck, const std::string& startKeyword );
|
||||
const std::string& name() const;
|
||||
@@ -64,6 +63,46 @@ class DeckSection : public DeckView {
|
||||
const Parser&,
|
||||
bool ensureKeywordSectionAffiliation = false);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Highly deprecated shims
|
||||
const DeckKeyword& getKeyword(const std::string& keyword, std::size_t index) const {
|
||||
auto view = this->operator[](keyword);
|
||||
return view[index];
|
||||
}
|
||||
|
||||
const DeckKeyword& getKeyword(const std::string& keyword) const {
|
||||
auto view = this->operator[](keyword);
|
||||
return view.back();
|
||||
}
|
||||
|
||||
|
||||
std::vector<const DeckKeyword*> getKeywordList(const std::string& keyword) const {
|
||||
std::vector<const DeckKeyword*> kw_list;
|
||||
auto view = this->operator[](keyword);
|
||||
for (const auto& kw : view)
|
||||
kw_list.push_back(&kw);
|
||||
return kw_list;
|
||||
}
|
||||
|
||||
template <class Keyword>
|
||||
std::vector<const DeckKeyword*> getKeywordList() const {
|
||||
return this->getKeywordList(Keyword::keywordName);
|
||||
}
|
||||
|
||||
|
||||
bool hasKeyword(const std::string& keyword) const {
|
||||
return this->has_keyword(keyword);
|
||||
}
|
||||
|
||||
template <class Keyword>
|
||||
bool hasKeyword() const {
|
||||
return this->has_keyword(Keyword::keywordName);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
private:
|
||||
std::string section_name;
|
||||
const UnitSystem& units;
|
||||
@@ -72,49 +111,41 @@ class DeckSection : public DeckView {
|
||||
|
||||
class RUNSPECSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit RUNSPECSection(const Deck& deck) : DeckSection(deck, "RUNSPEC") {}
|
||||
};
|
||||
|
||||
class GRIDSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit GRIDSection(const Deck& deck) : DeckSection(deck, "GRID") {}
|
||||
};
|
||||
|
||||
class EDITSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit EDITSection(const Deck& deck) : DeckSection(deck, "EDIT") {}
|
||||
};
|
||||
|
||||
class PROPSSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit PROPSSection(const Deck& deck) : DeckSection(deck, "PROPS") {}
|
||||
};
|
||||
|
||||
class REGIONSSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit REGIONSSection(const Deck& deck) : DeckSection(deck, "REGIONS") {}
|
||||
};
|
||||
|
||||
class SOLUTIONSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit SOLUTIONSection(const Deck& deck) : DeckSection(deck, "SOLUTION") {}
|
||||
};
|
||||
|
||||
class SUMMARYSection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit SUMMARYSection(const Deck& deck) : DeckSection(deck, "SUMMARY") {}
|
||||
};
|
||||
|
||||
class SCHEDULESection : public DeckSection {
|
||||
public:
|
||||
using DeckSection::const_iterator;
|
||||
explicit SCHEDULESection(const Deck& deck) : DeckSection(deck, "SCHEDULE") {}
|
||||
};
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <optional>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/Utility/Typetools.hpp>
|
||||
#include <opm/input/eclipse/Utility/Typetools.hpp>
|
||||
#include <opm/input/eclipse/Deck/UDAValue.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -33,7 +34,8 @@ class DeckValue {
|
||||
explicit DeckValue(int);
|
||||
explicit DeckValue(double);
|
||||
explicit DeckValue(const std::string&);
|
||||
|
||||
explicit DeckValue(const UDAValue&);
|
||||
|
||||
bool is_default() const;
|
||||
|
||||
template<typename T>
|
||||
@@ -48,7 +50,8 @@ class DeckValue {
|
||||
type_tag value_enum;
|
||||
int int_value;
|
||||
double double_value;
|
||||
std::string string_value;
|
||||
std::string string_value;
|
||||
UDAValue uda_value;
|
||||
|
||||
};
|
||||
|
||||
91
opm/input/eclipse/Deck/DeckView.hpp
Normal file
91
opm/input/eclipse/Deck/DeckView.hpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
Copyright 2021 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 DECKVIEW_HPP
|
||||
#define DECKVIEW_HPP
|
||||
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
||||
class DeckView {
|
||||
public:
|
||||
typedef std::vector<std::reference_wrapper<const DeckKeyword>> storage_type;
|
||||
|
||||
|
||||
struct Iterator : public storage_type::iterator {
|
||||
Iterator(storage_type::const_iterator inner_iter) :
|
||||
inner(inner_iter)
|
||||
{}
|
||||
|
||||
const DeckKeyword& operator*() { return this->inner->get(); }
|
||||
const DeckKeyword* operator->() { return &this->inner->get(); }
|
||||
|
||||
Iterator& operator++() { ++this->inner; return *this; }
|
||||
Iterator operator++(int) { auto tmp = *this; ++this->inner; return tmp; }
|
||||
|
||||
|
||||
Iterator& operator--() { --this->inner; return *this; }
|
||||
Iterator operator--(int) { auto tmp = *this; --this->inner; return tmp; }
|
||||
|
||||
Iterator::difference_type operator-(const Iterator &other) { return this->inner - other.inner; }
|
||||
Iterator operator+(Iterator::difference_type shift) { Iterator tmp = *this; tmp.inner += shift; return tmp;}
|
||||
|
||||
friend bool operator== (const Iterator& a, const Iterator& b) { return a.inner == b.inner; };
|
||||
friend bool operator!= (const Iterator& a, const Iterator& b) { return a.inner != b.inner; };
|
||||
private:
|
||||
storage_type::const_iterator inner;
|
||||
};
|
||||
|
||||
Iterator begin() const { return Iterator(this->keywords.begin()); }
|
||||
Iterator end() const { return Iterator(this->keywords.end()); }
|
||||
|
||||
const DeckKeyword& operator[](std::size_t index) const;
|
||||
DeckView operator[](const std::string& keyword) const;
|
||||
std::vector<std::size_t> index(const std::string& keyword) const;
|
||||
std::size_t count(const std::string& keyword) const;
|
||||
const DeckKeyword& front() const;
|
||||
const DeckKeyword& back() const;
|
||||
|
||||
DeckView() = default;
|
||||
void add_keyword(const DeckKeyword& kw);
|
||||
bool has_keyword(const std::string& kw) const;
|
||||
bool empty() const;
|
||||
std::size_t size() const;
|
||||
|
||||
template<class Keyword>
|
||||
bool has_keyword() const {
|
||||
return this->has_keyword( Keyword::keywordName );
|
||||
}
|
||||
|
||||
template<class Keyword>
|
||||
DeckView get() const {
|
||||
return this->operator[](Keyword::keywordName);
|
||||
}
|
||||
|
||||
private:
|
||||
storage_type keywords;
|
||||
std::unordered_map<std::string, std::vector<std::size_t>> keyword_index;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -23,15 +23,15 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/FileDeck.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/input/eclipse/Deck/FileDeck.hpp>
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
@@ -39,7 +39,7 @@ class Deck;
|
||||
class FileDeck {
|
||||
public:
|
||||
static const std::unordered_set<std::string> rst_keep_in_solution;
|
||||
|
||||
static const std::unordered_set<std::string> rst_keep_in_schedule;
|
||||
|
||||
enum class OutputMode {
|
||||
INLINE = 1,
|
||||
@@ -66,7 +66,7 @@ struct Index {
|
||||
bool operator==(const Index& other) const;
|
||||
bool operator!=(const Index& other) const;
|
||||
bool operator<(const Index& other) const;
|
||||
|
||||
Index operator+(std::size_t shift) const;
|
||||
|
||||
private:
|
||||
const FileDeck * deck;
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
explicit Block(const std::string& filename);
|
||||
std::size_t size() const;
|
||||
void load(const Deck& deck, std::size_t deck_index);
|
||||
std::optional<std::size_t> find(const std::string& keyword) const;
|
||||
std::optional<std::size_t> find(const std::string& keyword, std::size_t keyword_index) const;
|
||||
bool empty() const;
|
||||
void erase(const FileDeck::Index& index);
|
||||
void insert(std::size_t keyword_index, const DeckKeyword& keyword);
|
||||
@@ -94,7 +94,9 @@ friend FileDeck;
|
||||
|
||||
|
||||
explicit FileDeck(const Deck& deck);
|
||||
std::optional<Index> find(const std::string& keyword, const Index& offset) const;
|
||||
std::optional<Index> find(const std::string& keyword) const;
|
||||
std::size_t count(const std::string& keyword) const;
|
||||
void erase(const Index& index);
|
||||
void erase(const Index& begin, const Index& end);
|
||||
void insert(const Index& index, const DeckKeyword& keyword);
|
||||
@@ -107,6 +109,7 @@ friend FileDeck;
|
||||
|
||||
void rst_solution(const std::string& rst_base, int report_step);
|
||||
void insert_skiprest();
|
||||
void skip(int report_step);
|
||||
|
||||
private:
|
||||
std::vector<Block> blocks;
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
|
||||
#include <opm/parser/eclipse/Units/Dimension.hpp>
|
||||
#include <opm/input/eclipse/Units/Dimension.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -91,6 +91,9 @@ public:
|
||||
dim.serializeOp(serializer);
|
||||
}
|
||||
|
||||
void operator*=(double rhs);
|
||||
|
||||
|
||||
private:
|
||||
bool numeric_value;
|
||||
double double_value;
|
||||
@@ -26,7 +26,7 @@
|
||||
implement the analytical aquifer models in OPM Flow.
|
||||
*/
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <unordered_map>
|
||||
@@ -20,10 +20,10 @@
|
||||
#ifndef OPM_AUQIFER_CONFIG_HPP
|
||||
#define OPM_AUQIFER_CONFIG_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/Aquancon.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/Aquifetp.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/AquiferCT.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/Aquancon.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/Aquifetp.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/AquiferCT.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef OPM_NUMERICALAQUIFERCONNECTION_HPP
|
||||
#define OPM_NUMERICALAQUIFERCONNECTION_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <map>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferConnection.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class NNC;
|
||||
@@ -20,8 +20,8 @@
|
||||
#ifndef OPM_ECLIPSE_CONFIG_HPP
|
||||
#define OPM_ECLIPSE_CONFIG_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -24,19 +24,19 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/AquiferConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/TracerConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/MICPpara.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>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/AquiferConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/TracerConfig.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/MICPpara.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaultCollection.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/NNC.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/TransMult.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
||||
#include <opm/input/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
@@ -75,8 +75,8 @@ namespace Opm {
|
||||
virtual const EclipseGrid& getInputGrid() const;
|
||||
|
||||
const FaultCollection& getFaults() const;
|
||||
const MICPpara& getMicppara() const;
|
||||
const TransMult& getTransMult() const;
|
||||
TransMult& getTransMult();
|
||||
|
||||
/// non-neighboring connections
|
||||
/// the non-standard adjacencies as specified in input deck
|
||||
@@ -102,7 +102,7 @@ namespace Opm {
|
||||
|
||||
std::string getTitle() const;
|
||||
|
||||
void apply_geo_keywords(const std::vector<DeckKeyword>& keywords);
|
||||
void apply_schedule_keywords(const std::vector<DeckKeyword>& keywords);
|
||||
|
||||
const Runspec& runspec() const;
|
||||
const AquiferConfig& aquifer() const;
|
||||
@@ -137,7 +137,7 @@ namespace Opm {
|
||||
|
||||
private:
|
||||
void initIOConfigPostSchedule(const Deck& deck);
|
||||
void initTransMult();
|
||||
void applyMULTXYZ();
|
||||
void initFaults(const Deck& deck);
|
||||
void initPara(const Deck& deck);
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/Box.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/Box.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
|
||||
/*
|
||||
This class implements a simple book keeping system for the current
|
||||
@@ -17,21 +17,20 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef OPM_PARSER_ECLIPSE_GRID_HPP
|
||||
#define OPM_PARSER_ECLIPSE_GRID_HPP
|
||||
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/MapAxes.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/GridDims.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/MapAxes.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/MinpvMode.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/PinchMode.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -88,6 +87,10 @@ namespace Opm {
|
||||
size_t activeIndex(size_t i, size_t j, size_t k) const;
|
||||
size_t activeIndex(size_t globalIndex) const;
|
||||
|
||||
size_t getActiveIndex(size_t i, size_t j, size_t k) const {
|
||||
return activeIndex(i, j, k);
|
||||
}
|
||||
|
||||
void save(const std::string& filename, bool formatted, const std::vector<Opm::NNCdata>& nnc, const Opm::UnitSystem& units) const;
|
||||
/*
|
||||
Observe that the there is a getGlobalIndex(i,j,k)
|
||||
@@ -164,6 +167,23 @@ namespace Opm {
|
||||
std::array<double, 3> getCellDims(size_t globalIndex) const;
|
||||
bool cellActive( size_t globalIndex ) const;
|
||||
bool cellActive( size_t i , size_t j, size_t k ) const;
|
||||
|
||||
std::array<double, 3> getCellDimensions(size_t i, size_t j, size_t k) const {
|
||||
return getCellDims(i, j, k);
|
||||
}
|
||||
|
||||
bool isCellActive(size_t i, size_t j, size_t k) const {
|
||||
return cellActive(i, j, k);
|
||||
}
|
||||
|
||||
/// Whether or not given cell has a valid cell geometry
|
||||
///
|
||||
/// Valid geometry is defined as all vertices have finite
|
||||
/// coordinates and at least one pair of coordinates are separated
|
||||
/// by a physical distance along a pillar.
|
||||
bool isValidCellGeomtry(const std::size_t globalIndex,
|
||||
const UnitSystem& usys) const;
|
||||
|
||||
double getCellDepth(size_t i,size_t j, size_t k) const;
|
||||
double getCellDepth(size_t globalIndex) const;
|
||||
ZcornMapper zcornMapper() const;
|
||||
@@ -316,7 +336,4 @@ namespace Opm {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // OPM_PARSER_ECLIPSE_GRID_HPP
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaultFace.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/Fault.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Util/OrderedMap.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/Fault.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#ifndef FIELD_DATA_HPP
|
||||
#define FIELD_DATA_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/Box.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/Keywords.hpp>
|
||||
#include <opm/parser/eclipse/Deck/value_status.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/Box.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/Keywords.hpp>
|
||||
#include <opm/input/eclipse/Deck/value_status.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -22,13 +22,14 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/TranCalculator.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FieldData.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/TranCalculator.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FieldData.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class EclipseGrid;
|
||||
class Deck;
|
||||
class DeckKeyword;
|
||||
class FieldProps;
|
||||
class Phases;
|
||||
class TableManager;
|
||||
@@ -47,6 +48,12 @@ public:
|
||||
virtual std::vector<int> actnum() const;
|
||||
virtual std::vector<double> porv(bool global = false) const;
|
||||
|
||||
|
||||
void apply_schedule_keywords(const std::vector<DeckKeyword>& keywords);
|
||||
|
||||
/// \brief Whether we can call methods on the manager
|
||||
bool is_usable() 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
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef OPM_PARSER_MULTREGTSCANNER_HPP
|
||||
#define OPM_PARSER_MULTREGTSCANNER_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Grid/MULTREGTScanner.hpp>
|
||||
|
||||
namespace Opm {
|
||||
template< typename > class GridProperty;
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef OPM_FOAMCONFIG_HPP
|
||||
#define OPM_FOAMCONFIG_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Runspec.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user