Compare commits
836 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e413a3aa7 | ||
|
|
3b2d650f8d | ||
|
|
8d123ea7ab | ||
|
|
0dff883914 | ||
|
|
a26b69e91e | ||
|
|
ae8baba566 | ||
|
|
60d5cd2c70 | ||
|
|
ae5c09243a | ||
|
|
60963e2310 | ||
|
|
7b23110ccc | ||
|
|
aaed77da09 | ||
|
|
fa77a72e61 | ||
|
|
64d0db7a26 | ||
|
|
82b112305e | ||
|
|
e101020f33 | ||
|
|
117c9179fa | ||
|
|
1e0c65163b | ||
|
|
05e449440a | ||
|
|
dcaf86e443 | ||
|
|
e451babec7 | ||
|
|
0c8f270723 | ||
|
|
79a856ab20 | ||
|
|
55ac8ff824 | ||
|
|
0c2645154f | ||
|
|
9a866a8a10 | ||
|
|
d3ccb820af | ||
|
|
06fd01c6ba | ||
|
|
ee92f53b72 | ||
|
|
7a1869fa60 | ||
|
|
af253dde47 | ||
|
|
4d72677b57 | ||
|
|
b440860478 | ||
|
|
c5267ad7e6 | ||
|
|
c56165b2d0 | ||
|
|
178fd6462c | ||
|
|
f1c51b549a | ||
|
|
7f24433337 | ||
|
|
f7b09380d4 | ||
|
|
bc6e2b268a | ||
|
|
139e988598 | ||
|
|
5bd7b61075 | ||
|
|
e41a8dfbf1 | ||
|
|
69e0a49e55 | ||
|
|
b317e1e8d8 | ||
|
|
ac6a8f91d6 | ||
|
|
a5ee46c195 | ||
|
|
60f0c3f260 | ||
|
|
c202ccfb46 | ||
|
|
d840b72ed5 | ||
|
|
52dde24faf | ||
|
|
b39cf81142 | ||
|
|
04bbb164d9 | ||
|
|
72e4f5f774 | ||
|
|
3ac75ed2fc | ||
|
|
687d98aeea | ||
|
|
de0d603215 | ||
|
|
f1cdcdb0e9 | ||
|
|
f2a98d2a8b | ||
|
|
0a266f460d | ||
|
|
5f0177e275 | ||
|
|
fe2a3f5203 | ||
|
|
b3befa57fe | ||
|
|
75ee817fed | ||
|
|
0c7dc81814 | ||
|
|
c2e8eabc2f | ||
|
|
c240581785 | ||
|
|
d2b221da64 | ||
|
|
d78cdfbe7f | ||
|
|
d4baf44e1b | ||
|
|
d05f152100 | ||
|
|
75d05312b7 | ||
|
|
2e6daf088b | ||
|
|
e1b9602a25 | ||
|
|
0074364560 | ||
|
|
72ba5b8d36 | ||
|
|
c6dc9277c5 | ||
|
|
a1f924baec | ||
|
|
0e0c72edd5 | ||
|
|
4aea8cd584 | ||
|
|
3ca639e2dd | ||
|
|
bffa3a3768 | ||
|
|
cd1c40dbcb | ||
|
|
fad9305cdc | ||
|
|
27ec5e0ea5 | ||
|
|
21c53158ad | ||
|
|
bd4386c79b | ||
|
|
cc24920ff9 | ||
|
|
9a2a4036de | ||
|
|
05bac5f59a | ||
|
|
53dcb5c8a0 | ||
|
|
7ecbf4725a | ||
|
|
49bfad1779 | ||
|
|
05c6fb3cbd | ||
|
|
491275cfc7 | ||
|
|
7d0bf1adde | ||
|
|
97dd24c7ee | ||
|
|
3369785c7d | ||
|
|
b97819a121 | ||
|
|
88b6cebb19 | ||
|
|
1db095c69b | ||
|
|
3c23f90cfe | ||
|
|
a0b6e7533b | ||
|
|
cb6db86afe | ||
|
|
caacf4e047 | ||
|
|
2edfbc42e1 | ||
|
|
b39e32a221 | ||
|
|
77b86dfd3b | ||
|
|
b97931ddd5 | ||
|
|
94d15ca921 | ||
|
|
e8a8688a48 | ||
|
|
f05fbe281a | ||
|
|
cb5eef07a6 | ||
|
|
beb78ca1f9 | ||
|
|
5a3eca0fe5 | ||
|
|
04dd44488b | ||
|
|
cc0b9add62 | ||
|
|
24f31e6358 | ||
|
|
ed445c9bb2 | ||
|
|
d94db10da4 | ||
|
|
294d98b9bd | ||
|
|
a172879395 | ||
|
|
6f94580ff1 | ||
|
|
a39c707282 | ||
|
|
b807f39357 | ||
|
|
4910e75d63 | ||
|
|
97455adfa6 | ||
|
|
f21239c5a7 | ||
|
|
cc4cc85361 | ||
|
|
7a65fe951e | ||
|
|
e0e26df2ae | ||
|
|
1a7e2edf52 | ||
|
|
ceb03e889d | ||
|
|
a8afa7a50f | ||
|
|
d338325147 | ||
|
|
33a791d499 | ||
|
|
745fe11b87 | ||
|
|
0213cbad17 | ||
|
|
7f9f20b84e | ||
|
|
1f0c3133c6 | ||
|
|
bb5ddb477e | ||
|
|
ca3eae90ff | ||
|
|
8fffd10ec3 | ||
|
|
73a3e1d095 | ||
|
|
daaee6d2a4 | ||
|
|
fcad042bdd | ||
|
|
111d1f7ea7 | ||
|
|
9a8fae2a88 | ||
|
|
87f3d039f3 | ||
|
|
8698d20d0f | ||
|
|
05e147105e | ||
|
|
29c4ffcdc9 | ||
|
|
c84d52d964 | ||
|
|
e9c9d9b5e3 | ||
|
|
b8c09945a3 | ||
|
|
8d63e4f20d | ||
|
|
67b850d086 | ||
|
|
56f5ae6558 | ||
|
|
1ef317a66b | ||
|
|
b936b3f7d4 | ||
|
|
4920b0ea3a | ||
|
|
0355a71abd | ||
|
|
7894aaf073 | ||
|
|
6a69a985cd | ||
|
|
7562781a8b | ||
|
|
ca59665575 | ||
|
|
9478bf0292 | ||
|
|
41c97ad6a2 | ||
|
|
08f9140191 | ||
|
|
5b3cd8b908 | ||
|
|
1f8e545ea1 | ||
|
|
2d879941fe | ||
|
|
5c0aec538b | ||
|
|
d3cd4c73ba | ||
|
|
d938b69143 | ||
|
|
c0d7ca8136 | ||
|
|
60bdfb6a93 | ||
|
|
a775808972 | ||
|
|
8821b27556 | ||
|
|
8f263e637b | ||
|
|
d53984c72d | ||
|
|
75add72412 | ||
|
|
a9c987b70f | ||
|
|
21d1b63164 | ||
|
|
d64d138147 | ||
|
|
df8e14a8ac | ||
|
|
d880637a65 | ||
|
|
598afb9dc9 | ||
|
|
4b3231c9ef | ||
|
|
b14790f990 | ||
|
|
b319647a09 | ||
|
|
fb6aeb240f | ||
|
|
9833afbc5f | ||
|
|
a2bef15aa1 | ||
|
|
7ad1f360bd | ||
|
|
b31c68e830 | ||
|
|
507f60ec25 | ||
|
|
6cc0cba14c | ||
|
|
0da931a7e6 | ||
|
|
6c9a756d9e | ||
|
|
bf7d162ce4 | ||
|
|
ce052232f6 | ||
|
|
e7aa8fda54 | ||
|
|
8b5475b98b | ||
|
|
c61e3adb86 | ||
|
|
aefb78e078 | ||
|
|
efaa613368 | ||
|
|
de942d91b6 | ||
|
|
974c53fcd1 | ||
|
|
539c86c21c | ||
|
|
de00a53190 | ||
|
|
3ffff5b65d | ||
|
|
00bd0866f2 | ||
|
|
1216b4f638 | ||
|
|
a1f8585395 | ||
|
|
e4c324dcef | ||
|
|
7002faba3b | ||
|
|
34ab3d8bd7 | ||
|
|
fe22a67670 | ||
|
|
c7237dbc36 | ||
|
|
9bad260538 | ||
|
|
4dfe80b493 | ||
|
|
a289bc790e | ||
|
|
8790dc5524 | ||
|
|
59b1166682 | ||
|
|
5358aa5485 | ||
|
|
d9f7c89ecb | ||
|
|
8787078f4b | ||
|
|
7e3d910823 | ||
|
|
54e1345d45 | ||
|
|
026cbade9c | ||
|
|
babff0e0ba | ||
|
|
6e13564832 | ||
|
|
206fe1cf69 | ||
|
|
6a684235d2 | ||
|
|
b101ea885a | ||
|
|
c900462edb | ||
|
|
d281881448 | ||
|
|
9cff0dae26 | ||
|
|
1eaa527725 | ||
|
|
7284c250b3 | ||
|
|
972136c98b | ||
|
|
cc05d493c0 | ||
|
|
02b7e9ae04 | ||
|
|
6b26dea23a | ||
|
|
0b97a8bcae | ||
|
|
531090bdab | ||
|
|
b902867328 | ||
|
|
f3fc5c7d76 | ||
|
|
e73b6a053e | ||
|
|
5b89ba16fb | ||
|
|
b35e78df9f | ||
|
|
e3685eeb34 | ||
|
|
a49758af62 | ||
|
|
fcca036af4 | ||
|
|
04a44657d6 | ||
|
|
d060d92268 | ||
|
|
4b0df44879 | ||
|
|
d904ab6108 | ||
|
|
e75b6167ef | ||
|
|
1d3415d07a | ||
|
|
08e22740d8 | ||
|
|
51213a30b5 | ||
|
|
09becfbb7f | ||
|
|
038c1946c7 | ||
|
|
a3ccf0118b | ||
|
|
a2d5b83dbc | ||
|
|
9af5108421 | ||
|
|
81f5ec72e9 | ||
|
|
5d8053c134 | ||
|
|
46d92d4701 | ||
|
|
39938be2c3 | ||
|
|
100f6e96d1 | ||
|
|
84c0f73a33 | ||
|
|
08c4cebced | ||
|
|
60971f21e8 | ||
|
|
44c612ef7a | ||
|
|
17e3c9ce63 | ||
|
|
5e2bff42cf | ||
|
|
d8d6749337 | ||
|
|
fd010c1370 | ||
|
|
dca7775997 | ||
|
|
7a2f2bd23a | ||
|
|
89d7507bfa | ||
|
|
5b8d24bf2f | ||
|
|
657f04cd28 | ||
|
|
a9ba936f6a | ||
|
|
50cb0b5da2 | ||
|
|
b251d5dfe6 | ||
|
|
1858362ce7 | ||
|
|
2e1c65e515 | ||
|
|
83b5c99135 | ||
|
|
65017f3855 | ||
|
|
bbba7661a1 | ||
|
|
de6997847d | ||
|
|
4604c2b0c8 | ||
|
|
7520e95276 | ||
|
|
cb6e6164a3 | ||
|
|
8dfa1cdd2b | ||
|
|
06ad830769 | ||
|
|
bf5e63f8cf | ||
|
|
0056e0a2a1 | ||
|
|
1715bfc4e4 | ||
|
|
86a85b5b24 | ||
|
|
f3fbd44b4b | ||
|
|
30109c1722 | ||
|
|
4705cf7eb9 | ||
|
|
961190c723 | ||
|
|
87041776ce | ||
|
|
c2444681d7 | ||
|
|
6e386d6245 | ||
|
|
9257610869 | ||
|
|
3867cde543 | ||
|
|
a07ab41a73 | ||
|
|
69e1101b35 | ||
|
|
cda7bd3740 | ||
|
|
31fa88b53e | ||
|
|
797c1cbde8 | ||
|
|
41867b55fe | ||
|
|
2d20087f17 | ||
|
|
add60560ee | ||
|
|
7b2b58caa8 | ||
|
|
f4eda06021 | ||
|
|
514e3a4a35 | ||
|
|
981e977da4 | ||
|
|
b638ba0f0e | ||
|
|
2ad81c9364 | ||
|
|
0b5694c05b | ||
|
|
fcac9edef6 | ||
|
|
6b9f0817a8 | ||
|
|
c21bde269a | ||
|
|
815606651e | ||
|
|
aff9cb74d1 | ||
|
|
3ab7179305 | ||
|
|
d2b1c99663 | ||
|
|
9a883f1907 | ||
|
|
cdb92013dd | ||
|
|
5e60927477 | ||
|
|
c087c725b6 | ||
|
|
c4896a0f49 | ||
|
|
e1ff4b4682 | ||
|
|
1ce143e479 | ||
|
|
a0ad7883c7 | ||
|
|
f5f3957177 | ||
|
|
fe27c58b0b | ||
|
|
6db9e150e1 | ||
|
|
0d35d64aea | ||
|
|
d1b1cebdf5 | ||
|
|
e4a485844f | ||
|
|
9862d88b12 | ||
|
|
ec66eeee17 | ||
|
|
3c434b2d49 | ||
|
|
41ea258752 | ||
|
|
86311f3735 | ||
|
|
445a329785 | ||
|
|
957f540d17 | ||
|
|
c6540d6f5b | ||
|
|
a63341db79 | ||
|
|
1940ab20a8 | ||
|
|
7f84696bc9 | ||
|
|
e291234e04 | ||
|
|
ae8671455c | ||
|
|
66de0ed235 | ||
|
|
51ee6ffd16 | ||
|
|
658e14667d | ||
|
|
69c9faefcc | ||
|
|
2f3733b615 | ||
|
|
91816c2b53 | ||
|
|
d37389720f | ||
|
|
719b05e93b | ||
|
|
34f9d88c32 | ||
|
|
a646794882 | ||
|
|
a53a1d871e | ||
|
|
a1619543f3 | ||
|
|
8acda9b023 | ||
|
|
8c43916751 | ||
|
|
b8565ee46c | ||
|
|
f25c71b8f3 | ||
|
|
d216de77ea | ||
|
|
114eec30c5 | ||
|
|
3f1a89069d | ||
|
|
2cf17408e9 | ||
|
|
2a374fc53b | ||
|
|
612cbf749c | ||
|
|
52acaa3757 | ||
|
|
f7a143c604 | ||
|
|
210e09f981 | ||
|
|
e25667dc71 | ||
|
|
7560d7fd7c | ||
|
|
155c8fbcdb | ||
|
|
1463266ba6 | ||
|
|
92b1c6cb45 | ||
|
|
c6ff9bba00 | ||
|
|
f89d3fe75a | ||
|
|
6801ac1a3d | ||
|
|
46693aec47 | ||
|
|
f44e56d101 | ||
|
|
ad9de78253 | ||
|
|
a3ca314832 | ||
|
|
d9dc2f3dd8 | ||
|
|
9a5937ae29 | ||
|
|
8bcd1b8f83 | ||
|
|
4aafd43871 | ||
|
|
1a2f6cae46 | ||
|
|
a76cf5cdb3 | ||
|
|
8b539a46fc | ||
|
|
f373afd526 | ||
|
|
509878eb49 | ||
|
|
e6d7081950 | ||
|
|
edb4100457 | ||
|
|
3502bbdc7f | ||
|
|
c5a5bb2f1d | ||
|
|
ee4987bf20 | ||
|
|
fc378d510e | ||
|
|
1d4a3cc655 | ||
|
|
0427f45163 | ||
|
|
328882e820 | ||
|
|
cbe2ba52fc | ||
|
|
830cb81620 | ||
|
|
af3679980d | ||
|
|
a6ba80068b | ||
|
|
579463c2a0 | ||
|
|
01b93b15ec | ||
|
|
5369e4021b | ||
|
|
2c6f37bd88 | ||
|
|
89d41ec087 | ||
|
|
3db1cfd8e5 | ||
|
|
2fa5c48679 | ||
|
|
4a415e7ebf | ||
|
|
c0601e183b | ||
|
|
1726ad8090 | ||
|
|
d36e5a86a2 | ||
|
|
e61f47600d | ||
|
|
324f55684b | ||
|
|
36fbd90151 | ||
|
|
729631cd2a | ||
|
|
af03d417bb | ||
|
|
691936d0fc | ||
|
|
a897cfaa14 | ||
|
|
f9aa081235 | ||
|
|
597c7017e1 | ||
|
|
106cc727c8 | ||
|
|
56bb0cacf3 | ||
|
|
7c62eade08 | ||
|
|
e4f5898457 | ||
|
|
acbabab232 | ||
|
|
342b5dfb8d | ||
|
|
c13edd0826 | ||
|
|
e9ca60944d | ||
|
|
7c986e6891 | ||
|
|
04a4cf46d9 | ||
|
|
7d1bb870aa | ||
|
|
055efd00fc | ||
|
|
f9c792fe35 | ||
|
|
cff145095f | ||
|
|
7939adf3e3 | ||
|
|
3853356b22 | ||
|
|
2482251c3d | ||
|
|
946fcca4fd | ||
|
|
48a0d91e49 | ||
|
|
f17b75ab53 | ||
|
|
647cdf2190 | ||
|
|
bfc94a0bdb | ||
|
|
f4c23b6b84 | ||
|
|
763670635c | ||
|
|
fb7f74f397 | ||
|
|
d4b2902c6d | ||
|
|
80a88bea56 | ||
|
|
21fcfcc135 | ||
|
|
1561a8a82e | ||
|
|
d596fd5f64 | ||
|
|
5bebfed4cf | ||
|
|
c72a90ef6e | ||
|
|
64051c254f | ||
|
|
bddbc252db | ||
|
|
dd2f215132 | ||
|
|
7b89e9dbf8 | ||
|
|
3d154ee668 | ||
|
|
a0050ed896 | ||
|
|
8b2b70bdf3 | ||
|
|
0e693e68e3 | ||
|
|
147acc1445 | ||
|
|
0f2b338805 | ||
|
|
ed5a9db25b | ||
|
|
1c49dcc3db | ||
|
|
045d407aed | ||
|
|
e8c59932b3 | ||
|
|
833d036074 | ||
|
|
68d4f3d730 | ||
|
|
458b1d0396 | ||
|
|
6ad1d4020c | ||
|
|
7946532f8c | ||
|
|
56facd6a49 | ||
|
|
1e8356cc86 | ||
|
|
43829de62d | ||
|
|
85f809c42b | ||
|
|
f9f54d9cea | ||
|
|
cb862b5fa5 | ||
|
|
b8e9f2d766 | ||
|
|
3a2d37b92a | ||
|
|
29af0809b7 | ||
|
|
6af909778c | ||
|
|
f108463265 | ||
|
|
1c478078b8 | ||
|
|
a045550121 | ||
|
|
1e4a940e70 | ||
|
|
e9458705d0 | ||
|
|
0f953dfef8 | ||
|
|
155ab84649 | ||
|
|
189db2490a | ||
|
|
b39ab05f9f | ||
|
|
f1e7efeb39 | ||
|
|
9013b7dca5 | ||
|
|
c492cc5c0b | ||
|
|
9133b6125d | ||
|
|
b4eeca78fa | ||
|
|
23d0185acd | ||
|
|
98641b3e93 | ||
|
|
01b3c8ee64 | ||
|
|
b747a5edbb | ||
|
|
84023e650f | ||
|
|
e7c223bc00 | ||
|
|
82e0c608d2 | ||
|
|
f7427c9ae8 | ||
|
|
24c04a0b0d | ||
|
|
f4d5a80fcc | ||
|
|
fc98b2a2dc | ||
|
|
3fa67b21b3 | ||
|
|
44e056a84e | ||
|
|
0f9c2c2cf3 | ||
|
|
c5bed1a023 | ||
|
|
8542fe4128 | ||
|
|
5010ebb57e | ||
|
|
4e14cb68e1 | ||
|
|
d875715cff | ||
|
|
b5d2a224bf | ||
|
|
c32aa48b32 | ||
|
|
62893dfcdc | ||
|
|
68d3b4ce1f | ||
|
|
1c2212487d | ||
|
|
cbe149a783 | ||
|
|
0452a0c867 | ||
|
|
72e4891ac5 | ||
|
|
4633a4c498 | ||
|
|
ed66a05c54 | ||
|
|
0d170d7339 | ||
|
|
31731a3a2a | ||
|
|
085ec57759 | ||
|
|
6041a16339 | ||
|
|
9c6d1e5395 | ||
|
|
81f6e7dcd7 | ||
|
|
41b7d05285 | ||
|
|
e73b613582 | ||
|
|
3f47cd536d | ||
|
|
e1c780ee62 | ||
|
|
3b41815974 | ||
|
|
48d73bbc6e | ||
|
|
0d060fad24 | ||
|
|
3b7f43f7c4 | ||
|
|
91a852dc53 | ||
|
|
ccf23ab301 | ||
|
|
1e5a1311c4 | ||
|
|
ba21904558 | ||
|
|
cc55180797 | ||
|
|
f3de7bde0f | ||
|
|
e7104a4b16 | ||
|
|
30d446d41b | ||
|
|
5a22e9c782 | ||
|
|
7f062f213f | ||
|
|
785d360fed | ||
|
|
94c6c4942c | ||
|
|
eded5fdb0c | ||
|
|
84e5307117 | ||
|
|
050e82cebd | ||
|
|
36c07ae545 | ||
|
|
b783a1de32 | ||
|
|
4381eca9ac | ||
|
|
79da27ae91 | ||
|
|
a1a8d74738 | ||
|
|
c44dcb8257 | ||
|
|
8b625b6590 | ||
|
|
b240f15ff8 | ||
|
|
d1a0b4ab34 | ||
|
|
9e2c79517a | ||
|
|
be0838981d | ||
|
|
f7299aaea4 | ||
|
|
b0c134d385 | ||
|
|
695357e5f0 | ||
|
|
5f4483769b | ||
|
|
fff4c58a9a | ||
|
|
176669d625 | ||
|
|
1f9aaae0b8 | ||
|
|
df2fbd0ab3 | ||
|
|
94bf2db8c7 | ||
|
|
862dd4b180 | ||
|
|
f45f787651 | ||
|
|
92adc65bbe | ||
|
|
419bdf23c4 | ||
|
|
33f4ec04c2 | ||
|
|
e561e3fb43 | ||
|
|
bd3724068c | ||
|
|
d052e6e47d | ||
|
|
59115f818d | ||
|
|
b1a0964cd1 | ||
|
|
d7eff6159f | ||
|
|
0ff19fa453 | ||
|
|
c957f31d40 | ||
|
|
f8840e7152 | ||
|
|
b83919d1f3 | ||
|
|
50ec3bca05 | ||
|
|
13bf65a73b | ||
|
|
ff9792e31c | ||
|
|
bf55667553 | ||
|
|
428563e33a | ||
|
|
702de267bc | ||
|
|
011845992f | ||
|
|
73d2f7812e | ||
|
|
69dfff722b | ||
|
|
71ccf698ab | ||
|
|
9fe4be5ebf | ||
|
|
5e1d923647 | ||
|
|
37f07a1b18 | ||
|
|
b7c79c2da7 | ||
|
|
e88909995f | ||
|
|
5ab4bdc2db | ||
|
|
665a82b9cd | ||
|
|
cefc083135 | ||
|
|
1f26249ce9 | ||
|
|
82ccd15580 | ||
|
|
423b4a39e6 | ||
|
|
9dd4c43209 | ||
|
|
59efd8e98e | ||
|
|
4127c45866 | ||
|
|
de37080dae | ||
|
|
ebadbdc0ac | ||
|
|
4238209e8f | ||
|
|
51701f230e | ||
|
|
e01e8e9225 | ||
|
|
542edd6fa9 | ||
|
|
a1fd22d578 | ||
|
|
15150bee50 | ||
|
|
096ef91b73 | ||
|
|
1b4c833c2f | ||
|
|
46e336fbb4 | ||
|
|
c9325ccfcc | ||
|
|
e57febca9a | ||
|
|
3c4935e10b | ||
|
|
0d565f9c10 | ||
|
|
6ea6891ccb | ||
|
|
503ad0b98c | ||
|
|
dee11eae41 | ||
|
|
589c6014a4 | ||
|
|
60148fda30 | ||
|
|
7974fd219a | ||
|
|
bf6ca3ff58 | ||
|
|
d1eafd6919 | ||
|
|
b3b73c6f02 | ||
|
|
32fa3df6b6 | ||
|
|
5907a7520a | ||
|
|
31c55af919 | ||
|
|
4c9832aedc | ||
|
|
1ffbfded8e | ||
|
|
c6a798cd2a | ||
|
|
96f0c2fbdd | ||
|
|
5dd815bcbe | ||
|
|
50cb354e23 | ||
|
|
1086c60825 | ||
|
|
76fdcc2985 | ||
|
|
ff292908ff | ||
|
|
8dd9b47fd4 | ||
|
|
2e52d46b68 | ||
|
|
536265a8a3 | ||
|
|
6c1c753764 | ||
|
|
8c33979071 | ||
|
|
5a81df350c | ||
|
|
cb5e4eff2b | ||
|
|
a99c27add1 | ||
|
|
4b831e750a | ||
|
|
f259f78788 | ||
|
|
8eb9bee6ed | ||
|
|
f58a314f6a | ||
|
|
bf064812d3 | ||
|
|
fb2d5dc620 | ||
|
|
a18866b355 | ||
|
|
147359c564 | ||
|
|
51cf551eac | ||
|
|
79b1f97640 | ||
|
|
f44b49338b | ||
|
|
b216c63921 | ||
|
|
98b49964f5 | ||
|
|
e5987985be | ||
|
|
8a69023089 | ||
|
|
988ff7521b | ||
|
|
62e78e0018 | ||
|
|
fe5004685c | ||
|
|
dc207ae8c5 | ||
|
|
521cd5610f | ||
|
|
fef696d978 | ||
|
|
12a41a7b1f | ||
|
|
395bb1ca90 | ||
|
|
fea7bbce6d | ||
|
|
26cc7897c6 | ||
|
|
777de0673f | ||
|
|
68fbc5f51b | ||
|
|
184bff2e6b | ||
|
|
2e6fa4468b | ||
|
|
3a4a8c91c6 | ||
|
|
14885372d2 | ||
|
|
c1442803bd | ||
|
|
65edae0b2e | ||
|
|
d50b5852e0 | ||
|
|
04ae012638 | ||
|
|
65dc2e0942 | ||
|
|
f1c3c66996 | ||
|
|
e2572ed89e | ||
|
|
b21fd3e3e8 | ||
|
|
d3c32d1906 | ||
|
|
25db0ec1db | ||
|
|
05fee1fd12 | ||
|
|
4372354174 | ||
|
|
881da80e96 | ||
|
|
6509da9b66 | ||
|
|
978150d78f | ||
|
|
3a5934a09e | ||
|
|
6650369970 | ||
|
|
2ca78faf3c | ||
|
|
2da2b28159 | ||
|
|
a093251235 | ||
|
|
d3f2f593eb | ||
|
|
a6d574581d | ||
|
|
507242c9e7 | ||
|
|
c76f1364c2 | ||
|
|
04622a13a5 | ||
|
|
efcb8d9c00 | ||
|
|
ddfe309a88 | ||
|
|
7740e00883 | ||
|
|
f336cd1b74 | ||
|
|
63f336c931 | ||
|
|
bb164e2dd0 | ||
|
|
98a2d1b8a3 | ||
|
|
8753bef383 | ||
|
|
c05ea0fe21 | ||
|
|
da6df3cc87 | ||
|
|
b063fcd089 | ||
|
|
bc3863912f | ||
|
|
b968cd7d95 | ||
|
|
058b41e7d7 | ||
|
|
43dfdd4d2d | ||
|
|
4fe78a0424 | ||
|
|
b51779b6f8 | ||
|
|
1ff9cf93aa | ||
|
|
bc633fb09a | ||
|
|
0dd63e4f84 | ||
|
|
9876a73a53 | ||
|
|
cd7a12ce48 | ||
|
|
c407618375 | ||
|
|
1ef8fd987b | ||
|
|
b835c33c1a | ||
|
|
2e5554598d | ||
|
|
35c20318f4 | ||
|
|
b9e8f01862 | ||
|
|
c43076f598 | ||
|
|
97eaa972c2 | ||
|
|
1e232cf5c0 | ||
|
|
85d56347ba | ||
|
|
d96a246441 | ||
|
|
7fd4d2bd9f | ||
|
|
007fdc73aa | ||
|
|
b9b71d7c1f | ||
|
|
651fcc5dc0 | ||
|
|
079e51e8c0 | ||
|
|
0ef2bc1528 | ||
|
|
b7fca24862 | ||
|
|
6ad6283706 | ||
|
|
76286d9b97 | ||
|
|
7055a18a97 | ||
|
|
06d2520b07 | ||
|
|
086b44c0fb | ||
|
|
0fcbfac33d | ||
|
|
7a4e63c24b | ||
|
|
c62563a7e5 | ||
|
|
aeb4ba3788 | ||
|
|
326b1638dc | ||
|
|
2934a5ac1a | ||
|
|
1bfc81c82f | ||
|
|
96da3d3c98 | ||
|
|
131a34f336 | ||
|
|
c80da8bb6c | ||
|
|
3307889464 | ||
|
|
6547376330 | ||
|
|
625c33f18f | ||
|
|
dcba5e2641 | ||
|
|
54979c1aed | ||
|
|
3a01bf6a51 | ||
|
|
95925e8648 | ||
|
|
72ede7df50 | ||
|
|
b1e76e0038 | ||
|
|
9e3ad90b8a | ||
|
|
b3f53b2f04 | ||
|
|
c7a7caff56 | ||
|
|
c817c4de33 | ||
|
|
84c2d2239e | ||
|
|
c99c8e1193 | ||
|
|
ca03815efe | ||
|
|
49bac6f251 | ||
|
|
4e911f1c88 | ||
|
|
d7389f9b3c | ||
|
|
1c915d5c9c | ||
|
|
a9f3909f13 | ||
|
|
7b8b83645b | ||
|
|
a48c3829d7 | ||
|
|
b240e66503 | ||
|
|
b7c4bde0e9 | ||
|
|
ea293b8353 | ||
|
|
9517d9bdae | ||
|
|
08539cdcd6 | ||
|
|
67d56cd637 | ||
|
|
36f714381d | ||
|
|
276530fcde | ||
|
|
05366912fc | ||
|
|
ef5a74392e | ||
|
|
d43e358d01 | ||
|
|
a36b8bd4bb | ||
|
|
0edf6673ba | ||
|
|
0aea5c1e20 | ||
|
|
762e256d2b | ||
|
|
0e5a7a335b | ||
|
|
e477409373 | ||
|
|
39dab54321 | ||
|
|
a93c75ed2f | ||
|
|
4ab4f0407f | ||
|
|
a6bdda7b27 | ||
|
|
bdd0c9d351 | ||
|
|
2afb2ddd1e | ||
|
|
5b73f17652 | ||
|
|
94e541ad60 | ||
|
|
6003736221 |
@@ -42,11 +42,13 @@ set(OPM_PROJECT_EXTRA_CODE_INTREE "#ENABLE_ECL_INPUT is needed by opm-common-pre
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "${OPM_PROJECT_EXTRA_CODE_INSTALLED}
|
||||
set(COMPARE_ECL_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/compareECL)
|
||||
set(OPM_PACK_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/opmpack)")
|
||||
set(OPM_PACK_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/opmpack)
|
||||
set(RST_DECK_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/rst_deck)")
|
||||
|
||||
set(OPM_PROJECT_EXTRA_CODE_INTREE "${OPM_PROJECT_EXTRA_CODE_INTREE}
|
||||
set(COMPARE_ECL_COMMAND ${PROJECT_BINARY_DIR}/bin/compareECL)
|
||||
set(OPM_PACK_COMMAND ${PROJECT_BINARY_DIR}/bin/opmpack)")
|
||||
set(OPM_PACK_COMMAND ${PROJECT_BINARY_DIR}/bin/opmpack)
|
||||
set(RST_DECK_COMMAND ${PROJECT_BINARY_DIR}/bin/rst_deck)")
|
||||
endif()
|
||||
|
||||
# project information is in dune.module. Read this file and set variables.
|
||||
@@ -107,8 +109,7 @@ macro (config_hook)
|
||||
set(HAVE_ECL_OUTPUT 1)")
|
||||
endif()
|
||||
|
||||
# Configure boost targets for old cmake
|
||||
include(cmake/Modules/BoostTargets.cmake)
|
||||
find_package(Boost COMPONENTS filesystem regex system unit_test_framework)
|
||||
|
||||
if (HAVE_DYNAMIC_BOOST_TEST)
|
||||
set_target_properties(Boost::unit_test_framework PROPERTIES INTERFACE_COMPILE_DEFINITIONS BOOST_TEST_DYN_LINK=1)
|
||||
@@ -300,15 +301,20 @@ if(ENABLE_ECL_INPUT)
|
||||
${PROJECT_BINARY_DIR}/tests
|
||||
)
|
||||
|
||||
foreach(test test_EclIO test_EGrid test_ERft test_ERst test_ESmry test_EInit)
|
||||
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
|
||||
install(DIRECTORY cmake DESTINATION share/opm USE_SOURCE_PERMISSIONS)
|
||||
# Install build system files and documentation
|
||||
install(DIRECTORY cmake
|
||||
DESTINATION share/opm USE_SOURCE_PERMISSIONS
|
||||
PATTERN "OPM-CMake.md" EXCLUDE)
|
||||
|
||||
install(FILES cmake/OPM-CMake.md
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
|
||||
# Install tab completion skeleton
|
||||
install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc)
|
||||
@@ -321,7 +327,17 @@ if (OPM_ENABLE_PYTHON)
|
||||
else()
|
||||
set(PYTHON_PACKAGE_PATH "site-packages")
|
||||
endif()
|
||||
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
||||
if(PYTHON_VERSION_MAJOR)
|
||||
set(PY_MAJOR ${PYTHON_VERSION_MAJOR})
|
||||
else()
|
||||
set(PY_MAJOR ${Python3_VERSION_MAJOR})
|
||||
endif()
|
||||
if(PYTHON_VERSION_MINOR)
|
||||
set(PY_MINOR ${PYTHON_VERSION_MINOR})
|
||||
else()
|
||||
set(PY_MINOR ${Python3_VERSION_MINOR})
|
||||
endif()
|
||||
set(PYTHON_INSTALL_PREFIX "lib/python${PY_MAJOR}.${PY_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
||||
|
||||
make_directory(${PROJECT_BINARY_DIR}/python)
|
||||
get_target_property(_opmcommon_include_dirs opmcommon INCLUDE_DIRECTORIES)
|
||||
|
||||
@@ -46,6 +46,8 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -79,12 +81,14 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Grid/Fault.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Grid/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
|
||||
@@ -92,6 +96,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -102,6 +107,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Condition.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/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
|
||||
@@ -124,6 +130,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -136,7 +143,8 @@ if(ENABLE_ECL_INPUT)
|
||||
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/TimeMap.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
|
||||
@@ -151,6 +159,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -162,10 +171,13 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -182,6 +194,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -229,6 +242,7 @@ if(ENABLE_ECL_INPUT)
|
||||
python/cxx/eclipse_config.cpp
|
||||
python/cxx/eclipse_grid.cpp
|
||||
python/cxx/eclipse_state.cpp
|
||||
python/cxx/emodel_util.cpp
|
||||
python/cxx/export.cpp
|
||||
python/cxx/group.cpp
|
||||
python/cxx/log.cpp
|
||||
@@ -270,24 +284,32 @@ if(ENABLE_ECL_OUTPUT)
|
||||
src/opm/io/eclipse/ERst.cpp
|
||||
src/opm/io/eclipse/ERsm.cpp
|
||||
src/opm/io/eclipse/ESmry.cpp
|
||||
src/opm/io/eclipse/ExtESmry.cpp
|
||||
src/opm/io/eclipse/ESmry_write_rsm.cpp
|
||||
src/opm/io/eclipse/OutputStream.cpp
|
||||
src/opm/io/eclipse/ExtSmryOutput.cpp
|
||||
src/opm/io/eclipse/RestartFileView.cpp
|
||||
src/opm/io/eclipse/SummaryNode.cpp
|
||||
src/opm/io/eclipse/rst/action.cpp
|
||||
src/opm/io/eclipse/rst/aquifer.cpp
|
||||
src/opm/io/eclipse/rst/connection.cpp
|
||||
src/opm/io/eclipse/rst/group.cpp
|
||||
src/opm/io/eclipse/rst/header.cpp
|
||||
src/opm/io/eclipse/rst/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/eclipse/ActiveIndexByColumns.cpp
|
||||
src/opm/output/eclipse/AggregateActionxData.cpp
|
||||
src/opm/output/eclipse/AggregateAquiferData.cpp
|
||||
src/opm/output/eclipse/AggregateConnectionData.cpp
|
||||
src/opm/output/eclipse/AggregateGroupData.cpp
|
||||
src/opm/output/eclipse/AggregateNetworkData.cpp
|
||||
src/opm/output/eclipse/AggregateMSWData.cpp
|
||||
src/opm/output/eclipse/AggregateUDQData.cpp
|
||||
src/opm/output/eclipse/AggregateWellData.cpp
|
||||
src/opm/output/eclipse/CreateActionxDims.cpp
|
||||
src/opm/output/eclipse/AggregateWListData.cpp
|
||||
src/opm/output/eclipse/CreateActionRSTDims.cpp
|
||||
src/opm/output/eclipse/CreateDoubHead.cpp
|
||||
src/opm/output/eclipse/CreateInteHead.cpp
|
||||
src/opm/output/eclipse/CreateLogiHead.cpp
|
||||
@@ -303,13 +325,16 @@ if(ENABLE_ECL_OUTPUT)
|
||||
src/opm/output/eclipse/Inplace.cpp
|
||||
src/opm/output/eclipse/Summary.cpp
|
||||
src/opm/output/eclipse/Tables.cpp
|
||||
src/opm/output/eclipse/UDQDims.cpp
|
||||
src/opm/output/eclipse/RegionCache.cpp
|
||||
src/opm/output/eclipse/RestartValue.cpp
|
||||
src/opm/output/eclipse/WriteInit.cpp
|
||||
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()
|
||||
|
||||
@@ -318,6 +343,7 @@ 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
|
||||
@@ -332,6 +358,7 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/rst_test.cpp
|
||||
tests/test_ERsm.cpp
|
||||
tests/test_GuideRate.cpp
|
||||
tests/test_RestartFileView.cpp
|
||||
tests/parser/ACTIONX.cpp
|
||||
tests/parser/ADDREGTests.cpp
|
||||
tests/parser/AquiferTests.cpp
|
||||
@@ -356,6 +383,7 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/ImportTests.cpp
|
||||
tests/parser/InitConfigTest.cpp
|
||||
tests/parser/IOConfigTests.cpp
|
||||
tests/parser/MICPTests.cpp
|
||||
tests/parser/MessageLimitTests.cpp
|
||||
tests/parser/MultiRegTests.cpp
|
||||
tests/parser/MultisegmentWellTests.cpp
|
||||
@@ -390,7 +418,6 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/TableManagerTests.cpp
|
||||
tests/parser/TableSchemaTests.cpp
|
||||
tests/parser/ThresholdPressureTest.cpp
|
||||
tests/parser/TimeMapTest.cpp
|
||||
tests/parser/TracerTests.cpp
|
||||
tests/parser/TransMultTests.cpp
|
||||
tests/parser/TuningTests.cpp
|
||||
@@ -401,15 +428,18 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/WellTracerTests.cpp
|
||||
tests/parser/WellTests.cpp
|
||||
tests/parser/WLIST.cpp
|
||||
tests/parser/WriteRestartFileEventsTests.cpp
|
||||
tests/parser/WTEST.cpp)
|
||||
endif()
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
list (APPEND TEST_SOURCE_FILES
|
||||
tests/test_ActiveIndexByColumns.cpp
|
||||
tests/test_AggregateActionxData.cpp
|
||||
tests/test_AggregateAquiferData.cpp
|
||||
tests/test_AggregateWellData.cpp
|
||||
tests/test_AggregateGroupData.cpp
|
||||
tests/test_AggregateNetworkData.cpp
|
||||
tests/test_AggregateWListData.cpp
|
||||
tests/test_AggregateMSWData.cpp
|
||||
tests/test_AggregateConnectionData.cpp
|
||||
tests/test_AggregateUDQData.cpp
|
||||
@@ -444,6 +474,8 @@ list (APPEND TEST_DATA_FILES
|
||||
)
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
list (APPEND TEST_DATA_FILES
|
||||
tests/GDFILE_NO_ACTNUM.DATA
|
||||
tests/EGRID_NO_ACTNUM.FEGRID
|
||||
tests/BASE_SIM.DATA
|
||||
tests/BASE_SIM_THPRES.DATA
|
||||
tests/RESTART_SIM.DATA
|
||||
@@ -455,13 +487,21 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/summary_deck_non_constant_porosity.DATA
|
||||
tests/SUMMARY_EFF_FAC.DATA
|
||||
tests/SPE1CASE1.DATA
|
||||
tests/SPE1CASE1_RPTONLY.DATA
|
||||
tests/SPE1CASE1_SUMTHIN.DATA
|
||||
tests/SPE1CASE1.SMSPEC
|
||||
tests/SPE1CASE1A.SMSPEC
|
||||
tests/SPE1CASE1B.DATA
|
||||
tests/props_spe1case1b.inc
|
||||
tests/SPE9_CP_PACKED.DATA
|
||||
tests/SOFR_TEST.DATA
|
||||
tests/UDQ_BASE.DATA
|
||||
tests/UDQ_RESTART.DATA
|
||||
tests/UDQ_ACTIONX.X0007
|
||||
tests/UDQ_ACTIONX.DATA
|
||||
tests/UDQ_ACTIONX_RESTART.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/9_4C_WINJ_GINJ_UDQ_MSW-UDARATE_TEST_PACK.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
tests/UDQ_ACTIONX_TEST1_U.DATA
|
||||
tests/TEST_AGGREGATE_MSW.DATA
|
||||
@@ -472,13 +512,17 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/include_grid_3x5x4.grdecl
|
||||
tests/SPE1CASE2.DATA
|
||||
tests/SPE1CASE2_RESTART.DATA
|
||||
tests/SPE1CASE2_RESTART_SKIPREST.DATA
|
||||
tests/SPE1CASE2.X0060
|
||||
tests/PYACTION.DATA
|
||||
tests/0A4_GRCTRL_LRAT_LRAT_GGR_BASE_MODEL2_MSW_ALL.DATA
|
||||
tests/MOD4_TEST_IGRP-DATA.DATA
|
||||
tests/2_WLIFT_MODEL5_NOINC.DATA
|
||||
tests/TEST_NETWORK_ALL.DATA
|
||||
tests/TEST_WLIST.DATA
|
||||
tests/act1.py
|
||||
tests/MSW.DATA
|
||||
tests/MSW_2WELSEGS.DATA
|
||||
tests/EXIT_TEST.DATA
|
||||
tests/action_syntax_error.py
|
||||
tests/action_missing_run.py
|
||||
@@ -513,15 +557,21 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/SPE1CASE1A.UNSMRY
|
||||
tests/SPE1CASE1_RST60.SMSPEC
|
||||
tests/SPE1CASE1_RST60.UNSMRY
|
||||
tests/SPE1CASE1_RST60.ESMRY
|
||||
tests/MODEL2_RESTART.DATA
|
||||
tests/restart/MODEL2.UNRST
|
||||
tests/UDQ_WCONPROD.DATA
|
||||
tests/UDQ_WCONPROD_GRID.grdecl
|
||||
tests/UDQ_WCONPROD_RESTART.DATA
|
||||
tests/UDQ_WCONPROD.X0006
|
||||
)
|
||||
list (APPEND EXAMPLE_SOURCE_FILES
|
||||
examples/opmi.cpp
|
||||
examples/opmpack.cpp
|
||||
examples/opmhash.cpp
|
||||
examples/rst_deck.cpp
|
||||
examples/wellgraph.cpp
|
||||
examples/make_lodsmry.cpp
|
||||
examples/make_ext_smry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -534,7 +584,8 @@ if(ENABLE_ECL_INPUT)
|
||||
examples/opmi.cpp
|
||||
examples/opmpack.cpp
|
||||
examples/opmhash.cpp
|
||||
examples/make_lodsmry.cpp
|
||||
examples/rst_deck.cpp
|
||||
examples/make_esmry.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -622,9 +673,11 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -724,15 +777,16 @@ if(ENABLE_ECL_INPUT)
|
||||
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/TimeMap.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp
|
||||
@@ -750,6 +804,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -765,6 +820,7 @@ if(ENABLE_ECL_INPUT)
|
||||
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
|
||||
@@ -806,7 +862,9 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp
|
||||
opm/parser/eclipse/Deck/DeckItem.hpp
|
||||
opm/parser/eclipse/Deck/Deck.hpp
|
||||
opm/parser/eclipse/Deck/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
|
||||
@@ -828,14 +886,20 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/io/eclipse/ERst.hpp
|
||||
opm/io/eclipse/ERsm.hpp
|
||||
opm/io/eclipse/ESmry.hpp
|
||||
opm/io/eclipse/ExtESmry.hpp
|
||||
opm/io/eclipse/PaddedOutputString.hpp
|
||||
opm/io/eclipse/OutputStream.hpp
|
||||
opm/io/eclipse/ExtSmryOutput.hpp
|
||||
opm/io/eclipse/RestartFileView.hpp
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/io/eclipse/rst/action.hpp
|
||||
opm/io/eclipse/rst/aquifer.hpp
|
||||
opm/io/eclipse/rst/connection.hpp
|
||||
opm/io/eclipse/rst/group.hpp
|
||||
opm/io/eclipse/rst/header.hpp
|
||||
opm/io/eclipse/rst/segment.hpp
|
||||
opm/io/eclipse/rst/state.hpp
|
||||
opm/io/eclipse/rst/udq.hpp
|
||||
opm/io/eclipse/rst/well.hpp
|
||||
opm/output/data/Aquifer.hpp
|
||||
opm/output/data/Cells.hpp
|
||||
@@ -843,6 +907,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/data/Solution.hpp
|
||||
opm/output/data/Wells.hpp
|
||||
opm/output/eclipse/VectorItems/action.hpp
|
||||
opm/output/eclipse/VectorItems/aquifer.hpp
|
||||
opm/output/eclipse/VectorItems/connection.hpp
|
||||
opm/output/eclipse/VectorItems/group.hpp
|
||||
@@ -854,12 +919,14 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/eclipse/VectorItems/well.hpp
|
||||
opm/output/eclipse/ActiveIndexByColumns.hpp
|
||||
opm/output/eclipse/AggregateActionxData.hpp
|
||||
opm/output/eclipse/AggregateAquiferData.hpp
|
||||
opm/output/eclipse/AggregateGroupData.hpp
|
||||
opm/output/eclipse/AggregateNetworkData.hpp
|
||||
opm/output/eclipse/AggregateConnectionData.hpp
|
||||
opm/output/eclipse/AggregateMSWData.hpp
|
||||
opm/output/eclipse/AggregateUDQData.hpp
|
||||
opm/output/eclipse/AggregateWellData.hpp
|
||||
opm/output/eclipse/AggregateWListData.hpp
|
||||
opm/output/eclipse/DoubHEAD.hpp
|
||||
opm/output/eclipse/EclipseGridInspector.hpp
|
||||
opm/output/eclipse/EclipseIO.hpp
|
||||
@@ -873,12 +940,14 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/eclipse/Inplace.hpp
|
||||
opm/output/eclipse/Summary.hpp
|
||||
opm/output/eclipse/Tables.hpp
|
||||
opm/output/eclipse/UDQDims.hpp
|
||||
opm/output/eclipse/WindowedArray.hpp
|
||||
opm/output/eclipse/WriteInit.hpp
|
||||
opm/output/eclipse/WriteRFT.hpp
|
||||
opm/output/eclipse/WriteRPT.hpp
|
||||
opm/output/eclipse/WriteRestartHelpers.hpp
|
||||
opm/output/OutputWriter.hpp
|
||||
opm/utility/EModel.hpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ set(_testdir ${PROJECT_SOURCE_DIR}/tests/parser/data)
|
||||
opm_add_test(ParserTests
|
||||
SOURCES tests/parser/ParserTests.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS ${_testdir}/)
|
||||
TEST_ARGS -- ${_testdir}/)
|
||||
list(APPEND EXTRA_TESTS ParserTests)
|
||||
|
||||
opm_add_test(ParserIncludeTests
|
||||
SOURCES tests/parser/ParserIncludeTests.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS ${_testdir}/parser/)
|
||||
TEST_ARGS -- ${_testdir}/parser/)
|
||||
target_compile_definitions(ParserIncludeTests PRIVATE
|
||||
-DHAVE_CASE_SENSITIVE_FILESYSTEM=${HAVE_CASE_SENSITIVE_FILESYSTEM})
|
||||
list(APPEND EXTRA_TESTS ParserIncludeTests)
|
||||
@@ -32,13 +32,13 @@ list(APPEND EXTRA_TESTS ParserIncludeTests)
|
||||
opm_add_test(PvtxTableTests
|
||||
SOURCES tests/parser/PvtxTableTests.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS ${_testdir}/integration_tests/)
|
||||
TEST_ARGS -- ${_testdir}/integration_tests/)
|
||||
list(APPEND EXTRA_TESTS PvtxTableTests)
|
||||
|
||||
opm_add_test(EclipseStateTests
|
||||
SOURCES tests/parser/EclipseStateTests.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS ${_testdir}/integration_tests/)
|
||||
TEST_ARGS -- ${_testdir}/integration_tests/)
|
||||
list(APPEND EXTRA_TESTS EclipseStateTests)
|
||||
|
||||
foreach (test BoxTest
|
||||
@@ -55,7 +55,7 @@ foreach (test BoxTest
|
||||
opm_add_test(${test}
|
||||
SOURCES tests/parser/integration/${test}.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS ${_testdir}/integration_tests/)
|
||||
TEST_ARGS -- ${_testdir}/integration_tests/)
|
||||
list(APPEND EXTRA_TESTS ${test})
|
||||
endforeach ()
|
||||
|
||||
@@ -69,6 +69,11 @@ opm_add_test( rst_msw
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS tests/MSW.DATA tests/MSW_RESTART.DATA )
|
||||
|
||||
add_test( NAME rst_deck_test
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/tests/rst_test_driver.sh ${PROJECT_BINARY_DIR}/bin/rst_deck ${PROJECT_BINARY_DIR}/bin/opmhash
|
||||
${PROJECT_SOURCE_DIR}/tests/SPE1CASE2_INCLUDE.DATA)
|
||||
|
||||
|
||||
# opm-tests dependent tests
|
||||
if(HAVE_OPM_TESTS)
|
||||
opm_add_test(parse_write ONLY_COMPILE
|
||||
@@ -113,8 +118,17 @@ if(HAVE_OPM_TESTS)
|
||||
opm_add_test("SPE9_CP_GROUP2" NO_COMPILE EXE_NAME parse_write TEST_ARGS "${OPM_TESTS_ROOT}/spe9group/SPE9_CP_GROUP.DATA")
|
||||
set_property(TEST NORNE_ATW2013
|
||||
PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH")
|
||||
|
||||
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
|
||||
${OPM_TESTS_ROOT}/norne/NORNE_ATW2013.DATA)
|
||||
|
||||
set_property(TEST rst_deck_test_norne
|
||||
PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
# JSON tests
|
||||
opm_add_test(jsonTests
|
||||
SOURCES tests/json/jsonTests.cpp
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# make targets for boost if find module did not do the job
|
||||
|
||||
if(NOT TARGET Boost::system)
|
||||
add_library(Boost::system UNKNOWN IMPORTED)
|
||||
set_target_properties(Boost::system PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${Boost_SYSTEM_LIBRARY}"
|
||||
IMPORTED_LOCATION_DEBUG "${Boost_SYSTEM_LIBRARY_DEBUG}"
|
||||
IMPORTED_LOCATION_RELEASE "${Boost_SYSTEM_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Boost::filesystem)
|
||||
add_library(Boost::filesystem UNKNOWN IMPORTED)
|
||||
set_target_properties(Boost::filesystem PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_COMPILE_DEFINITIONS BOOST_FILESYSTEM_VERSION=3
|
||||
INTERFACE_LINK_LIBRARIES "${boost_system}"
|
||||
IMPORTED_LOCATION "${Boost_FILESYSTEM_LIBRARY}"
|
||||
IMPORTED_LOCATION_DEBUG "${Boost_FILESYSTEM_LIBRARY_DEBUG}"
|
||||
IMPORTED_LOCATION_RELEASE "${Boost_FILESYSTEM_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Boost::regex)
|
||||
add_library(Boost::regex UNKNOWN IMPORTED)
|
||||
set_target_properties(Boost::regex PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${boost_system}"
|
||||
IMPORTED_LOCATION "${Boost_REGEX_LIBRARY}"
|
||||
IMPORTED_LOCATION_DEBUG "${Boost_REGEX_LIBRARY_DEBUG}"
|
||||
IMPORTED_LOCATION_RELEASE "${Boost_REGEX_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Boost::unit_test_framework)
|
||||
add_library(Boost::unit_test_framework UNKNOWN IMPORTED)
|
||||
set_target_properties(Boost::unit_test_framework PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${boost_system}"
|
||||
IMPORTED_LOCATION "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}"
|
||||
IMPORTED_LOCATION_DEBUG "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG}"
|
||||
IMPORTED_LOCATION_RELEASE "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
@@ -8,7 +8,11 @@
|
||||
# HAVE_METIS - like METIS_FOUND, but for the inclusion in config.h
|
||||
# METIS_INCLUDE_DIRS - incude paths to use libMETIS
|
||||
# METIS_LIBRARIES - Link these to use libMETIS
|
||||
# METIS::METIS - Imported metis target needed for DUNE 2.8.0
|
||||
# METIS_API_VERSION - The METIS api version scotch is supporting.
|
||||
|
||||
set(METIS_API_VERSION 0 CACHE STRING
|
||||
"METIS API version provided by METIS or scotch-metis library")
|
||||
set(METIS_SEARCH_PATH "/usr" "/usr/local" "/opt" "/opt/local")
|
||||
set(METIS_NO_DEFAULT_PATH "")
|
||||
if(METIS_ROOT)
|
||||
@@ -35,9 +39,27 @@ find_library(METIS_LIBRARIES
|
||||
${METIS_NO_DEFAULT_PATH})
|
||||
|
||||
set (METIS_FOUND FALSE)
|
||||
|
||||
if (METIS_INCLUDE_DIRS OR METIS_LIBRARIES)
|
||||
set(METIS_FOUND TRUE)
|
||||
set(HAVE_METIS TRUE)
|
||||
file(READ "${METIS_INCLUDE_DIRS}/metis.h" metisheader)
|
||||
string(REGEX MATCH "#define METIS_VER_MAJOR[ ]+([0-9]+)" METIS_MAJOR_VERSION ${metisheader})
|
||||
if(NOT METIS_API_VERSION AND METIS_MAJOR_VERSION)
|
||||
# string(REGEX REPLACE ".*#define METIS_VER_MAJOR[ ]+([0-9]+).*" "\\1"
|
||||
# METIS_MAJOR_VERSION "${metisheader}")
|
||||
if(METIS_MAJOR_VERSION GREATER_EQUAL 3 AND METIS_MAJOR_VERSION LESS 5)
|
||||
set(METIS_API_VERSION "3")
|
||||
else()
|
||||
set(METIS_API_VERSION "${METIS_MAJOR_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(METIS::METIS UNKNOWN IMPORTED)
|
||||
set_target_properties(METIS::METIS PROPERTIES
|
||||
IMPORTED_LOCATION ${METIS_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${METIS_INCLUDE_DIRS}
|
||||
INTERFACE_COMPILE_DEFINITIONS METIS_API_VERSION=${METIS_API_VERSION})
|
||||
endif()
|
||||
|
||||
# print a message to indicate status of this package
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
# Installs bash tab completion for a product
|
||||
macro(opm_add_bash_completion binary)
|
||||
option(USE_BASH_COMPLETIONS_DIR
|
||||
"Whether to use the new bash completion dir (/usr/share/bash-completion/completions) with load on demand"
|
||||
OFF)
|
||||
if(USE_BASH_COMPLETIONS_DIR)
|
||||
set(_BASH_COMPLETION_FILE ${binary})
|
||||
set(_BASH_COMPLETION_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions)
|
||||
else()
|
||||
set(_BASH_COMPLETION_FILE ${binary}_bash_completion.sh)
|
||||
set(_BASH_COMPLETION_INSTALL_DIR ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d)
|
||||
endif()
|
||||
set(PRODUCT ${binary})
|
||||
configure_file(${OPM_MACROS_ROOT}/etc/opm_bash_completion.sh.in ${binary}_bash_completion.sh @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/${binary}_bash_completion.sh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d)
|
||||
configure_file(${OPM_MACROS_ROOT}/etc/opm_bash_completion.sh.in ${_BASH_COMPLETION_FILE} @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/${_BASH_COMPLETION_FILE} DESTINATION ${_BASH_COMPLETION_INSTALL_DIR})
|
||||
endmacro()
|
||||
|
||||
@@ -130,9 +130,18 @@ macro (find_and_append_package_to prefix name)
|
||||
# and the likes which is only done via opm_find_package
|
||||
if ( (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND )
|
||||
OR _search_components GREATER -1)
|
||||
string(REGEX MATCH "(opm)-.*" _is_opm ${name})
|
||||
string(REGEX MATCH "(opm)-.*" _is_opm ${name})
|
||||
if(NOT _is_opm)
|
||||
find_package (${name} ${ARGN})
|
||||
# When using Boost >= 1.70 and e.g. CMake 3.18 we need to make sure that
|
||||
# subsequent searches are using config mode too. Otherwise the library
|
||||
# list will be completely messed up. We use a set Boost_Dir to detect that
|
||||
# previous searches were done using config mode.
|
||||
if("${name}" STREQUAL "Boost" AND Boost_DIR)
|
||||
set(_CONFIG_MODE CONFIG)
|
||||
else()
|
||||
set(_CONFIG_MODE "")
|
||||
endif()
|
||||
find_package (${name} ${ARGN} ${_CONFIG_MODE})
|
||||
else()
|
||||
if(${name}_DIR)
|
||||
find_package (${name} ${${prefix}_VERSION_MAJOR}.${${prefix}_VERSION_MINOR} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH)
|
||||
|
||||
@@ -138,14 +138,9 @@ endif ()
|
||||
# Compiler standard version needs to be requested here as prereqs is included
|
||||
# before OpmLibMain and some tests need/use CXX_STANDARD_VERSION (e.g. pybind11)
|
||||
# Languages and global compiler settings
|
||||
if(CMAKE_VERSION VERSION_LESS 3.8)
|
||||
message(WARNING "CMake version does not support c++17, guessing -std=c++17")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# quadmath must be explicitly enabled
|
||||
# This needs to be in OpmInit as prereqs is called before OpmLibMain is included.
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
find_package (Boost 1.44.0 COMPONENTS unit_test_framework QUIET)
|
||||
# When using Boost >= 1.70 and e.g. CMake 3.18 we need to make sure that
|
||||
# subsequent searches are using config mode too. Otherwise the library
|
||||
# list will be completely messed up. We use a set Boost_Dir to detect that
|
||||
# previous searches were done using config mode.
|
||||
if(Boost_DIR)
|
||||
set(_Boost_CONFIG_MODE CONFIG)
|
||||
endif()
|
||||
find_package (Boost 1.44.0 COMPONENTS unit_test_framework QUIET ${_Boost_CONFIG_MODE})
|
||||
|
||||
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
# setup to do a test compile
|
||||
|
||||
@@ -63,9 +63,9 @@ if (CXX_COMPAT_GCC)
|
||||
|
||||
# use these options for release builds - full optimization
|
||||
add_options (ALL_LANGUAGES "${_prof_RELEASE}" ${_opt_rel} ${_opt_flags})
|
||||
option(WITH_NDEBUG "Disable asserts in release mode" ON)
|
||||
if(WITH_NDEBUG)
|
||||
add_options (ALL_LANGUAGES "${_prof_RELEASE}" -DNDEBUG)
|
||||
option(WITH_NDEBUG "Disable asserts in release mode" OFF)
|
||||
if(NOT WITH_NDEBUG)
|
||||
add_options (ALL_LANGUAGES "${_prof_RELEASE}" -UNDEBUG)
|
||||
endif()
|
||||
|
||||
else ()
|
||||
|
||||
@@ -816,7 +816,7 @@ HTML_COLORSTYLE_GAMMA = 80
|
||||
# page will contain the date and time when the page was generated. Setting
|
||||
# this to NO can help when comparing the output of multiple runs.
|
||||
|
||||
HTML_TIMESTAMP = YES
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
|
||||
@@ -93,6 +93,16 @@ if(NOT @opm-project_NAME@_FOUND)
|
||||
|
||||
# this is the contents of config.h as far as our probes can tell:
|
||||
|
||||
# Require correct CMake standard. Needed for user modules as
|
||||
# some software will add incompatible compile switches like
|
||||
# -std=gnu++11 otherwise when search for (I guess because of
|
||||
# imported targets using INTERFACE_COMPILE_FEATURES), and will
|
||||
# break compilation because of missing c++17 features.
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
# The settings in this block do not mix well with the DEST_PREFIX
|
||||
# setting.
|
||||
@@ -104,6 +114,7 @@ if(NOT @opm-project_NAME@_FOUND)
|
||||
@OPM_PROJECT_EXTRA_CODE@
|
||||
# end extra code
|
||||
|
||||
include(OpmPackage)
|
||||
include(@opm-project_NAME@-prereqs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
||||
opm-common (2019.04-pre~xenial) xenial; urgency=medium
|
||||
opm-common (2021.10-rc1-1~bionic) bionic; urgency=medium
|
||||
|
||||
* New release
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ we currently have five different categories:
|
||||
|
||||
To infer the number of records in the keyword based on an
|
||||
internal calculation is not supported, hence for these keywords
|
||||
size is given as unkown, and the keywords are terminated when the
|
||||
size is given as unknown, and the keywords are terminated when the
|
||||
next valid keyword is found:
|
||||
|
||||
{"name" : "VFPPROD" , "size" : "UNKNOWN", ....
|
||||
|
||||
7
docs/man1/rst_deck.1
Normal file
7
docs/man1/rst_deck.1
Normal file
@@ -0,0 +1,7 @@
|
||||
.TH RST_DECK
|
||||
.SH NAME
|
||||
rst_deck \- Create a version of deck ready for restart
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Module: opm-common
|
||||
Description: Open Porous Media Initiative shared infrastructure
|
||||
Version: 2021.04-pre
|
||||
Label: 2021.04-pre
|
||||
Version: 2021.10-rc1
|
||||
Label: 2021.10-rc1
|
||||
Maintainer: opm@opm-project.org
|
||||
MaintainerName: OPM community
|
||||
Url: http://opm-project.org
|
||||
|
||||
@@ -39,7 +39,7 @@ static void printHelp() {
|
||||
std::cout << "\nThis program create one or more lodsmry files, designed for effective load on the demand. \n"
|
||||
<< "These files are created with input from the smspec and unsmry file. \n"
|
||||
<< "\nIn addition, the program takes these options (which must be given before the arguments):\n\n"
|
||||
<< "-f if LODSMRY file exist, this will be replaced. Default behaviour is that existing file is kept.\n"
|
||||
<< "-f if ESMRY file exist, this will be replaced. Default behaviour is that existing file is kept.\n"
|
||||
<< "-n Maximum number of threads to be used if mulitple files should be created.\n"
|
||||
<< "-h Print help and exit.\n\n";
|
||||
}
|
||||
@@ -48,7 +48,9 @@ static void printHelp() {
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
int c = 0;
|
||||
int max_threads [[maybe_unused]] = -1;
|
||||
#ifdef _OPENMP
|
||||
int max_threads = -1;
|
||||
#endif
|
||||
bool force = false;
|
||||
|
||||
while ((c = getopt(argc, argv, "fn:h")) != -1) {
|
||||
@@ -60,7 +62,11 @@ int main(int argc, char **argv) {
|
||||
printHelp();
|
||||
return 0;
|
||||
case 'n':
|
||||
#ifdef _OPENMP
|
||||
max_threads = atoi(optarg);
|
||||
#else
|
||||
std::cerr << "OpenMP is disabled - using single thread only\n";
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
return EXIT_FAILURE;
|
||||
@@ -89,21 +95,21 @@ int main(int argc, char **argv) {
|
||||
for (int f = argOffset; f < argc; f ++){
|
||||
Opm::filesystem::path inputFileName = argv[f];
|
||||
|
||||
Opm::filesystem::path lodFileName = inputFileName.parent_path() / inputFileName.stem();
|
||||
lodFileName = lodFileName += ".LODSMRY";
|
||||
Opm::filesystem::path esmryFileName = inputFileName.parent_path() / inputFileName.stem();
|
||||
esmryFileName = esmryFileName += ".ESMRY";
|
||||
|
||||
if (Opm::EclIO::fileExists(lodFileName) && (force))
|
||||
remove (lodFileName);
|
||||
if (Opm::EclIO::fileExists(esmryFileName) && (force))
|
||||
remove (esmryFileName);
|
||||
|
||||
Opm::EclIO::ESmry smryFile(argv[f]);
|
||||
if (!smryFile.make_lodsmry_file()){
|
||||
if (!smryFile.make_esmry_file()){
|
||||
std::cout << "\n! Warning, smspec already have one lod file, existing kept use option -f to replace this" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
auto lap1 = std::chrono::system_clock::now();
|
||||
std::chrono::duration<double> elapsed_seconds1 = lap1-lap0;
|
||||
std::cout << "\nruntime for creating " << (argc-argOffset) << " LODSMRY files: " << elapsed_seconds1.count() << " seconds\n" << std::endl;
|
||||
std::cout << "\nruntime for creating " << (argc-argOffset) << " ESMRY files: " << elapsed_seconds1.count() << " seconds\n" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <cstdlib>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
@@ -49,7 +51,7 @@ struct keyword {
|
||||
};
|
||||
|
||||
|
||||
std::vector<keyword> load_deck(const char * deck_file) {
|
||||
std::vector<keyword> load_deck(const std::string& deck_file) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ErrorGuard errors;
|
||||
Opm::Parser parser;
|
||||
@@ -73,7 +75,7 @@ std::vector<keyword> load_deck(const char * deck_file) {
|
||||
}
|
||||
|
||||
|
||||
std::size_t deck_hash(const std::vector<keyword>& keywords) {
|
||||
std::size_t make_deck_hash(const std::vector<keyword>& keywords) {
|
||||
std::stringstream ss;
|
||||
for (const auto& kw : keywords)
|
||||
ss << kw.content_hash;
|
||||
@@ -82,14 +84,14 @@ std::size_t deck_hash(const std::vector<keyword>& keywords) {
|
||||
}
|
||||
|
||||
|
||||
void print_keywords(const std::vector<keyword>& keywords, bool location_info) {
|
||||
void print_keywords(const std::vector<keyword>& keywords, std::size_t deck_hash, bool location_info) {
|
||||
for (const auto& kw : keywords) {
|
||||
if (location_info)
|
||||
fmt::print("{:8s} : {}:{} {} \n", kw.name, kw.filename, kw.line_number, kw.content_hash);
|
||||
else
|
||||
fmt::print("{:8s} : {} \n", kw.name, kw.content_hash);
|
||||
}
|
||||
fmt::print("\n{:8s} : {}\n", "Total", deck_hash(keywords));
|
||||
fmt::print("\n{:8s} : {}\n", "Total", deck_hash);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +120,12 @@ Options:
|
||||
|
||||
-l : Add filename and linenumber information to each keyword.
|
||||
-s : Short form - only print the hash of the complete deck.
|
||||
-S : Silent form - will not print any deck output.
|
||||
|
||||
It is possible to add multiple deck arguments, they are then scanned repeatedly,
|
||||
and the decks are compared. In the case of multiple deck arguments the exit
|
||||
status of the program will be zero if all are equal and nonzero in case of
|
||||
differences.
|
||||
|
||||
)";
|
||||
std::cerr << help_text << std::endl;
|
||||
@@ -129,10 +137,11 @@ int main(int argc, char** argv) {
|
||||
int arg_offset = 1;
|
||||
bool location_info = false;
|
||||
bool short_form = false;
|
||||
bool silent = false;
|
||||
|
||||
while (true) {
|
||||
int c;
|
||||
c = getopt(argc, argv, "ls");
|
||||
c = getopt(argc, argv, "lsS");
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
@@ -143,16 +152,53 @@ int main(int argc, char** argv) {
|
||||
case 's':
|
||||
short_form = true;
|
||||
break;
|
||||
case 'S':
|
||||
silent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
arg_offset = optind;
|
||||
if (arg_offset >= argc)
|
||||
print_help_and_exit();
|
||||
|
||||
auto keywords = load_deck(argv[arg_offset]);
|
||||
if (short_form)
|
||||
std::cout << deck_hash(keywords) << std::endl;
|
||||
else
|
||||
print_keywords(keywords, location_info);
|
||||
|
||||
std::vector<std::pair<std::string, std::size_t>> deck_hash_table;
|
||||
for (int iarg = arg_offset; iarg < argc; iarg++) {
|
||||
const std::string deck_file = argv[iarg];
|
||||
auto keywords = load_deck(deck_file);
|
||||
auto deck_hash = make_deck_hash(keywords);
|
||||
deck_hash_table.emplace_back(deck_file, deck_hash);
|
||||
if (silent)
|
||||
continue;
|
||||
|
||||
if (short_form)
|
||||
std::cout << deck_hash << std::endl;
|
||||
else
|
||||
print_keywords(keywords, deck_hash, location_info);
|
||||
}
|
||||
|
||||
if (deck_hash_table.size() > 1) {
|
||||
bool equal = true;
|
||||
const auto& [first_deck, first_hash] = deck_hash_table[0];
|
||||
for (std::size_t index = 1; index < deck_hash_table.size(); index++) {
|
||||
const auto& [deck, hash] = deck_hash_table[index];
|
||||
if (first_hash != hash)
|
||||
equal = false;
|
||||
|
||||
if (silent)
|
||||
continue;
|
||||
|
||||
fmt::print("{} {} {}\n",
|
||||
first_deck,
|
||||
(first_hash == hash) ? "==" : "!=",
|
||||
deck);
|
||||
}
|
||||
|
||||
if (equal)
|
||||
std::exit(EXIT_SUCCESS);
|
||||
else
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
271
examples/rst_deck.cpp
Normal file
271
examples/rst_deck.cpp
Normal file
@@ -0,0 +1,271 @@
|
||||
/*
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <fmt/format.h>
|
||||
#include <unordered_set>
|
||||
|
||||
#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>
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
|
||||
const std::unordered_set<std::string> remove_from_solution = {"EQUIL", "PRESSURE", "SWAT", "SGAS"};
|
||||
|
||||
void print_help_and_exit(const std::optional<std::string> error_msg = {}) {
|
||||
|
||||
if (error_msg.has_value()) {
|
||||
std::cerr << "Error:" << std::endl;
|
||||
std::cerr << error_msg.value() << std::endl;
|
||||
std::cerr << "------------------------------------------------------" << std::endl;
|
||||
}
|
||||
|
||||
std::string keep_keywords;
|
||||
for (const auto& kw : Opm::FileDeck::rst_keep_in_solution)
|
||||
keep_keywords += kw + " ";
|
||||
|
||||
const std::string help_text = fmt::format(R"(
|
||||
|
||||
The rst_deck program will load a simulation deck and parameters for a restart
|
||||
and reformat the deck to become a restart deck. Before the updated deck is
|
||||
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).
|
||||
|
||||
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
|
||||
alternative location or create one large file with all keywords in the same
|
||||
file. Apart from the alterations to support restart the output deck will be
|
||||
equivalent to the input deck, but formatting is not retained and comments have
|
||||
been stripped away.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
optional, if it is not provided the program will dump a restart deck on
|
||||
stdout. If the argument corresponds to an existing directory the restart case
|
||||
will get the same name as the base case.
|
||||
|
||||
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
|
||||
|
||||
-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
|
||||
'inline' the restart deck will be one long file and with mode 'copy' the
|
||||
file structure of the base case will be retained. The default if no -m
|
||||
option is given is the 'share' mode.
|
||||
|
||||
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.
|
||||
|
||||
Example:
|
||||
|
||||
rst_deck /path/to/history/HISTORY.DATA rst/HISTORY:30 /path/to/rst/RESTART -s
|
||||
|
||||
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;
|
||||
if (error_msg.has_value())
|
||||
std::exit(EXIT_FAILURE);
|
||||
|
||||
std::exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct options {
|
||||
std::string input_deck;
|
||||
std::pair<std::string, int> restart;
|
||||
std::optional<std::string> target;
|
||||
|
||||
Opm::FileDeck::OutputMode mode{Opm::FileDeck::OutputMode::SHARE};
|
||||
bool skiprest{false};
|
||||
};
|
||||
|
||||
|
||||
Opm::FileDeck load_deck(const options& opt) {
|
||||
Opm::ParseContext parseContext(Opm::InputError::WARN);
|
||||
Opm::ErrorGuard errors;
|
||||
Opm::Parser parser;
|
||||
|
||||
/* Use the same default ParseContext as flow. */
|
||||
parseContext.update(Opm::ParseContext::PARSE_RANDOM_SLASH, Opm::InputError::IGNORE);
|
||||
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 };
|
||||
}
|
||||
|
||||
|
||||
Opm::FileDeck::OutputMode mode(const std::string& mode_arg) {
|
||||
if (mode_arg == "inline")
|
||||
return Opm::FileDeck::OutputMode::INLINE;
|
||||
|
||||
if (mode_arg == "share")
|
||||
return Opm::FileDeck::OutputMode::SHARE;
|
||||
|
||||
if (mode_arg == "copy")
|
||||
return Opm::FileDeck::OutputMode::COPY;
|
||||
|
||||
print_help_and_exit(fmt::format("Mode argument: \'{}\' not recognized. Valid options are inline|share|copy", 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"));
|
||||
|
||||
return std::make_pair(restart_base.substr(0, sep_pos), std::stoi(restart_base.substr(sep_pos + 1)));
|
||||
}
|
||||
|
||||
|
||||
options load_options(int argc, char **argv) {
|
||||
options opt;
|
||||
while (true) {
|
||||
int c;
|
||||
c = getopt(argc, argv, "hm:s");
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch(c) {
|
||||
case 'm':
|
||||
opt.mode = mode(optarg);
|
||||
break;
|
||||
case 's':
|
||||
opt.skiprest = true;
|
||||
break;
|
||||
case 'h':
|
||||
print_help_and_exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
auto arg_offset = optind;
|
||||
if (arg_offset >= argc)
|
||||
print_help_and_exit();
|
||||
|
||||
opt.input_deck = argv[arg_offset];
|
||||
opt.restart = split_restart(argv[arg_offset + 1]);
|
||||
if ((argc - arg_offset) >= 3) {
|
||||
opt.target = argv[arg_offset + 2];
|
||||
if (opt.mode == Opm::FileDeck::OutputMode::COPY) {
|
||||
auto target = fs::path(opt.target.value()).parent_path();
|
||||
if (fs::exists(target)) {
|
||||
auto input = fs::path(opt.input_deck).parent_path();
|
||||
if (fs::equivalent(target, input))
|
||||
opt.mode = Opm::FileDeck::OutputMode::SHARE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (opt.mode == Opm::FileDeck::OutputMode::COPY)
|
||||
print_help_and_exit("When writing output to stdout you must use inline|share mode");
|
||||
}
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
||||
|
||||
void update_solution(const options& opt, Opm::FileDeck& file_deck)
|
||||
{
|
||||
if (opt.restart.second == 0)
|
||||
return;
|
||||
|
||||
const auto solution = file_deck.find("SOLUTION");
|
||||
if (!solution.has_value())
|
||||
print_help_and_exit(fmt::format("Could not find SOLUTION section in input deck: {}", opt.input_deck));
|
||||
|
||||
auto summary = file_deck.find("SUMMARY");
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
void update_schedule(const options& opt, Opm::FileDeck& file_deck)
|
||||
{
|
||||
if (opt.restart.second == 0)
|
||||
return;
|
||||
|
||||
if (opt.skiprest)
|
||||
file_deck.insert_skiprest();
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
auto options = load_options(argc, argv);
|
||||
auto file_deck = load_deck(options);
|
||||
update_solution(options, file_deck);
|
||||
update_schedule(options, file_deck);
|
||||
if (!options.target.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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
|
||||
@@ -222,8 +222,12 @@ function build_downstreams {
|
||||
|
||||
# $1 = Name of main module
|
||||
function build_module_full {
|
||||
PY_MAJOR=`python3 --version | awk -F ' ' '{print $2}' | awk -F '.' '{print $1}'`
|
||||
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"
|
||||
|
||||
# Build upstream modules
|
||||
build_upstreams
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ then
|
||||
if ! test -d $WORKSPACE/deps/opm-tests
|
||||
then
|
||||
cp $OPM_TESTS_ROOT_PREDEFINED $WORKSPACE/deps/opm-tests -R
|
||||
pushd $WORKSPACE/deps/opm-tests
|
||||
echo "opm-tests revision: `git rev-parse HEAD`"
|
||||
popd
|
||||
fi
|
||||
else
|
||||
# We need a full repo checkout
|
||||
@@ -29,6 +32,9 @@ else
|
||||
if ! test -d $WORKSPACE/deps/opm-tests
|
||||
then
|
||||
cp $OPM_TESTS_ROOT $WORKSPACE/deps/opm-tests -R
|
||||
pushd $WORKSPACE/deps/opm-tests
|
||||
echo "opmt-tests-revision: `git rev-parse HEAD`"
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
OPM_TESTS_ROOT=$WORKSPACE/deps/opm-tests
|
||||
|
||||
@@ -37,14 +37,14 @@ do
|
||||
prnumber=${rev//[!0-9]/}
|
||||
BRANCH_NAME="${BRANCH_NAME}_${repo}_$prnumber"
|
||||
test -n "$REASON" && REASON+=" "
|
||||
REASON+="https://github.com/OPM/$repo/pull/$prnumber\n"
|
||||
REASON+="PR https://github.com/OPM/$repo/pull/$prnumber\n"
|
||||
fi
|
||||
done
|
||||
|
||||
# Do the commit
|
||||
export REASON
|
||||
export BRANCH_NAME
|
||||
$WORKSPACE/deps/opm-simulators/tests/update_reference_data.sh $OPM_TESTS_ROOT
|
||||
$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
|
||||
then
|
||||
echo "No tests failed - no data to update. Exiting"
|
||||
@@ -90,7 +90,7 @@ fi
|
||||
|
||||
if [ -n "$DATA_PR" ]
|
||||
then
|
||||
curl -d "{ \"body\": \"Existing PR https://github.com/OPM/opm-tests/pull/$DATA_PR was updated\" }" -X POST https://api.github.com/repos/OPM/$MAIN_REPO/issues/$PRNUMBER/comments?access_token=$GH_TOKEN
|
||||
curl -d "{ \"body\": \"Existing PR https://github.com/OPM/opm-tests/pull/$DATA_PR was updated\" }" -H "Authorization: token ${GH_TOKEN}" -X POST https://api.github.com/repos/OPM/$MAIN_REPO/issues/$PRNUMBER/comments
|
||||
else
|
||||
git-open-pull -u jenkins4opm --base-account OPM --base-repo opm-tests -r /tmp/cmsg $BRANCH_NAME
|
||||
fi
|
||||
|
||||
@@ -27,6 +27,7 @@ class Parser;
|
||||
class Python;
|
||||
class SummaryState;
|
||||
class UDQState;
|
||||
class WellTestState;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
@@ -48,10 +49,10 @@ public:
|
||||
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);
|
||||
private:
|
||||
|
||||
void run_step(const Schedule& schedule, Action::State& action_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, 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, 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, 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(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;
|
||||
|
||||
EclipseState state;
|
||||
std::map<std::string, std::map<data::Rates::opt, std::function<well_rate_function>>> well_rates;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
#include <opm/output/eclipse/Inplace.hpp>
|
||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||
@@ -33,6 +34,7 @@
|
||||
#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>
|
||||
@@ -49,6 +51,7 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
data::Solution sol;
|
||||
SummaryState st(TimeService::from_time_t(schedule.getStartTime()));
|
||||
UDQState udq_state(schedule.getUDQConfig(0).params().undefinedValue());
|
||||
WellTestState wtest_state;
|
||||
Action::State action_state;
|
||||
Python python;
|
||||
|
||||
@@ -57,10 +60,10 @@ 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, st, udq_state, sol, well_data, group_nwrk_data, report_step, io);
|
||||
run_step(schedule, action_state, wtest_state, st, 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, st, udq_state, sol, well_data, group_nwrk_data, report_step, time_step, io);
|
||||
run_step(schedule, action_state, wtest_state, st, 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);
|
||||
@@ -94,12 +97,12 @@ void msim::post_step(Schedule& schedule, Action::State& action_state, SummarySta
|
||||
|
||||
|
||||
|
||||
void msim::run_step(const Schedule& schedule, Action::State& action_state, SummaryState& st, 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, st, 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& 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(const Schedule& schedule, Action::State& action_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 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);
|
||||
double seconds_elapsed = start_time;
|
||||
@@ -109,7 +112,7 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
||||
if ((seconds_elapsed + time_step) > end_time)
|
||||
time_step = end_time - seconds_elapsed;
|
||||
|
||||
this->simulate(schedule, st, sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
||||
this->simulate(schedule, wtest_state, st, sol, well_data, group_nwrk_data, report_step, seconds_elapsed, time_step);
|
||||
|
||||
seconds_elapsed += time_step;
|
||||
|
||||
@@ -126,6 +129,7 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
||||
schedule.getUDQConfig( report_step ).eval(report_step, schedule.wellMatcher(report_step), st, udq_state);
|
||||
|
||||
this->output(action_state,
|
||||
wtest_state,
|
||||
st,
|
||||
udq_state,
|
||||
report_step,
|
||||
@@ -140,19 +144,20 @@ void msim::run_step(const Schedule& schedule, Action::State& action_state, Summa
|
||||
|
||||
|
||||
|
||||
void msim::output(Action::State& action_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 {
|
||||
RestartValue value(sol, well_data, group_nwrk_data);
|
||||
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 {
|
||||
RestartValue value(sol, well_data, group_nwrk_data, {});
|
||||
io.writeTimeStep(action_state,
|
||||
wtest_state,
|
||||
st,
|
||||
udq_state,
|
||||
report_step,
|
||||
substep,
|
||||
seconds_elapsed,
|
||||
value);
|
||||
std::move(value));
|
||||
}
|
||||
|
||||
|
||||
void msim::simulate(const Schedule& schedule, 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(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 {
|
||||
for (const auto& sol_pair : this->solutions) {
|
||||
auto func = sol_pair.second;
|
||||
func(this->state, schedule, sol, report_step, seconds_elapsed + time_step);
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
do { \
|
||||
std::ostringstream oss__; \
|
||||
oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \
|
||||
Opm::OpmLog::error(oss__.str()); \
|
||||
::Opm::OpmLog::error(oss__.str()); \
|
||||
throw Exception(oss__.str()); \
|
||||
} while (false)
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include <opm/common/OpmLog/KeywordLocation.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class KeywordLocation;
|
||||
|
||||
namespace Log {
|
||||
namespace MessageType {
|
||||
const int64_t Debug = 1; /* Excessive information */
|
||||
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
static bool stdoutIsTerminal();
|
||||
|
||||
private:
|
||||
static std::shared_ptr<Logger> getLogger();
|
||||
static std::shared_ptr<Logger> m_logger;
|
||||
|
||||
@@ -34,8 +34,11 @@ 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
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_SERIALIZER_HPP
|
||||
#define OPM_SERIALIZER_HPP
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#ifndef OPM_SERIALIZER_HPP
|
||||
#define OPM_SERIALIZER_HPP
|
||||
|
||||
namespace Opm {
|
||||
/*
|
||||
This is a very basic serialization class used to support serialization of
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -103,6 +107,25 @@ inline std::vector<std::string> split_string(const std::string& input,
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::string format_double(double d) {
|
||||
double integral_part;
|
||||
const double decimal_part = std::modf(d, &integral_part);
|
||||
|
||||
if (decimal_part == 0)
|
||||
return std::to_string(static_cast<int>(d));
|
||||
else
|
||||
return std::to_string(d);
|
||||
}
|
||||
|
||||
|
||||
inline std::optional<double> try_parse_double(const std::string& token) {
|
||||
char * end_ptr;
|
||||
auto value = std::strtod(token.c_str(), &end_ptr);
|
||||
if (std::strlen(end_ptr) == 0)
|
||||
return value;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
}
|
||||
#endif //OPM_UTILITY_STRING_HPP
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
@@ -38,7 +39,13 @@ namespace Opm {
|
||||
std::time_t advance(const std::time_t tp, const double sec);
|
||||
std::time_t makeUTCTime(std::tm timePoint);
|
||||
const std::unordered_map<std::string , int>& eclipseMonthIndices();
|
||||
const std::unordered_map<int, std::string>& eclipseMonthNames();
|
||||
int eclipseMonth(const std::string& name);
|
||||
bool valid_month(const std::string& month_name);
|
||||
|
||||
std::time_t mkdatetime(int in_year, int in_month, int in_day, int hour, int minute, int second);
|
||||
std::time_t mkdate(int in_year, int in_month, int in_day);
|
||||
std::time_t timeFromEclipse(const DeckRecord &dateRecord);
|
||||
}
|
||||
|
||||
class TimeStampUTC
|
||||
@@ -115,6 +122,8 @@ namespace Opm {
|
||||
TimeStampUTC operator+(const TimeStampUTC& lhs, std::chrono::duration<double> delta);
|
||||
std::time_t asTimeT(const TimeStampUTC& tp);
|
||||
std::time_t asLocalTimeT(const TimeStampUTC& tp);
|
||||
time_point asTimePoint(const TimeStampUTC& tp);
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Created: Mon Jun 29 15:28:59 2009
|
||||
//
|
||||
// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
// B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 16:00:21 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:11:11 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:06:46 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
@@ -142,7 +142,7 @@ namespace Opm {
|
||||
assignments.push_back(std::make_pair(name, value));
|
||||
continue;
|
||||
}
|
||||
OpmLog::warning("Too many assignements (' "
|
||||
OpmLog::warning("Too many assignments (' "
|
||||
+ ID_delimiter_assignment
|
||||
+ "') detected in argument " + to_string(i));
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:05:54 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:05:02 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:04:15 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created: Tue Jun 2 19:02:19 2009
|
||||
//
|
||||
// Author(s): B<EFBFBD>rd Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Author(s): Bård Skaflestad <bard.skaflestad@sintef.no>
|
||||
// Atgeirr F Rasmussen <atgeirr@sintef.no>
|
||||
//
|
||||
// $Date$
|
||||
|
||||
@@ -48,6 +48,9 @@ public:
|
||||
void getCellCorners(int globindex, std::array<double,8>& X, std::array<double,8>& Y, std::array<double,8>& Z);
|
||||
void getCellCorners(const std::array<int, 3>& ijk, std::array<double,8>& X, std::array<double,8>& Y, std::array<double,8>& Z);
|
||||
|
||||
std::vector<std::array<float, 3>> getXYZ_layer(int layer, bool bottom=false);
|
||||
std::vector<std::array<float, 3>> getXYZ_layer(int layer, const std::array<int, 4>& box, bool bottom=false);
|
||||
|
||||
int activeCells() const { return nactive; }
|
||||
int totalNumberOfCells() const { return nijk[0] * nijk[1] * nijk[2]; }
|
||||
|
||||
@@ -64,11 +67,17 @@ public:
|
||||
|
||||
const std::vector<std::string>& list_of_lgrs() const { return lgr_names; }
|
||||
|
||||
const std::vector<float>& get_mapaxes() const { return m_mapaxes; }
|
||||
const std::string& get_mapunits() const { return m_mapunits; }
|
||||
|
||||
private:
|
||||
Opm::filesystem::path inputFileName, initFileName;
|
||||
std::string m_grid_name;
|
||||
bool m_radial;
|
||||
|
||||
std::vector<float> m_mapaxes;
|
||||
std::string m_mapunits;
|
||||
|
||||
std::array<int, 3> nijk;
|
||||
std::array<int, 3> host_nijk;
|
||||
|
||||
@@ -93,6 +102,12 @@ private:
|
||||
int actnum_array_index;
|
||||
int nnc1_array_index;
|
||||
int nnc2_array_index;
|
||||
|
||||
std::vector<float> get_zcorn_from_disk(int layer, bool bottom);
|
||||
|
||||
void getCellCorners(const std::array<int, 3>& ijk, const std::vector<float>& zcorn_layer,
|
||||
std::array<double,4>& X, std::array<double,4>& Y, std::array<double,4>& Z);
|
||||
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
@@ -51,35 +51,7 @@ public:
|
||||
protected:
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& ImplgetInitData(const std::string& name, const std::string& grid_name = "global")
|
||||
{
|
||||
int arr_ind = get_array_index(name, grid_name);
|
||||
|
||||
if constexpr (std::is_same_v<T, int>)
|
||||
return getImpl(arr_ind, INTE, inte_array, "integer");
|
||||
|
||||
if constexpr (std::is_same_v<T, float>)
|
||||
return getImpl(arr_ind, REAL, real_array, "float");
|
||||
|
||||
if constexpr (std::is_same_v<T, double>)
|
||||
return getImpl(arr_ind, DOUB, doub_array, "double");
|
||||
|
||||
if constexpr (std::is_same_v<T, bool>)
|
||||
return getImpl(arr_ind, LOGI, logi_array, "bool");
|
||||
|
||||
if constexpr (std::is_same_v<T, std::string>)
|
||||
{
|
||||
if (array_type[arr_ind] == Opm::EclIO::CHAR)
|
||||
return getImpl(arr_ind, array_type[arr_ind], char_array, "char");
|
||||
|
||||
if (array_type[arr_ind] == Opm::EclIO::C0NN)
|
||||
return getImpl(arr_ind, array_type[arr_ind], char_array, "c0nn");
|
||||
|
||||
OPM_THROW(std::runtime_error, "Array not of type CHAR or C0nn");
|
||||
}
|
||||
|
||||
OPM_THROW(std::runtime_error, "type not supported");
|
||||
}
|
||||
const std::vector<T>& ImplgetInitData(const std::string& name, const std::string& grid_name = "global");
|
||||
|
||||
private:
|
||||
std::array<int, 3> global_nijk;
|
||||
|
||||
@@ -53,9 +53,6 @@ public:
|
||||
template <typename T>
|
||||
const std::vector<T>& getRestartData(const std::string& name, int reportStepNumber, int occurrence);
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& getRestartData(const std::string& name, int reportStepNumber, const std::string& lgr_name);
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& getRestartData(int index, int reportStepNumber)
|
||||
{
|
||||
@@ -64,16 +61,10 @@ public:
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const std::vector<T>& getRestartData(int index, int reportStepNumber, const std::string& lgr_name)
|
||||
{
|
||||
auto indRange = this->getIndexRange(reportStepNumber);
|
||||
const std::vector<T>& getRestartData(const std::string& name, int reportStepNumber, const std::string& lgr_name);
|
||||
|
||||
if ((std::get<0>(indRange) + index) > std::get<1>(indRange))
|
||||
OPM_THROW(std::invalid_argument, "getRestartData, index out of range");
|
||||
|
||||
int start_ind = get_start_index_lgrname(reportStepNumber, lgr_name);
|
||||
return this->get<T>(index + start_ind);
|
||||
}
|
||||
template <typename T>
|
||||
const std::vector<T>& getRestartData(int index, int reportStepNumber, const std::string& lgr_name);
|
||||
|
||||
int occurrence_count(const std::string& name, int reportStepNumber) const;
|
||||
size_t numberOfReportSteps() const { return seqnum.size(); };
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace Opm { namespace EclIO {
|
||||
|
||||
using ArrSourceEntry = std::tuple<std::string, std::string, int, uint64_t>;
|
||||
using TimeStepEntry = std::tuple<int, int, uint64_t>;
|
||||
using RstEntry = std::tuple<std::string, int>;
|
||||
|
||||
class ESmry
|
||||
{
|
||||
@@ -58,7 +59,7 @@ public:
|
||||
void LoadData(const std::vector<std::string>& vectList) const;
|
||||
void LoadData() const;
|
||||
|
||||
bool make_lodsmry_file();
|
||||
bool make_esmry_file();
|
||||
|
||||
time_point startdate() const { return startdat; }
|
||||
|
||||
@@ -74,13 +75,17 @@ public:
|
||||
const std::string& get_unit(const SummaryNode& node) const;
|
||||
|
||||
void write_rsm(std::ostream&) const;
|
||||
void write_rsm_file(std::optional<Opm::filesystem::path> = std::nullopt) const;
|
||||
void write_rsm_file(std::optional<filesystem::path> = std::nullopt) const;
|
||||
|
||||
bool all_steps_available();
|
||||
|
||||
private:
|
||||
Opm::filesystem::path inputFileName, lodFileName;
|
||||
|
||||
filesystem::path inputFileName;
|
||||
RstEntry restart_info;
|
||||
|
||||
int nI, nJ, nK, nSpecFiles;
|
||||
bool fromSingleRun, lodEnabeled;
|
||||
uint64_t lod_offset, lod_arr_size;
|
||||
bool fromSingleRun;
|
||||
size_t nVect, nTstep;
|
||||
|
||||
std::vector<bool> formattedFiles;
|
||||
@@ -88,6 +93,7 @@ private:
|
||||
mutable std::vector<std::vector<float>> vectorData;
|
||||
mutable std::vector<bool> vectorLoaded;
|
||||
std::vector<TimeStepEntry> timeStepList;
|
||||
std::vector<TimeStepEntry> miniStepList;
|
||||
std::vector<std::map<int, int>> arrayPos;
|
||||
std::vector<std::string> keyword;
|
||||
std::map<std::string, int> keyword_index;
|
||||
@@ -96,6 +102,7 @@ private:
|
||||
std::vector<std::vector<std::string>> keywordListSpecFile;
|
||||
|
||||
std::vector<int> seqIndex;
|
||||
std::vector<int> mini_steps;
|
||||
|
||||
void ijk_from_global_index(int glob, int &i, int &j, int &k) const;
|
||||
|
||||
@@ -104,15 +111,17 @@ private:
|
||||
|
||||
time_point startdat;
|
||||
|
||||
std::vector<std::string> checkForMultipleResultFiles(const Opm::filesystem::path& rootN, bool formatted) const;
|
||||
std::vector<std::string> checkForMultipleResultFiles(const filesystem::path& rootN, bool formatted) const;
|
||||
|
||||
void getRstString(const std::vector<std::string>& restartArray,
|
||||
Opm::filesystem::path& pathRst,
|
||||
Opm::filesystem::path& rootN) const;
|
||||
filesystem::path& pathRst,
|
||||
filesystem::path& rootN) const;
|
||||
|
||||
void updatePathAndRootName(Opm::filesystem::path& dir, Opm::filesystem::path& rootN) const;
|
||||
void updatePathAndRootName(filesystem::path& dir, filesystem::path& rootN) const;
|
||||
|
||||
std::string makeKeyString(const std::string& keyword, const std::string& wgname, int num) const;
|
||||
|
||||
std::string makeKeyString(const std::string& keyword, const std::string& wgname, int num,
|
||||
const std::optional<Opm::EclIO::lgr_info> lgr_info) const;
|
||||
|
||||
std::string unpackNumber(const SummaryNode&) const;
|
||||
std::string lookupKey(const SummaryNode&) const;
|
||||
@@ -135,8 +144,9 @@ private:
|
||||
std::vector<std::tuple <std::string, uint64_t>> getListOfArrays(std::string filename, bool formatted);
|
||||
std::vector<int> makeKeywPosVector(int speInd) const;
|
||||
std::string read_string_from_disk(std::fstream& fileH, uint64_t size) const;
|
||||
void inspect_lodsmry();
|
||||
void Load_from_lodsmry(const std::vector<int>& keywIndVect) const;
|
||||
|
||||
void read_ministeps_from_disk();
|
||||
int read_ministep_formatted(std::fstream& fileH);
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
@@ -19,11 +19,10 @@
|
||||
#ifndef OPM_IO_ECLFILE_HPP
|
||||
#define OPM_IO_ECLFILE_HPP
|
||||
|
||||
#include <opm/common/ErrorMacros.hpp>
|
||||
|
||||
#include <opm/io/eclipse/EclIOdata.hpp>
|
||||
|
||||
#include <ios>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <tuple>
|
||||
@@ -97,19 +96,7 @@ protected:
|
||||
template<class T>
|
||||
const std::vector<T>& getImpl(int arrIndex, eclArrType type,
|
||||
const std::unordered_map<int, std::vector<T>>& array,
|
||||
const std::string& typeStr)
|
||||
{
|
||||
if (array_type[arrIndex] != type) {
|
||||
std::string message = "Array with index " + std::to_string(arrIndex) + " is not of type " + typeStr;
|
||||
OPM_THROW(std::runtime_error, message);
|
||||
}
|
||||
|
||||
if (!arrayLoaded[arrIndex]) {
|
||||
loadData(arrIndex);
|
||||
}
|
||||
|
||||
return array.at(arrIndex);
|
||||
}
|
||||
const std::string& typeStr);
|
||||
|
||||
std::streampos
|
||||
seekPosition(const std::vector<std::string>::size_type arrIndex) const;
|
||||
|
||||
106
opm/io/eclipse/ExtESmry.hpp
Normal file
106
opm/io/eclipse/ExtESmry.hpp
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
Copyright 2019 Equinor ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_IO_ExtESmry_HPP
|
||||
#define OPM_IO_ExtESmry_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/common/utility/TimeService.hpp>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
using ArrSourceEntry = std::tuple<std::string, std::string, int, uint64_t>;
|
||||
using TimeStepEntry = std::tuple<int, int, uint64_t>;
|
||||
using RstEntry = std::tuple<std::string, int>;
|
||||
|
||||
// start, rstart + rstnum, keycheck, units, rstep, tstep
|
||||
using LodsmryHeadType = std::tuple<time_point, RstEntry, std::vector<std::string>, std::vector<std::string>,
|
||||
std::vector<int>, std::vector<int>>;
|
||||
|
||||
class ExtESmry
|
||||
{
|
||||
public:
|
||||
|
||||
// input is esmry, only binary supported.
|
||||
explicit ExtESmry(const std::string& filename, bool loadBaseRunData=false);
|
||||
|
||||
const std::vector<float>& get(const std::string& name);
|
||||
std::vector<float> get_at_rstep(const std::string& name);
|
||||
std::string& get_unit(const std::string& name);
|
||||
|
||||
void loadData();
|
||||
void loadData(const std::vector<std::string>& stringVect);
|
||||
|
||||
time_point startdate() const { return m_startdat; }
|
||||
|
||||
bool hasKey(const std::string& key) const;
|
||||
|
||||
size_t numberOfTimeSteps() const { return m_nTstep; }
|
||||
size_t numberOfVectors() const { return m_nVect; }
|
||||
|
||||
const std::vector<std::string>& keywordList() const { return m_keyword;}
|
||||
std::vector<std::string> keywordList(const std::string& pattern) const;
|
||||
|
||||
std::vector<time_point> dates();
|
||||
|
||||
bool all_steps_available();
|
||||
|
||||
|
||||
private:
|
||||
filesystem::path m_inputFileName;
|
||||
std::vector<filesystem::path> m_lodsmry_files;
|
||||
|
||||
bool m_loadBaseRun;
|
||||
std::vector<std::map<std::string, int>> m_keyword_index;
|
||||
std::vector<std::tuple<int,int>> m_tstep_range;
|
||||
std::vector<std::string> m_keyword;
|
||||
std::vector<int> m_rstep;
|
||||
std::vector<int> m_tstep;
|
||||
std::vector<std::vector<int>> m_rstep_v;
|
||||
std::vector<std::vector<int>> m_tstep_v;
|
||||
std::vector<std::vector<float>> m_vectorData;
|
||||
std::vector<bool> m_vectorLoaded;
|
||||
std::unordered_map<std::string, std::string> kwunits;
|
||||
|
||||
size_t m_nVect;
|
||||
std::vector<size_t> m_nTstep_v;
|
||||
size_t m_nTstep;
|
||||
std::vector<int> m_seqIndex;
|
||||
|
||||
std::vector<uint64_t> m_lod_offset;
|
||||
std::vector<uint64_t> m_lod_arr_size;
|
||||
|
||||
time_point m_startdat;
|
||||
|
||||
uint64_t open_esmry(Opm::filesystem::path& inputFileName, LodsmryHeadType& lodsmry_head);
|
||||
|
||||
void updatePathAndRootName(Opm::filesystem::path& dir, Opm::filesystem::path& rootN);
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
|
||||
#endif // OPM_IO_ExtESmry_HPP
|
||||
68
opm/io/eclipse/ExtSmryOutput.hpp
Normal file
68
opm/io/eclipse/ExtSmryOutput.hpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright 2019 Statoil ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_IO_ExtSmryOutput_HPP
|
||||
#define OPM_IO_ExtSmryOutput_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class EclipseState;
|
||||
|
||||
}
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
|
||||
class ExtSmryOutput
|
||||
{
|
||||
|
||||
public:
|
||||
ExtSmryOutput(const std::vector<std::string>& valueKeys, const std::vector<std::string>& valueUnits,
|
||||
const EclipseState& es, const time_t start_time);
|
||||
|
||||
void write(const std::vector<float>& ts_data, int report_step);
|
||||
|
||||
private:
|
||||
|
||||
std::string m_outputFileName;
|
||||
int m_nTimeSteps;
|
||||
int m_nVect;
|
||||
bool m_fmt;
|
||||
|
||||
std::vector<int> m_start_date_vect;
|
||||
std::string m_restart_rootn;
|
||||
int m_restart_step;
|
||||
std::vector<std::string> m_smry_keys;
|
||||
std::vector<std::string> m_smryUnits;
|
||||
std::vector<int> m_rstep;
|
||||
std::vector<int> m_tstep;
|
||||
std::vector<std::vector<float>> m_smrydata;
|
||||
|
||||
std::array<int, 3> ijk_from_global_index(const GridDims& dims, int globInd) const;
|
||||
std::vector<std::string> make_modified_keys(const std::vector<std::string>& valueKeys, const GridDims& dims);
|
||||
};
|
||||
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
#endif // OPM_IO_ExtSmryOutput_HPP
|
||||
70
opm/io/eclipse/RestartFileView.hpp
Normal file
70
opm/io/eclipse/RestartFileView.hpp
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
Copyright 2021 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_RESTART_FILE_VIEW_HPP
|
||||
#define OPM_RESTART_FILE_VIEW_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
class ERst;
|
||||
}} // Opm::EclIO
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
class RestartFileView
|
||||
{
|
||||
public:
|
||||
explicit RestartFileView(std::shared_ptr<ERst> restart_file,
|
||||
const int report_step);
|
||||
|
||||
~RestartFileView();
|
||||
|
||||
RestartFileView(const RestartFileView& rhs) = delete;
|
||||
RestartFileView(RestartFileView&& rhs);
|
||||
|
||||
RestartFileView& operator=(const RestartFileView& rhs) = delete;
|
||||
RestartFileView& operator=(RestartFileView&& rhs);
|
||||
|
||||
std::size_t simStep() const;
|
||||
int reportStep() const;
|
||||
|
||||
int occurrenceCount(const std::string& vector) const;
|
||||
|
||||
template <typename ElmType>
|
||||
bool hasKeyword(const std::string& vector) const;
|
||||
|
||||
template <typename ElmType>
|
||||
const std::vector<ElmType>&
|
||||
getKeyword(const std::string& vector, const int occurrence = 0) const;
|
||||
|
||||
const std::vector<int>& intehead() const;
|
||||
const std::vector<bool>& logihead() const;
|
||||
const std::vector<double>& doubhead() const;
|
||||
|
||||
private:
|
||||
class Implementation;
|
||||
std::unique_ptr<Implementation> pImpl_;
|
||||
};
|
||||
|
||||
}} // Opm::RestartIO
|
||||
|
||||
#endif // OPM_RESTART_FILE_VIEW_HPP
|
||||
@@ -24,9 +24,15 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <array>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
struct lgr_info {
|
||||
std::string name;
|
||||
std::array<int, 3> ijk;
|
||||
};
|
||||
|
||||
struct SummaryNode {
|
||||
enum class Category {
|
||||
Well,
|
||||
@@ -52,13 +58,14 @@ struct SummaryNode {
|
||||
Undefined,
|
||||
};
|
||||
|
||||
|
||||
std::string keyword;
|
||||
Category category;
|
||||
Type type;
|
||||
std::string wgname;
|
||||
int number;
|
||||
|
||||
std::optional<std::string> fip_region;
|
||||
std::optional<lgr_info> lgr;
|
||||
|
||||
constexpr static int default_number { std::numeric_limits<int>::min() };
|
||||
|
||||
|
||||
78
opm/io/eclipse/rst/action.hpp
Normal file
78
opm/io/eclipse/rst/action.hpp
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
Copyright 2021 Equinor ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef RST_ACTIONX
|
||||
#define RST_ACTIONX
|
||||
|
||||
#include <ctime>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Enums.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace RestartIO {
|
||||
|
||||
struct RstAction {
|
||||
struct Quantity {
|
||||
std::variant<std::string, double> quantity;
|
||||
std::optional<std::string> wgname;
|
||||
|
||||
Quantity() = default;
|
||||
Quantity(const std::string * zacn, double sacn_value);
|
||||
Quantity(const std::string& quantity);
|
||||
Quantity(double value);
|
||||
};
|
||||
|
||||
|
||||
struct Condition {
|
||||
static bool valid(const std::string * zacn, const int * iacn);
|
||||
Condition(const std::string * zacn, const int * iacn, const double * sacn);
|
||||
Action::Logical logic;
|
||||
Action::Comparator cmp_op;
|
||||
Quantity lhs;
|
||||
Quantity rhs;
|
||||
bool left_paren{false};
|
||||
bool right_paren{false};
|
||||
|
||||
std::vector<std::string> tokens() const;
|
||||
};
|
||||
|
||||
|
||||
RstAction(const std::string& name_arg, int max_run_arg, int run_count_arg, double min_wait_arg, std::time_t start_time, std::time_t last_run, std::vector<Condition> conditions_arg);
|
||||
|
||||
std::string name;
|
||||
int max_run;
|
||||
int run_count;
|
||||
double min_wait;
|
||||
std::time_t start_time;
|
||||
std::optional<std::time_t> last_run;
|
||||
std::vector<Condition> conditions;
|
||||
std::vector<DeckKeyword> keywords;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
132
opm/io/eclipse/rst/aquifer.hpp
Normal file
132
opm/io/eclipse/rst/aquifer.hpp
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
Copyright 2021 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_RESTART_AQUIFER_HPP
|
||||
#define OPM_RESTART_AQUIFER_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
class AquiferConfig;
|
||||
class EclipseGrid;
|
||||
class UnitSystem;
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
class RestartFileView;
|
||||
}} // Opm::EclIO
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
|
||||
class RstAquifer
|
||||
{
|
||||
public:
|
||||
struct CarterTracy {
|
||||
int aquiferID{};
|
||||
int inftableID{};
|
||||
int pvttableID{};
|
||||
|
||||
double porosity{};
|
||||
double datum_depth{};
|
||||
double total_compr{};
|
||||
double inner_radius{};
|
||||
double permeability{};
|
||||
double thickness{};
|
||||
double angle_fraction{};
|
||||
double initial_pressure{};
|
||||
|
||||
double time_constant{};
|
||||
double influx_constant{};
|
||||
double water_density{};
|
||||
double water_viscosity{};
|
||||
};
|
||||
|
||||
struct Fetkovich {
|
||||
int aquiferID{};
|
||||
int pvttableID{};
|
||||
|
||||
double prod_index{};
|
||||
double total_compr{};
|
||||
double initial_watvolume{};
|
||||
double datum_depth{};
|
||||
|
||||
double initial_pressure{};
|
||||
double time_constant{};
|
||||
};
|
||||
|
||||
class Connections {
|
||||
public:
|
||||
struct Cell {
|
||||
std::size_t global_index;
|
||||
double influx_coeff;
|
||||
double effective_facearea;
|
||||
FaceDir::DirEnum face_dir;
|
||||
};
|
||||
|
||||
const std::vector<Cell>& cells() const
|
||||
{
|
||||
return this->cells_;
|
||||
}
|
||||
|
||||
void reserve(const std::vector<Cell>::size_type cpty)
|
||||
{
|
||||
this->cells_.reserve(cpty);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void emplace_back(Args&&... args)
|
||||
{
|
||||
this->cells_.push_back(Cell { std::forward<Args>(args)... });
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Cell> cells_{};
|
||||
};
|
||||
|
||||
explicit RstAquifer(std::shared_ptr<EclIO::RestartFileView> rstView,
|
||||
const EclipseGrid* grid,
|
||||
const UnitSystem& usys);
|
||||
|
||||
RstAquifer(const RstAquifer& rhs);
|
||||
RstAquifer(RstAquifer&& rhs);
|
||||
RstAquifer& operator=(const RstAquifer& rhs);
|
||||
RstAquifer& operator=(RstAquifer&& rhs);
|
||||
|
||||
~RstAquifer();
|
||||
|
||||
bool hasAnalyticAquifers() const;
|
||||
|
||||
const std::vector<CarterTracy>& carterTracy() const;
|
||||
const std::vector<Fetkovich>& fetkovich() const;
|
||||
const std::unordered_map<int, Connections>& connections() const;
|
||||
|
||||
private:
|
||||
class Implementation;
|
||||
std::unique_ptr<Implementation> pImpl_;
|
||||
};
|
||||
}} // Opm::RestartIO
|
||||
|
||||
#endif // OPM_RESTART_AQUIFER_HPP
|
||||
@@ -45,6 +45,7 @@ struct RstGroup {
|
||||
int winj_cmode;
|
||||
int ginj_cmode;
|
||||
int guide_rate_def;
|
||||
int exceed_action;
|
||||
|
||||
float oil_rate_limit;
|
||||
float water_rate_limit;
|
||||
|
||||
@@ -86,6 +86,11 @@ struct RstHeader {
|
||||
int nmfipr;
|
||||
int ngroup;
|
||||
int nwgmax;
|
||||
int nwell_udq;
|
||||
int ngroup_udq;
|
||||
int nfield_udq;
|
||||
int num_action;
|
||||
int guide_rate_nominated_phase;
|
||||
|
||||
bool e300_radial;
|
||||
bool e100_radial;
|
||||
@@ -117,7 +122,9 @@ struct RstHeader {
|
||||
double udq_undefined;
|
||||
double udq_eps;
|
||||
|
||||
std::time_t sim_time() const;
|
||||
std::pair<std::time_t, std::size_t> restart_info() const;
|
||||
int num_udq() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -19,70 +19,53 @@
|
||||
#ifndef RST_STATE
|
||||
#define RST_STATE
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/io/eclipse/ERst.hpp>
|
||||
#include <opm/io/eclipse/rst/header.hpp>
|
||||
#include <opm/io/eclipse/rst/aquifer.hpp>
|
||||
#include <opm/io/eclipse/rst/group.hpp>
|
||||
#include <opm/io/eclipse/rst/well.hpp>
|
||||
#include <opm/io/eclipse/rst/udq.hpp>
|
||||
#include <opm/io/eclipse/rst/action.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class EclipseGrid;
|
||||
class Parser;
|
||||
class Parser;
|
||||
} // namespace Opm
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
class RestartFileView;
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
|
||||
namespace RestartIO {
|
||||
struct RstState {
|
||||
RstState(const ::Opm::UnitSystem& unit_system,
|
||||
const std::vector<int>& intehead,
|
||||
const std::vector<bool>& logihead,
|
||||
const std::vector<double>& doubhead);
|
||||
RstState(std::shared_ptr<EclIO::RestartFileView> rstView,
|
||||
const ::Opm::EclipseGrid* grid);
|
||||
|
||||
RstState(const ::Opm::UnitSystem& unit_system,
|
||||
const std::vector<int>& intehead,
|
||||
const std::vector<bool>& logihead,
|
||||
const std::vector<double>& doubhead,
|
||||
const std::vector<std::string>& zgrp,
|
||||
const std::vector<int>& igrp,
|
||||
const std::vector<float>& sgrp,
|
||||
const std::vector<double>& xgrp,
|
||||
const std::vector<std::string>& zwel,
|
||||
const std::vector<int>& iwel,
|
||||
const std::vector<float>& swel,
|
||||
const std::vector<double>& xwel,
|
||||
const std::vector<int>& icon,
|
||||
const std::vector<float>& scon,
|
||||
const std::vector<double>& xcon);
|
||||
|
||||
RstState(const ::Opm::UnitSystem& unit_system,
|
||||
const std::vector<int>& intehead,
|
||||
const std::vector<bool>& logihead,
|
||||
const std::vector<double>& doubhead,
|
||||
const std::vector<std::string>& zgrp,
|
||||
const std::vector<int>& igrp,
|
||||
const std::vector<float>& sgrp,
|
||||
const std::vector<double>& xgrp,
|
||||
const std::vector<std::string>& zwel,
|
||||
const std::vector<int>& iwel,
|
||||
const std::vector<float>& swel,
|
||||
const std::vector<double>& xwel,
|
||||
const std::vector<int>& icon,
|
||||
const std::vector<float>& scon,
|
||||
const std::vector<double>& xcon,
|
||||
const std::vector<int>& iseg,
|
||||
const std::vector<double>& rseg);
|
||||
|
||||
|
||||
static RstState load(EclIO::ERst& rst_file, int report_step);
|
||||
static RstState load(std::shared_ptr<EclIO::RestartFileView> rstView,
|
||||
const Runspec& runspec,
|
||||
const Parser& parser,
|
||||
const ::Opm::EclipseGrid* grid = nullptr);
|
||||
|
||||
const RstWell& get_well(const std::string& wname) const;
|
||||
|
||||
const ::Opm::UnitSystem unit_system;
|
||||
::Opm::UnitSystem unit_system;
|
||||
RstHeader header;
|
||||
RstAquifer aquifers;
|
||||
std::vector<RstWell> wells;
|
||||
std::vector<RstGroup> groups;
|
||||
std::vector<RstUDQ> udqs;
|
||||
RstUDQActive udq_active;
|
||||
std::vector<RstAction> actions;
|
||||
Tuning tuning;
|
||||
|
||||
private:
|
||||
@@ -93,11 +76,45 @@ private:
|
||||
const std::vector<int>& igrp,
|
||||
const std::vector<float>& sgrp,
|
||||
const std::vector<double>& xgrp);
|
||||
|
||||
void add_wells(const std::vector<std::string>& zwel,
|
||||
const std::vector<int>& iwel,
|
||||
const std::vector<float>& swel,
|
||||
const std::vector<double>& xwel,
|
||||
const std::vector<int>& icon,
|
||||
const std::vector<float>& scon,
|
||||
const std::vector<double>& xcon);
|
||||
|
||||
void add_msw(const std::vector<std::string>& zwel,
|
||||
const std::vector<int>& iwel,
|
||||
const std::vector<float>& swel,
|
||||
const std::vector<double>& xwel,
|
||||
const std::vector<int>& icon,
|
||||
const std::vector<float>& scon,
|
||||
const std::vector<double>& xcon,
|
||||
const std::vector<int>& iseg,
|
||||
const std::vector<double>& rseg);
|
||||
|
||||
void add_udqs(const std::vector<int>& iudq,
|
||||
const std::vector<std::string>& zudn,
|
||||
const std::vector<std::string>& zudl,
|
||||
const std::vector<double>& dudw,
|
||||
const std::vector<double>& dudg,
|
||||
const std::vector<double>& dudf);
|
||||
|
||||
void add_actions(const Parser& parser,
|
||||
const Runspec& runspec,
|
||||
std::time_t sim_time,
|
||||
const std::vector<std::string>& zact,
|
||||
const std::vector<int>& iact,
|
||||
const std::vector<float>& sact,
|
||||
const std::vector<std::string>& zacn,
|
||||
const std::vector<int>& iacn,
|
||||
const std::vector<double>& sacn,
|
||||
const std::vector<std::string>& zlact);
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}} // namespace Opm::RestartIO
|
||||
|
||||
#endif
|
||||
|
||||
112
opm/io/eclipse/rst/udq.hpp
Normal file
112
opm/io/eclipse/rst/udq.hpp
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
Copyright 2021 Equinor ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef RST_UDQ
|
||||
#define RST_UDQ
|
||||
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace RestartIO {
|
||||
|
||||
struct RstHeader;
|
||||
|
||||
class RstUDQ {
|
||||
public:
|
||||
struct RstDefine {
|
||||
RstDefine(const std::string& expression_arg, UDQUpdate status_arg);
|
||||
|
||||
std::string expression;
|
||||
UDQUpdate status;
|
||||
std::vector<std::pair<std::string, double>> values;
|
||||
std::optional<double> field_value;
|
||||
};
|
||||
|
||||
struct RstAssign {
|
||||
void update_value(const std::string& name_arg, double new_value);
|
||||
|
||||
std::optional<double> value;
|
||||
std::unordered_set<std::string> selector;
|
||||
};
|
||||
|
||||
|
||||
RstUDQ(const std::string& name_arg,
|
||||
const std::string& unit_arg,
|
||||
const std::string& define_arg,
|
||||
UDQUpdate status_arg);
|
||||
|
||||
RstUDQ(const std::string& name_arg,
|
||||
const std::string& unit_arg);
|
||||
|
||||
void add_value(double value);
|
||||
void add_value(const std::string& wgname, double value);
|
||||
|
||||
bool is_define() const;
|
||||
double assign_value() const;
|
||||
const std::unordered_set<std::string>& assign_selector() const;
|
||||
const std::string& expression() const;
|
||||
const std::vector<std::pair<std::string, double>>& values() const;
|
||||
std::optional<double> field_value() const;
|
||||
|
||||
std::string name;
|
||||
std::string unit;
|
||||
UDQVarType var_type;
|
||||
|
||||
private:
|
||||
std::variant<std::monostate, RstDefine, RstAssign> data;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class RstUDQActive {
|
||||
|
||||
struct RstRecord {
|
||||
RstRecord(UDAControl c, std::size_t i, std::size_t u1, std::size_t u2);
|
||||
|
||||
|
||||
UDAControl control;
|
||||
std::size_t input_index;
|
||||
std::size_t use_count;
|
||||
std::size_t wg_offset;
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
RstUDQActive() = default;
|
||||
RstUDQActive(const std::vector<int>& iuad, const std::vector<int>& iuap, const std::vector<int>& igph);
|
||||
|
||||
std::vector<RstRecord> iuad;
|
||||
std::vector<int> wg_index;
|
||||
std::vector<Phase> ig_phase;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -76,6 +76,9 @@ struct RstWell {
|
||||
int completion_ordering;
|
||||
int pvt_table;
|
||||
int msw_pressure_drop_model;
|
||||
int wtest_config_reasons;
|
||||
int wtest_close_reason;
|
||||
int wtest_remaining;
|
||||
|
||||
float orat_target;
|
||||
float wrat_target;
|
||||
@@ -91,6 +94,8 @@ struct RstWell {
|
||||
float drainage_radius;
|
||||
float efficiency_factor;
|
||||
float alq_value;
|
||||
float wtest_interval;
|
||||
float wtest_startup;
|
||||
|
||||
double oil_rate;
|
||||
double water_rate;
|
||||
|
||||
@@ -42,7 +42,6 @@ struct PhaseUsage;
|
||||
* Use the create() function to setup a chain of writer based on the
|
||||
* configuration values, e.g.
|
||||
*
|
||||
* \example
|
||||
* \code{.cpp}
|
||||
* ParameterGroup params (argc, argv, false);
|
||||
* auto parser = std::make_shared <const Deck> (
|
||||
|
||||
@@ -15,21 +15,22 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef OPM_OUTPUT_AQUIFER_HPP
|
||||
#define OPM_OUTPUT_AQUIFER_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm { namespace data {
|
||||
|
||||
/**
|
||||
* Small struct that keeps track of data for output to restart/summary
|
||||
* files.
|
||||
*/
|
||||
enum class AquiferType
|
||||
{
|
||||
Fetkovich, CarterTracy, Numerical,
|
||||
@@ -37,15 +38,235 @@ namespace Opm { namespace data {
|
||||
|
||||
struct FetkovichData
|
||||
{
|
||||
double initVolume;
|
||||
double prodIndex;
|
||||
double timeConstant;
|
||||
double initVolume{};
|
||||
double prodIndex{};
|
||||
double timeConstant{};
|
||||
|
||||
bool operator==(const FetkovichData& other) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
};
|
||||
|
||||
struct CarterTracyData
|
||||
{
|
||||
double dimensionless_time;
|
||||
double dimensionless_pressure;
|
||||
double timeConstant{};
|
||||
double influxConstant{};
|
||||
double waterDensity{};
|
||||
double waterViscosity{};
|
||||
|
||||
double dimensionless_time{};
|
||||
double dimensionless_pressure{};
|
||||
|
||||
bool operator==(const CarterTracyData& other) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
};
|
||||
|
||||
struct NumericAquiferData
|
||||
{
|
||||
std::vector<double> initPressure{};
|
||||
|
||||
bool operator==(const NumericAquiferData& other) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
template <AquiferType>
|
||||
struct TypeMap;
|
||||
|
||||
template <> struct TypeMap<AquiferType::CarterTracy>
|
||||
{
|
||||
using Alternative = CarterTracyData;
|
||||
};
|
||||
|
||||
template <> struct TypeMap<AquiferType::Fetkovich>
|
||||
{
|
||||
using Alternative = FetkovichData;
|
||||
};
|
||||
|
||||
template <> struct TypeMap<AquiferType::Numerical>
|
||||
{
|
||||
using Alternative = NumericAquiferData;
|
||||
};
|
||||
|
||||
template <AquiferType t>
|
||||
using TypeMap_t = typename TypeMap<t>::Alternative;
|
||||
} // namespace detail
|
||||
|
||||
class TypeSpecificData
|
||||
{
|
||||
private:
|
||||
template <typename T>
|
||||
bool is() const
|
||||
{
|
||||
return std::holds_alternative<T>(this->options_);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const T* get() const
|
||||
{
|
||||
return this->template is<T>()
|
||||
? &std::get<T>(this->options_)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T* get()
|
||||
{
|
||||
return this->template is<T>()
|
||||
? &std::get<T>(this->options_)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
public:
|
||||
TypeSpecificData() = default;
|
||||
|
||||
TypeSpecificData(const TypeSpecificData&) = default;
|
||||
TypeSpecificData(TypeSpecificData&&) = default;
|
||||
|
||||
TypeSpecificData& operator=(const TypeSpecificData&) = default;
|
||||
TypeSpecificData& operator=(TypeSpecificData&&) = default;
|
||||
|
||||
bool operator==(const TypeSpecificData& that) const
|
||||
{
|
||||
return std::visit(Equal{}, this->options_, that.options_);
|
||||
}
|
||||
|
||||
template <AquiferType t>
|
||||
auto* create()
|
||||
{
|
||||
return &this->options_.emplace<detail::TypeMap_t<t>>();
|
||||
}
|
||||
|
||||
template <AquiferType t>
|
||||
bool is() const
|
||||
{
|
||||
return this->template is<detail::TypeMap_t<t>>();
|
||||
}
|
||||
|
||||
template <AquiferType t>
|
||||
auto const* get() const
|
||||
{
|
||||
return this->template get<detail::TypeMap_t<t>>();
|
||||
}
|
||||
|
||||
template <AquiferType t>
|
||||
auto* getMutable()
|
||||
{
|
||||
return this->template get<detail::TypeMap_t<t>>();
|
||||
}
|
||||
|
||||
template <typename MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
buffer.write(this->options_.index());
|
||||
std::visit(Write<MessageBufferType>{buffer}, this->options_);
|
||||
}
|
||||
|
||||
template <typename MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
auto type = 0 * this->options_.index();
|
||||
buffer.read(type);
|
||||
|
||||
if (type < std::variant_size_v<Types>) {
|
||||
this->create(type);
|
||||
|
||||
std::visit(Read<MessageBufferType>{buffer}, this->options_);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
using Types = std::variant<std::monostate,
|
||||
CarterTracyData,
|
||||
FetkovichData,
|
||||
NumericAquiferData>;
|
||||
|
||||
struct Equal
|
||||
{
|
||||
template <typename T1, typename T2>
|
||||
bool operator()(const T1&, const T2&) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool operator()(const T& e1, const T& e2) const
|
||||
{
|
||||
return e1 == e2;
|
||||
}
|
||||
|
||||
bool operator()(const std::monostate&,
|
||||
const std::monostate&) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename MessageBufferType>
|
||||
class Read
|
||||
{
|
||||
public:
|
||||
explicit Read(MessageBufferType& buffer)
|
||||
: buffer_{ buffer }
|
||||
{}
|
||||
|
||||
template <typename T>
|
||||
void operator()(T& alternative)
|
||||
{
|
||||
return alternative.read(this->buffer_);
|
||||
}
|
||||
|
||||
void operator()(std::monostate&)
|
||||
{}
|
||||
|
||||
private:
|
||||
MessageBufferType& buffer_;
|
||||
};
|
||||
|
||||
template <typename MessageBufferType>
|
||||
class Write
|
||||
{
|
||||
public:
|
||||
explicit Write(MessageBufferType& buffer)
|
||||
: buffer_{ buffer }
|
||||
{}
|
||||
|
||||
template <typename T>
|
||||
void operator()(const T& alternative) const
|
||||
{
|
||||
return alternative.write(this->buffer_);
|
||||
}
|
||||
|
||||
void operator()(const std::monostate&) const
|
||||
{}
|
||||
|
||||
private:
|
||||
MessageBufferType& buffer_;
|
||||
};
|
||||
|
||||
Types options_{};
|
||||
|
||||
void create(const std::size_t option);
|
||||
};
|
||||
|
||||
struct AquiferData
|
||||
@@ -57,12 +278,12 @@ namespace Opm { namespace data {
|
||||
double initPressure = 0.0; //< Aquifer's initial pressure
|
||||
double datumDepth = 0.0; //< Aquifer's pressure reference depth
|
||||
|
||||
AquiferType type;
|
||||
std::shared_ptr<FetkovichData> aquFet;
|
||||
std::shared_ptr<CarterTracyData> aquCT;
|
||||
TypeSpecificData typeData{};
|
||||
|
||||
double get(const std::string& key) const;
|
||||
|
||||
bool operator==(const AquiferData& other) const;
|
||||
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
@@ -70,30 +291,81 @@ namespace Opm { namespace data {
|
||||
// MessageBufferType API should be similar to Dune::MessageBufferIF
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
private:
|
||||
using GetSummaryValue = double (AquiferData::*)() const;
|
||||
using SummaryValueDispatchTable = std::unordered_map<std::string, GetSummaryValue>;
|
||||
|
||||
static SummaryValueDispatchTable summaryValueDispatchTable_;
|
||||
|
||||
double aquiferFlowRate() const;
|
||||
double aquiferPressure() const;
|
||||
double aquiferTotalProduction() const;
|
||||
double carterTracyDimensionlessTime() const;
|
||||
double carterTracyDimensionlessPressure() const;
|
||||
};
|
||||
|
||||
// TODO: not sure what extension we will need
|
||||
using Aquifers = std::map<int, AquiferData>;
|
||||
|
||||
inline double AquiferData::get(const std::string& key) const
|
||||
template <class MessageBufferType>
|
||||
void FetkovichData::write(MessageBufferType& buffer) const
|
||||
{
|
||||
if ((key == "AAQR") || (key == "ANQR")) {
|
||||
return this->fluxRate;
|
||||
}
|
||||
else if ((key == "AAQT") || (key == "ANQT")) {
|
||||
return this->volume;
|
||||
}
|
||||
else if ((key == "AAQP") || (key == "ANQP")) {
|
||||
return this->pressure;
|
||||
}
|
||||
else if ((key == "AAQTD") && (this->aquCT != nullptr)) {
|
||||
return this->aquCT->dimensionless_time;
|
||||
}
|
||||
else if ((key == "AAQPD") && (this->aquCT != nullptr)) {
|
||||
return this->aquCT->dimensionless_pressure;
|
||||
}
|
||||
buffer.write(this->initVolume);
|
||||
buffer.write(this->prodIndex);
|
||||
buffer.write(this->timeConstant);
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
template <class MessageBufferType>
|
||||
void FetkovichData::read(MessageBufferType& buffer)
|
||||
{
|
||||
buffer.read(this->initVolume);
|
||||
buffer.read(this->prodIndex);
|
||||
buffer.read(this->timeConstant);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void CarterTracyData::write(MessageBufferType& buffer) const
|
||||
{
|
||||
buffer.write(this->timeConstant);
|
||||
buffer.write(this->influxConstant);
|
||||
buffer.write(this->waterDensity);
|
||||
buffer.write(this->waterViscosity);
|
||||
buffer.write(this->dimensionless_time);
|
||||
buffer.write(this->dimensionless_pressure);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void CarterTracyData::read(MessageBufferType& buffer)
|
||||
{
|
||||
buffer.read(this->timeConstant);
|
||||
buffer.read(this->influxConstant);
|
||||
buffer.read(this->waterDensity);
|
||||
buffer.read(this->waterViscosity);
|
||||
buffer.read(this->dimensionless_time);
|
||||
buffer.read(this->dimensionless_pressure);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void NumericAquiferData::write(MessageBufferType& buffer) const
|
||||
{
|
||||
buffer.write(this->initPressure.size());
|
||||
|
||||
for (const auto& pressure : this->initPressure) {
|
||||
buffer.write(pressure);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void NumericAquiferData::read(MessageBufferType& buffer)
|
||||
{
|
||||
decltype(this->initPressure.size()) size{};
|
||||
buffer.read(size);
|
||||
|
||||
this->initPressure.resize(size, 0.0);
|
||||
for (auto& pressure : this->initPressure) {
|
||||
buffer.read(pressure);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@@ -106,18 +378,7 @@ namespace Opm { namespace data {
|
||||
buffer.write(this->initPressure);
|
||||
buffer.write(this->datumDepth);
|
||||
|
||||
const int aqu = (this->aquFet != nullptr) + 2*(this->aquCT != nullptr);
|
||||
buffer.write(aqu);
|
||||
|
||||
if (this->aquFet != nullptr) {
|
||||
buffer.write(this->aquFet->initVolume);
|
||||
buffer.write(this->aquFet->prodIndex);
|
||||
buffer.write(this->aquFet->timeConstant);
|
||||
}
|
||||
else if (this->aquCT != nullptr) {
|
||||
buffer.write(this->aquCT->dimensionless_time);
|
||||
buffer.write(this->aquCT->dimensionless_pressure);
|
||||
}
|
||||
this->typeData.write(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@@ -130,29 +391,7 @@ namespace Opm { namespace data {
|
||||
buffer.read(this->initPressure);
|
||||
buffer.read(this->datumDepth);
|
||||
|
||||
int aqu;
|
||||
buffer.read(aqu);
|
||||
if (aqu == 1) {
|
||||
this->type = AquiferType::Fetkovich;
|
||||
|
||||
if (this->aquFet == nullptr) {
|
||||
this->aquFet = std::make_shared<FetkovichData>();
|
||||
}
|
||||
|
||||
buffer.read(this->aquFet->initVolume);
|
||||
buffer.read(this->aquFet->prodIndex);
|
||||
buffer.read(this->aquFet->timeConstant);
|
||||
}
|
||||
else if (aqu == 2) {
|
||||
this->type = AquiferType::CarterTracy;
|
||||
|
||||
if (this->aquCT == nullptr) {
|
||||
this->aquCT = std::make_shared<CarterTracyData>();
|
||||
}
|
||||
|
||||
buffer.read(this->aquCT->dimensionless_time);
|
||||
buffer.read(this->aquCT->dimensionless_pressure);
|
||||
}
|
||||
this->typeData.read(buffer);
|
||||
}
|
||||
}} // Opm::data
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <opm/output/data/GuideRateValue.hpp>
|
||||
|
||||
#include <opm/json/JsonObject.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
|
||||
namespace Opm { namespace data {
|
||||
@@ -54,6 +54,12 @@ namespace Opm { namespace data {
|
||||
inline GroupConstraints& set(Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic);
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
json_data.add_item("prod", Opm::Group::ProductionCMode2String(this->currentProdConstraint));
|
||||
json_data.add_item("water_inj", Opm::Group::InjectionCMode2String(this->currentGasInjectionConstraint));
|
||||
json_data.add_item("gas_inj", Opm::Group::InjectionCMode2String(this->currentWaterInjectionConstraint));
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupGuideRates {
|
||||
@@ -79,6 +85,14 @@ namespace Opm { namespace data {
|
||||
return this->production == other.production
|
||||
&& this->injection == other.injection;
|
||||
}
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
auto json_prod = json_data.add_object("production");
|
||||
this->production.init_json(json_prod);
|
||||
|
||||
auto json_inj = json_data.add_object("injection");
|
||||
this->injection.init_json(json_inj);
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupData {
|
||||
@@ -104,6 +118,15 @@ namespace Opm { namespace data {
|
||||
return this->currentControl == other.currentControl
|
||||
&& this->guideRates == other.guideRates;
|
||||
}
|
||||
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
auto json_constraints = json_data.add_object("constraints");
|
||||
this->currentControl.init_json(json_constraints);
|
||||
|
||||
auto json_gr = json_data.add_object("guide_rate");
|
||||
this->guideRates.init_json(json_gr);
|
||||
}
|
||||
};
|
||||
|
||||
struct NodeData {
|
||||
@@ -125,6 +148,10 @@ namespace Opm { namespace data {
|
||||
{
|
||||
return this->pressure == other.pressure;
|
||||
}
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
json_data.add_item("pressure", this->pressure);
|
||||
}
|
||||
};
|
||||
|
||||
class GroupAndNetworkValues {
|
||||
@@ -158,6 +185,26 @@ namespace Opm { namespace data {
|
||||
this->nodeData.clear();
|
||||
}
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
auto group_data = json_data.add_object("group_data");
|
||||
for (const auto& [gname, gdata] : this->groupData) {
|
||||
auto group_json_data = group_data.add_object(gname);
|
||||
gdata.init_json( group_json_data );
|
||||
}
|
||||
|
||||
auto node_data = json_data.add_object("node_data");
|
||||
for (const auto& [gname, ndata] : this->nodeData) {
|
||||
auto node_json_data = node_data.add_object(gname);
|
||||
ndata.init_json( node_json_data );
|
||||
}
|
||||
}
|
||||
|
||||
Json::JsonObject json() const {
|
||||
Json::JsonObject json_data;
|
||||
this->init_json(json_data);
|
||||
return json_data;
|
||||
}
|
||||
|
||||
private:
|
||||
template <class MessageBufferType, class ValueType>
|
||||
void writeMap(const std::map<std::string, ValueType>& map,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <opm/json/JsonObject.hpp>
|
||||
|
||||
namespace Opm { namespace data {
|
||||
|
||||
@@ -124,6 +125,14 @@ namespace Opm { namespace data {
|
||||
}
|
||||
}
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
for (const auto& item : {Item::Oil, Item::Gas, Item::Water, Item::ResV}) {
|
||||
if (this->has(item))
|
||||
json_data.add_item(this->itemName(item), this->get(item));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
enum { Size = static_cast<std::size_t>(Item::NumItems) };
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/json/JsonObject.hpp>
|
||||
#include <opm/output/data/GuideRateValue.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
|
||||
namespace Opm {
|
||||
@@ -69,7 +69,9 @@ namespace Opm {
|
||||
well_potential_oil = (1 << 15),
|
||||
well_potential_gas = (1 << 16),
|
||||
brine = (1 << 17),
|
||||
alq = (1 << 18)
|
||||
alq = (1 << 18),
|
||||
tracer = (1 << 19),
|
||||
micp = (1 << 20)
|
||||
};
|
||||
|
||||
using enum_size = std::underlying_type< opt >::type;
|
||||
@@ -83,10 +85,12 @@ namespace Opm {
|
||||
/// Read the value indicated by m. Returns a default value if
|
||||
/// the requested value is unset.
|
||||
inline double get( opt m, double default_value ) const;
|
||||
inline double get( opt m, double default_value , const std::string& tracer_name ) const;
|
||||
/// Set the value specified by m. Throws an exception if multiple
|
||||
/// values are requested. Returns a self-reference to support
|
||||
/// chaining.
|
||||
inline Rates& set( opt m, double value );
|
||||
inline Rates& set( opt m, double value , const std::string& tracer_name );
|
||||
|
||||
/// Returns true if any of the rates oil, gas, water is nonzero
|
||||
inline bool flowing() const;
|
||||
@@ -98,9 +102,12 @@ namespace Opm {
|
||||
|
||||
bool operator==(const Rates& rat2) const;
|
||||
|
||||
inline void init_json(Json::JsonObject& json_data) const;
|
||||
private:
|
||||
double& get_ref( opt );
|
||||
double& get_ref( opt, const std::string& tracer_name );
|
||||
const double& get_ref( opt ) const;
|
||||
const double& get_ref( opt, const std::string& tracer_name ) const;
|
||||
|
||||
opt mask = static_cast< opt >( 0 );
|
||||
|
||||
@@ -123,6 +130,8 @@ namespace Opm {
|
||||
double well_potential_gas = 0.0;
|
||||
double brine = 0.0;
|
||||
double alq = 0.0;
|
||||
std::map<std::string, double> tracer;
|
||||
double micp = 0.0;
|
||||
};
|
||||
|
||||
struct Connection {
|
||||
@@ -155,6 +164,8 @@ namespace Opm {
|
||||
void write(MessageBufferType& buffer) const;
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
inline void init_json(Json::JsonObject& json_data) const;
|
||||
};
|
||||
|
||||
class SegmentPressures {
|
||||
@@ -197,7 +208,7 @@ namespace Opm {
|
||||
private:
|
||||
constexpr static std::size_t numvals = 5;
|
||||
|
||||
std::array<double, numvals> values_;
|
||||
std::array<double, numvals> values_ = {0};
|
||||
|
||||
std::size_t index(const Value ix) const
|
||||
{
|
||||
@@ -242,6 +253,19 @@ namespace Opm {
|
||||
(!this->isProducer && (this->inj == rhs.inj)));
|
||||
}
|
||||
|
||||
void init_json(Json::JsonObject& json_data) const
|
||||
{
|
||||
if (this->inj == ::Opm::Well::InjectorCMode::CMODE_UNDEFINED)
|
||||
json_data.add_item("inj", "CMODE_UNDEFINED");
|
||||
else
|
||||
json_data.add_item("inj", ::Opm::Well::InjectorCMode2String(this->inj));
|
||||
|
||||
if (this->prod == ::Opm::Well::ProducerCMode::CMODE_UNDEFINED)
|
||||
json_data.add_item("prod", "CMODE_UNDEFINED");
|
||||
else
|
||||
json_data.add_item("prod", ::Opm::Well::ProducerCMode2String(this->prod));
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
|
||||
@@ -250,17 +274,17 @@ namespace Opm {
|
||||
};
|
||||
|
||||
struct Well {
|
||||
Rates rates;
|
||||
double bhp;
|
||||
double thp;
|
||||
double temperature;
|
||||
int control;
|
||||
Rates rates{};
|
||||
double bhp{0.0};
|
||||
double thp{0.0};
|
||||
double temperature{0.0};
|
||||
int control{0};
|
||||
|
||||
::Opm::Well::Status dynamicStatus { Opm::Well::Status::OPEN };
|
||||
|
||||
std::vector< Connection > connections;
|
||||
std::unordered_map<std::size_t, Segment> segments;
|
||||
CurrentControl current_control;
|
||||
std::vector< Connection > connections{};
|
||||
std::unordered_map<std::size_t, Segment> segments{};
|
||||
CurrentControl current_control{};
|
||||
GuideRateValue guide_rates{};
|
||||
|
||||
inline bool flowing() const noexcept;
|
||||
@@ -269,6 +293,8 @@ namespace Opm {
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
inline void init_json(Json::JsonObject& json_data) const;
|
||||
|
||||
const Connection* find_connection(Connection::global_index connection_grid_index) const {
|
||||
const auto connection = std::find_if( this->connections.begin() ,
|
||||
this->connections.end() ,
|
||||
@@ -308,7 +334,7 @@ namespace Opm {
|
||||
};
|
||||
|
||||
|
||||
class WellRates : public std::map<std::string , Well> {
|
||||
class Wells: public std::map<std::string , Well> {
|
||||
public:
|
||||
|
||||
double get(const std::string& well_name , Rates::opt m) const {
|
||||
@@ -318,6 +344,12 @@ namespace Opm {
|
||||
return well->second.rates.get( m, 0.0 );
|
||||
}
|
||||
|
||||
double get(const std::string& well_name , Rates::opt m, const std::string& tracer_name) const {
|
||||
const auto& well = this->find( well_name );
|
||||
if( well == this->end() ) return 0.0;
|
||||
|
||||
return well->second.rates.get( m, 0.0, tracer_name);
|
||||
}
|
||||
|
||||
double get(const std::string& well_name , Connection::global_index connection_grid_index, Rates::opt m) const {
|
||||
const auto& witr = this->find( well_name );
|
||||
@@ -359,9 +391,22 @@ namespace Opm {
|
||||
this->emplace(name, well);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
using Wells = WellRates;
|
||||
void init_json(Json::JsonObject& json_data) const {
|
||||
for (const auto& [wname, well] : *this) {
|
||||
auto json_well = json_data.add_object(wname);
|
||||
well.init_json(json_well);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Json::JsonObject json() const {
|
||||
Json::JsonObject json_data;
|
||||
this->init_json(json_data);
|
||||
return json_data;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* IMPLEMENTATIONS */
|
||||
@@ -386,8 +431,29 @@ namespace Opm {
|
||||
return this->get_ref( m );
|
||||
}
|
||||
|
||||
inline double Rates::get( opt m, double default_value, const std::string& tracer_name) const {
|
||||
if( !this->has( m ) ) return default_value;
|
||||
|
||||
if( m == opt::tracer && this->tracer.find(tracer_name) == this->tracer.end()) return default_value;
|
||||
|
||||
return this->get_ref( m, tracer_name);
|
||||
}
|
||||
|
||||
inline Rates& Rates::set( opt m, double value ) {
|
||||
this->get_ref( m ) = value;
|
||||
|
||||
/* mask |= m */
|
||||
this->mask = static_cast< opt >(
|
||||
static_cast< enum_size >( this->mask ) |
|
||||
static_cast< enum_size >( m )
|
||||
);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Rates& Rates::set( opt m, double value , const std::string& tracer_name ) {
|
||||
this->get_ref( m , tracer_name) = value;
|
||||
|
||||
/* mask |= m */
|
||||
this->mask = static_cast< opt >(
|
||||
static_cast< enum_size >( this->mask ) |
|
||||
@@ -418,7 +484,9 @@ namespace Opm {
|
||||
well_potential_oil == rate.well_potential_oil &&
|
||||
well_potential_gas == rate.well_potential_gas &&
|
||||
brine == rate.brine &&
|
||||
alq == rate.alq;
|
||||
alq == rate.alq &&
|
||||
tracer == rate.tracer &&
|
||||
micp == rate.micp;
|
||||
}
|
||||
|
||||
|
||||
@@ -452,6 +520,9 @@ namespace Opm {
|
||||
case opt::well_potential_gas: return this->well_potential_gas;
|
||||
case opt::brine: return this->brine;
|
||||
case opt::alq: return this->alq;
|
||||
case opt::tracer: /* Should _not_ be called with tracer argument */
|
||||
break;
|
||||
case opt::micp: return this->micp;
|
||||
}
|
||||
|
||||
throw std::invalid_argument(
|
||||
@@ -461,12 +532,36 @@ namespace Opm {
|
||||
|
||||
}
|
||||
|
||||
inline const double& Rates::get_ref( opt m, const std::string& tracer_name ) const {
|
||||
if (m != opt::tracer)
|
||||
throw std::logic_error("Logic error - should be called with tracer argument");
|
||||
|
||||
return this->tracer.at(tracer_name);
|
||||
}
|
||||
|
||||
inline double& Rates::get_ref( opt m ) {
|
||||
return const_cast< double& >(
|
||||
static_cast< const Rates* >( this )->get_ref( m )
|
||||
);
|
||||
}
|
||||
|
||||
inline double& Rates::get_ref( opt m, const std::string& tracer_name ) {
|
||||
if (m == opt::tracer) this->tracer.emplace(tracer_name, 0.0);
|
||||
return this->tracer.at(tracer_name);
|
||||
}
|
||||
|
||||
void Rates::init_json(Json::JsonObject& json_data) const {
|
||||
|
||||
if (this->has(opt::wat))
|
||||
json_data.add_item("wat", this->get(opt::wat));
|
||||
|
||||
if (this->has(opt::oil))
|
||||
json_data.add_item("oil", this->get(opt::oil));
|
||||
|
||||
if (this->has(opt::gas))
|
||||
json_data.add_item("gas", this->get(opt::gas));
|
||||
|
||||
}
|
||||
|
||||
bool inline Rates::flowing() const {
|
||||
return ((this->wat != 0) ||
|
||||
@@ -500,6 +595,14 @@ namespace Opm {
|
||||
buffer.write(this->well_potential_gas);
|
||||
buffer.write(this->brine);
|
||||
buffer.write(this->alq);
|
||||
//tracer:
|
||||
unsigned int size = this->tracer.size();
|
||||
buffer.write(size);
|
||||
for (const auto& [name, rate] : this->tracer) {
|
||||
buffer.write(name);
|
||||
buffer.write(rate);
|
||||
}
|
||||
buffer.write(this->micp);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@@ -515,6 +618,21 @@ namespace Opm {
|
||||
buffer.write(this->trans_factor);
|
||||
}
|
||||
|
||||
|
||||
void Connection::init_json(Json::JsonObject& json_data) const {
|
||||
auto json_rates = json_data.add_object("rates");
|
||||
this->rates.init_json(json_rates);
|
||||
|
||||
json_data.add_item("global_index", static_cast<int>(this->index));
|
||||
json_data.add_item("pressure", this->pressure);
|
||||
json_data.add_item("reservoir_rate", this->reservoir_rate);
|
||||
json_data.add_item("cell_pressure", this->cell_pressure);
|
||||
json_data.add_item("swat", this->cell_saturation_water);
|
||||
json_data.add_item("sgas", this->cell_saturation_gas);
|
||||
json_data.add_item("Kh", this->effective_Kh);
|
||||
json_data.add_item("trans_factor", this->trans_factor);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void Segment::write(MessageBufferType& buffer) const {
|
||||
buffer.write(this->segNumber);
|
||||
@@ -588,9 +706,20 @@ namespace Opm {
|
||||
buffer.read(this->well_potential_gas);
|
||||
buffer.read(this->brine);
|
||||
buffer.read(this->alq);
|
||||
//tracer:
|
||||
unsigned int size;
|
||||
buffer.read(size);
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
std::string tracer_name;
|
||||
buffer.read(tracer_name);
|
||||
double tracer_rate;
|
||||
buffer.read(tracer_rate);
|
||||
this->tracer.emplace(tracer_name, tracer_rate);
|
||||
}
|
||||
buffer.read(this->micp);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
template <class MessageBufferType>
|
||||
void Connection::read(MessageBufferType& buffer) {
|
||||
buffer.read(this->index);
|
||||
this->rates.read(buffer);
|
||||
@@ -667,6 +796,27 @@ namespace Opm {
|
||||
this->guide_rates.read(buffer);
|
||||
}
|
||||
|
||||
void Well::init_json(Json::JsonObject& json_data) const {
|
||||
auto json_connections = json_data.add_array("connections");
|
||||
for (const auto& conn : this->connections) {
|
||||
auto json_conn = json_connections.add_object();
|
||||
conn.init_json(json_conn);
|
||||
}
|
||||
auto json_rates = json_data.add_object("rates");
|
||||
this->rates.init_json(json_rates);
|
||||
|
||||
json_data.add_item("bhp", this->bhp);
|
||||
json_data.add_item("thp", this->thp);
|
||||
json_data.add_item("temperature", this->temperature);
|
||||
json_data.add_item("status", ::Opm::Well::Status2String(this->dynamicStatus));
|
||||
|
||||
auto json_control = json_data.add_object("control");
|
||||
this->current_control.init_json(json_control);
|
||||
|
||||
auto json_guiderate = json_data.add_object("guiderate");
|
||||
this->guide_rates.init_json(json_guiderate);
|
||||
}
|
||||
|
||||
}} // Opm::data
|
||||
|
||||
#endif //OPM_OUTPUT_WELLS_HPP
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Opm {
|
||||
class Schedule;
|
||||
class UDQInput;
|
||||
class UDQActive;
|
||||
class Actdims;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
@@ -54,13 +55,11 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
class AggregateActionxData
|
||||
{
|
||||
public:
|
||||
explicit AggregateActionxData(const std::vector<int>& actDims);
|
||||
|
||||
void captureDeclaredActionxData( const Opm::Schedule& sched,
|
||||
const Opm::Action::State& action_state,
|
||||
const Opm::SummaryState& st,
|
||||
const std::vector<int>& actDims,
|
||||
const std::size_t simStep);
|
||||
AggregateActionxData(const Opm::Schedule& sched,
|
||||
const Opm::Action::State& action_state,
|
||||
const Opm::SummaryState& st,
|
||||
const std::size_t simStep);
|
||||
|
||||
const std::vector<int>& getIACT() const
|
||||
{
|
||||
@@ -99,6 +98,14 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
AggregateActionxData( const std::vector<int>& rst_dims,
|
||||
std::size_t num_actions,
|
||||
const Opm::Actdims& actdims,
|
||||
const Opm::Schedule& sched,
|
||||
const Opm::Action::State& action_state,
|
||||
const Opm::SummaryState& st,
|
||||
const std::size_t simStep);
|
||||
|
||||
/// Aggregate 'IACT' array (Integer) for all ACTIONX data (9 integers pr UDQ)
|
||||
WindowedArray<int> iACT_;
|
||||
|
||||
|
||||
191
opm/output/eclipse/AggregateAquiferData.hpp
Normal file
191
opm/output/eclipse/AggregateAquiferData.hpp
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
Copyright (c) 2021 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_AGGREGATE_AQUIFER_DATA_HPP
|
||||
#define OPM_AGGREGATE_AQUIFER_DATA_HPP
|
||||
|
||||
#include <opm/output/eclipse/InteHEAD.hpp>
|
||||
#include <opm/output/eclipse/WindowedArray.hpp>
|
||||
|
||||
#include <opm/output/data/Aquifer.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
class AquiferConfig;
|
||||
class EclipseGrid;
|
||||
class SummaryState;
|
||||
class UnitSystem;
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
|
||||
class AggregateAquiferData
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
///
|
||||
/// \param[in] aqDims Aquifer dimensions including number of active
|
||||
/// aquifers, maximum aquifer IDs, and number of data items per
|
||||
/// aquifer (or connection) in the various output arrays.
|
||||
///
|
||||
/// \param[in] aqConfig Aquifer configuration object. Keeps track
|
||||
/// of aquifer types (Carter-Tracy vs. Fetkovich) and provides
|
||||
/// read-only access to the individual aquifer objects.
|
||||
///
|
||||
/// \param[in] grid Simulation grid. Needed to map active to
|
||||
/// Cartesian cell indices and to extract (I,J,K) index tuples of
|
||||
/// the active cells.
|
||||
explicit AggregateAquiferData(const InteHEAD::AquiferDims& aqDims,
|
||||
const AquiferConfig& aqConfig,
|
||||
const EclipseGrid& grid);
|
||||
|
||||
/// Linearise dynamic information pertinent to analytic aquifers
|
||||
/// into internal arrays.
|
||||
///
|
||||
/// \param[in] aqConfig Aquifer configuration object. Keeps track
|
||||
/// of aquifer types (Carter-Tracy vs. Fetkovich) and provides
|
||||
/// read-only access to the individual aquifer objects.
|
||||
///
|
||||
/// \param[in] aquData Dynamic aquifer data, including time
|
||||
/// constants, water mass densities, water viscosities, and
|
||||
/// initial aquifer pressures.
|
||||
///
|
||||
/// \param[in] summaryState Current state of summary variables.
|
||||
/// Expected to contain at least the summary variables AAQP
|
||||
/// (aquifer pressure), AAQR (aquifer flow rate), and AAQT (total
|
||||
/// produced inflow volume from aquifer).
|
||||
///
|
||||
/// \param[in] usys Unit system. Needed to convert quantities from
|
||||
/// internal to output units.
|
||||
void captureDynamicdAquiferData(const AquiferConfig& aqConfig,
|
||||
const data::Aquifers& aquData,
|
||||
const SummaryState& summaryState,
|
||||
const UnitSystem& usys);
|
||||
|
||||
/// Retrieve the maximum active aquifer ID over all analytic
|
||||
/// aquifers.
|
||||
///
|
||||
/// Controls output of restart information pertaining to analytic
|
||||
/// aquifer connections.
|
||||
int maximumActiveAnalyticAquiferID() const
|
||||
{
|
||||
return this->maxActiveAnalyticAquiferID_;
|
||||
}
|
||||
|
||||
/// Retrieve Integer Aquifer Data Array.
|
||||
const std::vector<int>& getIntegerAquiferData() const
|
||||
{
|
||||
return this->integerAnalyticAq_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Floating-Point (Real) Aquifer Data Array.
|
||||
const std::vector<float>& getSinglePrecAquiferData() const
|
||||
{
|
||||
return this->singleprecAnalyticAq_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Floating-Point (Double Precision) Aquifer Data Array.
|
||||
const std::vector<double>& getDoublePrecAquiferData() const
|
||||
{
|
||||
return this->doubleprecAnalyticAq_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Integer Aquifer Data Array for Numeric Aquifers.
|
||||
const std::vector<int>& getNumericAquiferIntegerData() const
|
||||
{
|
||||
return this->integerNumericAq_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Double Precision Aquifer Data Array for Numeric Aquifers.
|
||||
const std::vector<double>& getNumericAquiferDoublePrecData() const
|
||||
{
|
||||
return this->doubleprecNumericAq_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Integer Aquifer Connection Data Array (analytic aquifers)
|
||||
///
|
||||
/// \param[in] aquiferID Aquifer for which to retrieve integer
|
||||
/// connection data array. Expected to be in the range
|
||||
/// [1..maximumActiveAnalyticAquiferID()] (inclusive).
|
||||
const std::vector<int>& getIntegerAquiferConnectionData(const int aquiferID) const
|
||||
{
|
||||
return this->integerAnalyticAquiferConn_[aquiferID - 1].data();
|
||||
}
|
||||
|
||||
/// Retrieve Floating-Point (Real) Aquifer Connection Data Array (analytic aquifers)
|
||||
///
|
||||
/// \param[in] aquiferID Aquifer for which to retrieve single
|
||||
/// precision floating point connection data array. Expected to
|
||||
/// be in the range [1..maximumActiveAnalyticAquiferID()]
|
||||
/// (inclusive).
|
||||
const std::vector<float>& getSinglePrecAquiferConnectionData(const int aquiferID) const
|
||||
{
|
||||
return this->singleprecAnalyticAquiferConn_[aquiferID - 1].data();
|
||||
}
|
||||
|
||||
/// Retrieve Floating-Point (Double Precision) Aquifer Connection
|
||||
/// Data Array (analytic aquifers)
|
||||
///
|
||||
/// \param[in] aquiferID Aquifer for which to retrieve double
|
||||
/// precision floating point connection data array. Expected to
|
||||
/// be in the range [1..maximumActiveAnalyticAquiferID()]
|
||||
/// (inclusive).
|
||||
const std::vector<double>& getDoublePrecAquiferConnectionData(const int aquiferID) const
|
||||
{
|
||||
return this->doubleprecAnalyticAquiferConn_[aquiferID - 1].data();
|
||||
}
|
||||
|
||||
private:
|
||||
int maxActiveAnalyticAquiferID_{0};
|
||||
|
||||
std::vector<int> numActiveConn_{};
|
||||
std::vector<double> totalInflux_{};
|
||||
|
||||
/// Aggregate 'IAAQ' array (Integer) for all analytic aquifers.
|
||||
WindowedArray<int> integerAnalyticAq_;
|
||||
|
||||
/// Aggregate 'SAAQ' array (Real) for all analytic aquifers.
|
||||
WindowedArray<float> singleprecAnalyticAq_;
|
||||
|
||||
/// Aggregate 'XAAQ' array (Double Precision) for all analytic aquifers.
|
||||
WindowedArray<double> doubleprecAnalyticAq_;
|
||||
|
||||
/// Aggregate 'IAQN' array (integer) for all numeric aquifers.
|
||||
WindowedArray<int> integerNumericAq_;
|
||||
|
||||
/// Aggregate 'RAQN' array (Double Precision) for all numeric aquifers.
|
||||
WindowedArray<double> doubleprecNumericAq_;
|
||||
|
||||
/// Aggregate ICAQ array (Integer) for all analytic aquifer
|
||||
/// connections. Separate array for each aquifer.
|
||||
std::vector<WindowedArray<int>> integerAnalyticAquiferConn_;
|
||||
|
||||
/// Aggregate SCAQ array (Real) for all analytic aquifer
|
||||
/// connections. Separate array for each aquifer.
|
||||
std::vector<WindowedArray<float>> singleprecAnalyticAquiferConn_;
|
||||
|
||||
/// Aggregate ACAQ array (Double Precision) for all analytic aquifer
|
||||
/// connections. Separate array for each aquifer.
|
||||
std::vector<WindowedArray<double>> doubleprecAnalyticAquiferConn_;
|
||||
};
|
||||
|
||||
}}} // Opm::RestartIO::Helpers
|
||||
|
||||
#endif // OPM_AGGREGATE_WELL_DATA_HPP
|
||||
@@ -34,7 +34,7 @@ namespace Opm {
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class WellRates;
|
||||
class Wells;
|
||||
}}
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
@@ -47,7 +47,7 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
void captureDeclaredConnData(const Opm::Schedule& sched,
|
||||
const Opm::EclipseGrid& grid,
|
||||
const Opm::UnitSystem& units,
|
||||
const Opm::data::WellRates& xw,
|
||||
const Opm::data::Wells& xw,
|
||||
const Opm::SummaryState& summary_state,
|
||||
const std::size_t sim_step);
|
||||
|
||||
|
||||
@@ -118,39 +118,6 @@ public:
|
||||
{"GGPTH", 143},
|
||||
{"GGITH", 144},
|
||||
};
|
||||
|
||||
|
||||
using inj_cmode_enum = Opm::Group::InjectionCMode;
|
||||
const std::map<inj_cmode_enum, int> cmodeToNum = {
|
||||
|
||||
{inj_cmode_enum::NONE, 0},
|
||||
{inj_cmode_enum::RATE, 1},
|
||||
{inj_cmode_enum::RESV, 2},
|
||||
{inj_cmode_enum::REIN, 3},
|
||||
{inj_cmode_enum::VREP, 4},
|
||||
{inj_cmode_enum::FLD, 0},
|
||||
{inj_cmode_enum::SALE, 0},
|
||||
};
|
||||
|
||||
// Note: guide rates don't exist at the FIELD level.
|
||||
const std::map<int, inj_cmode_enum> ICntlModeToiCMode = {
|
||||
{0, inj_cmode_enum::NONE},
|
||||
{1, inj_cmode_enum::RATE},
|
||||
{2, inj_cmode_enum::RESV},
|
||||
{3, inj_cmode_enum::REIN},
|
||||
{4, inj_cmode_enum::VREP}, };
|
||||
|
||||
using p_cmode = Opm::Group::ProductionCMode;
|
||||
const std::map<int, p_cmode> PCntlModeToPCMode = {
|
||||
{0, p_cmode::NONE},
|
||||
{1, p_cmode::ORAT},
|
||||
{2, p_cmode::WRAT},
|
||||
{3, p_cmode::GRAT},
|
||||
{4, p_cmode::LRAT},
|
||||
{9, p_cmode::CRAT},
|
||||
{5, p_cmode::RESV},
|
||||
{6, p_cmode::PRBL},
|
||||
};
|
||||
|
||||
const std::map<std::string, size_t> fieldKeyToIndex = {
|
||||
{"FOPR", 0},
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
const std::vector<int>& inteHead,
|
||||
const Opm::EclipseGrid& grid,
|
||||
const Opm::SummaryState& smry,
|
||||
const Opm::data::WellRates& wr
|
||||
const Opm::data::Wells& wr
|
||||
);
|
||||
|
||||
/// Retrieve Integer Multisegment well data Array.
|
||||
|
||||
@@ -23,15 +23,6 @@
|
||||
#include <opm/output/eclipse/WindowedArray.hpp>
|
||||
#include <opm/io/eclipse/PaddedOutputString.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQInput.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQDefine.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQParams.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
76
opm/output/eclipse/AggregateWListData.hpp
Normal file
76
opm/output/eclipse/AggregateWListData.hpp
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright (c) 2018 Statoil ASA
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_AGGREGATE_WLIST_DATA_HPP
|
||||
#define OPM_AGGREGATE_WLIST_DATA_HPP
|
||||
|
||||
#include <opm/output/eclipse/WindowedArray.hpp>
|
||||
#include <opm/io/eclipse/PaddedOutputString.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
class Schedule;
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class Wells;
|
||||
}} // Opm::data
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
|
||||
class AggregateWListData
|
||||
{
|
||||
public:
|
||||
explicit AggregateWListData(const std::vector<int>& inteHead);
|
||||
|
||||
void captureDeclaredWListData(const Schedule& sched,
|
||||
const std::size_t sim_step,
|
||||
const std::vector<int>& inteHead);
|
||||
|
||||
|
||||
|
||||
/// Retrieve Integer WLIST Data Array.
|
||||
const std::vector<int>& getIWls() const
|
||||
{
|
||||
return this->iWls_.data();
|
||||
}
|
||||
|
||||
/// Retrieve Character WLIST Data Array.
|
||||
const std::vector<EclIO::PaddedOutputString<8>>& getZWls() const
|
||||
{
|
||||
return this->zWls_.data();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/// Aggregate 'IWLS' array (Integer) for all wells.
|
||||
WindowedArray<int> iWls_;
|
||||
|
||||
/// Aggregate 'ZWLS' array (Character) for all wells.
|
||||
WindowedArray<EclIO::PaddedOutputString<8>> zWls_;
|
||||
|
||||
};
|
||||
|
||||
}}} // Opm::RestartIO::Helpers
|
||||
|
||||
#endif // OPM_AGGREGATE_WLIST_DATA_HPP
|
||||
@@ -33,13 +33,14 @@ namespace Opm {
|
||||
class Schedule;
|
||||
class SummaryState;
|
||||
class UnitSystem;
|
||||
class WellTestState;
|
||||
namespace Action {
|
||||
class State;
|
||||
}
|
||||
} // Opm
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class WellRates;
|
||||
class Wells;
|
||||
}} // Opm::data
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
@@ -49,16 +50,17 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
public:
|
||||
explicit AggregateWellData(const std::vector<int>& inteHead);
|
||||
|
||||
void captureDeclaredWellData(const Schedule& sched,
|
||||
const UnitSystem& units,
|
||||
const std::size_t sim_step,
|
||||
const ::Opm::Action::State& action_state,
|
||||
const ::Opm::SummaryState& smry,
|
||||
const std::vector<int>& inteHead);
|
||||
void captureDeclaredWellData(const Schedule& sched,
|
||||
const UnitSystem& units,
|
||||
const std::size_t sim_step,
|
||||
const Opm::Action::State& action_state,
|
||||
const Opm::WellTestState& wtest_state,
|
||||
const Opm::SummaryState& smry,
|
||||
const std::vector<int>& inteHead);
|
||||
|
||||
void captureDynamicWellData(const Opm::Schedule& sched,
|
||||
const std::size_t sim_step,
|
||||
const Opm::data::WellRates& xw,
|
||||
const Opm::data::Wells& xw,
|
||||
const Opm::SummaryState& smry);
|
||||
|
||||
/// Retrieve Integer Well Data Array.
|
||||
|
||||
@@ -46,6 +46,7 @@ class Schedule;
|
||||
class SummaryConfig;
|
||||
class SummaryState;
|
||||
class UDQState;
|
||||
class WellTestState;
|
||||
namespace Action { class State; }
|
||||
/*!
|
||||
* \brief A class to write the reservoir state and the well state of a
|
||||
@@ -60,7 +61,10 @@ public:
|
||||
EclipseIO( const EclipseState& es,
|
||||
EclipseGrid grid,
|
||||
const Schedule& schedule,
|
||||
const SummaryConfig& summary_config);
|
||||
const SummaryConfig& summary_config,
|
||||
const std::string& basename = "",
|
||||
const bool writeEsmry = false
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -176,6 +180,7 @@ public:
|
||||
*/
|
||||
|
||||
void writeTimeStep( const Action::State& action_state,
|
||||
const WellTestState& wtest_state,
|
||||
const SummaryState& st,
|
||||
const UDQState& udq_state,
|
||||
int report_step,
|
||||
@@ -232,7 +237,6 @@ public:
|
||||
private:
|
||||
class Impl;
|
||||
std::unique_ptr< Impl > impl;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
@@ -40,13 +40,19 @@ public:
|
||||
GasInGasPhase = 6,
|
||||
PoreVolume = 7,
|
||||
// The Inplace class is implemented in close relation to the
|
||||
// ecloutputblackoilmodule in opm-simulators, ane there are certainly
|
||||
// idiosyncracies here due to that coupling. For instance the three enum
|
||||
// values PressurePV, HydroCarbonPV and PressureHydroCarbonPV are *not*
|
||||
// included in the return value from phases().
|
||||
// ecloutputblackoilmodule in opm-simulators, ane there are
|
||||
// certainly idiosyncracies here due to that coupling. For instance
|
||||
// the enum values PressurePV, HydroCarbonPV, PressureHydroCarbonPV,
|
||||
// and DynamicPoreVolume are *not* included in the return value from
|
||||
// phases().
|
||||
PressurePV = 8,
|
||||
HydroCarbonPV = 9,
|
||||
PressureHydroCarbonPV = 10
|
||||
PressureHydroCarbonPV = 10,
|
||||
DynamicPoreVolume = 11,
|
||||
WaterResVolume = 12,
|
||||
OilResVolume = 13,
|
||||
GasResVolume = 14,
|
||||
SALT = 15,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
Copyright 2021 Equinor ASA.
|
||||
Copyright 2016, 2017, 2018 Statoil ASA.
|
||||
|
||||
This file is part of the Open Porous Media Project (OPM).
|
||||
@@ -25,12 +26,15 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class EclipseGrid;
|
||||
class EclipseState;
|
||||
class UnitSystem;
|
||||
|
||||
namespace RestartIO {
|
||||
}
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
|
||||
class InteHEAD
|
||||
{
|
||||
@@ -132,6 +136,51 @@ namespace RestartIO {
|
||||
int ninobr;
|
||||
};
|
||||
|
||||
struct AquiferDims {
|
||||
// Number of active analytic aquifers (# unique aquifer IDs)
|
||||
int numAquifers {0};
|
||||
|
||||
// Declared maximum number of analytic aquifers in model
|
||||
// (AQUDIMS(5))
|
||||
int maxNumAquifers {0};
|
||||
|
||||
// Declared maximum number of connections in any analytic
|
||||
// aquifer (AQUDIMS(6))
|
||||
int maxNumAquiferConn {0};
|
||||
|
||||
// Maximum number of *active* connections in any analytic aquifer
|
||||
int maxNumActiveAquiferConn {0};
|
||||
|
||||
// Maximum aquifer ID across all of the model's analytic aquifers.
|
||||
int maxAquiferID {0};
|
||||
|
||||
// Number of numeric aquifer records (lines of AQUNUM data)
|
||||
int numNumericAquiferRecords {0};
|
||||
|
||||
// Number of data elements per aquifer in IAAQ array.
|
||||
int numIntAquiferElem {18};
|
||||
|
||||
// Number of data elements per aquifer in SAAQ array.
|
||||
int numRealAquiferElem {24};
|
||||
|
||||
// Number of data elements per aquifer in XAAQ array.
|
||||
int numDoubAquiferElem {10};
|
||||
|
||||
// Number of data elements in IAQN array per numeric aquifer record.
|
||||
int numNumericAquiferIntElem {10};
|
||||
|
||||
// Number of data elements in RAQN array per numeric aquifer record.
|
||||
int numNumericAquiferDoubleElem {13};
|
||||
|
||||
// Number of data elements per coonnection in ICAQ array.
|
||||
int numIntConnElem {7};
|
||||
|
||||
// Number of data elements per connecetion in SCAQ array.
|
||||
int numRealConnElem {2};
|
||||
|
||||
// Number of data elements per connection in ACAQ array.
|
||||
int numDoubConnElem {4};
|
||||
};
|
||||
|
||||
InteHEAD();
|
||||
~InteHEAD() = default;
|
||||
@@ -148,13 +197,16 @@ namespace RestartIO {
|
||||
|
||||
InteHEAD& unitConventions(const UnitSystem& usys);
|
||||
InteHEAD& wellTableDimensions(const WellTableDim& wtdim);
|
||||
InteHEAD& aquiferDimensions(const AquiferDims& aqudims);
|
||||
|
||||
InteHEAD& calendarDate(const TimePoint& date);
|
||||
InteHEAD& activePhases(const Phases& phases);
|
||||
|
||||
InteHEAD& params_NWELZ(const int niwelz, const int nswelz, const int nxwelz, const int nzwelz);
|
||||
InteHEAD& params_NCON(const int niconz, const int nsconz, const int nxconz);
|
||||
InteHEAD& params_GRPZ(const std::array<int, 4>& grpz);
|
||||
InteHEAD& params_NGCTRL(const int gct);
|
||||
InteHEAD& params_NAAQZ(const int ncamax, const int niaaqz, const int nsaaqz, const int nxaaqz, const int nicaqz, const int nscaqz, const int nacaqz);
|
||||
|
||||
InteHEAD& stepParam(const int tstep, const int report_step);
|
||||
InteHEAD& tuningParam(const TuningPar& tunpar);
|
||||
InteHEAD& variousParam(const int version, const int iprog);
|
||||
@@ -179,11 +231,12 @@ namespace RestartIO {
|
||||
std::vector<int> data_;
|
||||
};
|
||||
|
||||
std::time_t makeUTCTime(const std::tm& timePoint);
|
||||
|
||||
InteHEAD::TimePoint
|
||||
getSimulationTimePoint(const std::time_t start,
|
||||
const double elapsed);
|
||||
|
||||
InteHEAD::AquiferDims
|
||||
inferAquiferDimensions(const EclipseState& es);
|
||||
}} // Opm::RestartIO
|
||||
|
||||
#endif // OPM_INTEHEAD_HEADER_INCLUDED
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
|
||||
#include <opm/output/eclipse/RestartValue.hpp>
|
||||
|
||||
#include <opm/output/eclipse/AggregateAquiferData.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -38,6 +40,7 @@ namespace Opm {
|
||||
class Schedule;
|
||||
class UDQState;
|
||||
class SummaryState;
|
||||
class WellTestState;
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
@@ -76,17 +79,19 @@ namespace Opm { namespace Action {
|
||||
*/
|
||||
namespace Opm { namespace RestartIO {
|
||||
|
||||
void save(EclIO::OutputStream::Restart& rstFile,
|
||||
int report_step,
|
||||
double seconds_elapsed,
|
||||
RestartValue value,
|
||||
const EclipseState& es,
|
||||
const EclipseGrid& grid,
|
||||
const Schedule& schedule,
|
||||
const Action::State& action_state,
|
||||
const SummaryState& sumState,
|
||||
const UDQState& udqState,
|
||||
bool write_double = false);
|
||||
void save(EclIO::OutputStream::Restart& rstFile,
|
||||
int report_step,
|
||||
double seconds_elapsed,
|
||||
RestartValue value,
|
||||
const EclipseState& es,
|
||||
const EclipseGrid& grid,
|
||||
const Schedule& schedule,
|
||||
const Action::State& action_state,
|
||||
const WellTestState& wtest_state,
|
||||
const SummaryState& sumState,
|
||||
const UDQState& udqState,
|
||||
std::optional<Helpers::AggregateAquiferData>& aquiferData,
|
||||
bool write_double = false);
|
||||
|
||||
|
||||
RestartValue load(const std::string& filename,
|
||||
|
||||
@@ -69,15 +69,19 @@ namespace Opm {
|
||||
class RestartValue {
|
||||
public:
|
||||
using ExtraVector = std::vector<std::pair<RestartKey, std::vector<double>>>;
|
||||
data::Solution solution;
|
||||
data::Wells wells;
|
||||
data::GroupAndNetworkValues grp_nwrk;
|
||||
ExtraVector extra;
|
||||
std::vector<data::AquiferData> aquifer;
|
||||
|
||||
RestartValue(data::Solution sol, data::Wells wells_arg, data::GroupAndNetworkValues grpn_nwrk_arg);
|
||||
data::Solution solution{};
|
||||
data::Wells wells{};
|
||||
data::GroupAndNetworkValues grp_nwrk{};
|
||||
data::Aquifers aquifer{};
|
||||
ExtraVector extra{};
|
||||
|
||||
RestartValue() {}
|
||||
RestartValue(data::Solution sol,
|
||||
data::Wells wells_arg,
|
||||
data::GroupAndNetworkValues grpn_nwrk_arg,
|
||||
data::Aquifers aquifer_arg);
|
||||
|
||||
RestartValue() = default;
|
||||
|
||||
bool hasExtra(const std::string& key) const;
|
||||
void addExtra(const std::string& key, UnitSystem::measure dimension, std::vector<double> data);
|
||||
@@ -89,10 +93,11 @@ namespace Opm {
|
||||
|
||||
bool operator==(const RestartValue& val2) const
|
||||
{
|
||||
return solution == val2.solution &&
|
||||
wells == val2.wells &&
|
||||
grp_nwrk == val2.grp_nwrk &&
|
||||
extra == val2.extra;
|
||||
return (this->solution == val2.solution)
|
||||
&& (this->wells == val2.wells)
|
||||
&& (this->grp_nwrk == val2.grp_nwrk)
|
||||
&& (this->aquifer == val2.aquifer)
|
||||
&& (this->extra == val2.extra);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Opm {
|
||||
} // namespace Opm
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class WellRates;
|
||||
class Wells;
|
||||
class GroupAndNetworkValues;
|
||||
}} // namespace Opm::data
|
||||
|
||||
@@ -57,16 +57,18 @@ public:
|
||||
const SummaryConfig& sumcfg,
|
||||
const EclipseGrid& grid,
|
||||
const Schedule& sched,
|
||||
const std::string& basename = "");
|
||||
const std::string& basename = "",
|
||||
const bool& writeEsmry = false
|
||||
);
|
||||
|
||||
~Summary();
|
||||
|
||||
void add_timestep(const SummaryState& st, const int report_step);
|
||||
void add_timestep(const SummaryState& st, const int report_step, bool isSubstep);
|
||||
|
||||
void eval(SummaryState& summary_state,
|
||||
const int report_step,
|
||||
const double secs_elapsed,
|
||||
const data::WellRates& well_solution,
|
||||
const data::Wells& well_solution,
|
||||
const data::GroupAndNetworkValues& group_and_nwrk_solution,
|
||||
GlobalProcessParameters single_values,
|
||||
const Inplace& initial_inplace,
|
||||
|
||||
46
opm/output/eclipse/UDQDims.hpp
Normal file
46
opm/output/eclipse/UDQDims.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (c) 2021 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_UDQDIMS_HPP
|
||||
#define OPM_UDQDIMS_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class UDQConfig;
|
||||
|
||||
|
||||
class UDQDims {
|
||||
public:
|
||||
UDQDims(const UDQConfig& config, const std::vector<int>& intehead);
|
||||
const std::vector<int>& data() const;
|
||||
|
||||
static std::size_t entriesPerIUDQ();
|
||||
static std::size_t entriesPerIUAD();
|
||||
static std::size_t entriesPerZUDN();
|
||||
static std::size_t entriesPerZUDL();
|
||||
|
||||
private:
|
||||
std::vector<int> m_data;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
107
opm/output/eclipse/VectorItems/action.hpp
Normal file
107
opm/output/eclipse/VectorItems/action.hpp
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
Copyright (c) 2021 Equinor ASA
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_OUTPUT_ECLIPSE_VECTOR_ACTION_HPP
|
||||
#define OPM_OUTPUT_ECLIPSE_VECTOR_ACTION_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems {
|
||||
|
||||
namespace IACN {
|
||||
enum index : std::vector<int>::size_type {
|
||||
LHSQuantityType = 10,
|
||||
RHSQuantityType = 11,
|
||||
FirstGreater = 12,
|
||||
TerminalLogic = 13,
|
||||
Paren = 15,
|
||||
Comparator = 16,
|
||||
BoolLink = 17
|
||||
};
|
||||
|
||||
// The same enum is used for both lefthand side and righthand side quantities;
|
||||
// although not all values can be used on both sides.
|
||||
namespace Value {
|
||||
enum QuantityType {
|
||||
Field = 1,
|
||||
Well = 2,
|
||||
Group = 3,
|
||||
Const = 8,
|
||||
Day = 10,
|
||||
Month = 11,
|
||||
Year = 12
|
||||
};
|
||||
|
||||
enum ParenType {
|
||||
None = 0,
|
||||
Open = 1,
|
||||
Close = 2
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
constexpr std::size_t ConditionSize = 26;
|
||||
}
|
||||
|
||||
|
||||
namespace SACN {
|
||||
|
||||
enum index : std::vector<int>::size_type {
|
||||
LHSValue0 = 0,
|
||||
RHSValue0 = 2,
|
||||
LHSValue1 = 4,
|
||||
RHSValue1 = 5,
|
||||
LHSValue2 = 6,
|
||||
RHSValue2 = 7,
|
||||
LHSValue3 = 8,
|
||||
RHSValue3 = 9
|
||||
};
|
||||
|
||||
constexpr std::size_t ConditionSize = 16;
|
||||
}
|
||||
|
||||
|
||||
namespace ZACN {
|
||||
enum index : std::vector<int>::size_type {
|
||||
Quantity = 0,
|
||||
LHSQuantity = 0,
|
||||
RHSQuantity = 1,
|
||||
Comparator = 2,
|
||||
Well = 3,
|
||||
LHSWell = 3,
|
||||
RHSWell = 4,
|
||||
Group = 5,
|
||||
LHSGroup = 5,
|
||||
RHSGroup = 6
|
||||
};
|
||||
|
||||
constexpr std::size_t RHSOffset = 1;
|
||||
constexpr std::size_t ConditionSize = 13;
|
||||
}
|
||||
|
||||
namespace ZLACT {
|
||||
|
||||
constexpr std::size_t max_line_length = 128;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}}}} // Opm::RestartIO::Helpers::VectorItems
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2021 Equinor ASA
|
||||
Copyright (c) 2019 Equinor ASA
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
@@ -26,42 +27,112 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
namespace IAnalyticAquifer {
|
||||
enum index : std::vector<int>::size_type {
|
||||
NumAquiferConn = 0,
|
||||
WatPropTable = 1,
|
||||
NumAquiferConn = 0, // Number of active aquifer connections for this aquifer
|
||||
WatPropTable = 1, // PVT number (ACUCT(10) or AQUFETP(7))
|
||||
|
||||
TypeRelated1 = 9,
|
||||
TypeRelated2 = 10,
|
||||
CTInfluenceFunction = 9, // AQUCT(11)
|
||||
TypeRelated1 = 10, // =1 for CT, =0 for FETP
|
||||
|
||||
Unknown_1 = 11, // Unknown item. =1 in all cases seen thus far.
|
||||
};
|
||||
|
||||
namespace Value {
|
||||
enum ModelType : int {
|
||||
Fetkovich = 0,
|
||||
CarterTracy = 1,
|
||||
};
|
||||
} // Value
|
||||
} // IAnalyticAquifer
|
||||
|
||||
namespace IAnalyticAquiferConn {
|
||||
enum index : std::vector<int>::size_type {
|
||||
Index_I = 0, // One-based I index of connecting cell
|
||||
Index_J = 1, // One-based J index of connecting cell
|
||||
Index_K = 2, // One-based K index of connecting cell
|
||||
ActiveIndex = 3, // One-based columnar active index of connecting cell
|
||||
FaceDirection = 4, // Direction of connecting face
|
||||
};
|
||||
|
||||
namespace Value {
|
||||
enum FaceDirection {
|
||||
IMinus = 1, IPlus = 2, JMinus = 3, JPlus = 4, KMinus = 5, KPlus = 6,
|
||||
};
|
||||
} // Value
|
||||
} // IAnalyticAquiferConn
|
||||
|
||||
namespace INumericAquifer {
|
||||
enum index : std::vector<int>::size_type {
|
||||
AquiferID = 0, // ID of numeric aquifer
|
||||
Cell_I = 1, // I coordinate of aquifer cell
|
||||
Cell_J = 2, // J coordinate of aquifer cell
|
||||
Cell_K = 3, // K coordinate of aquifer cell
|
||||
PVTTableID = 4, // PVT Table ID of numeric aquifer
|
||||
SatFuncID = 5, // Saturation function ID of numeric aquifer
|
||||
};
|
||||
} // INumericAquifer
|
||||
|
||||
namespace RNumericAquifer {
|
||||
enum index : std::vector<double>::size_type {
|
||||
Area = 0, // Aquifer inflow area, AQUNUM(5)
|
||||
Length = 1, // Aquifer length, AQUNUM(6)
|
||||
Porosity = 2, // Aquifer porosity, AQUNUM(7)
|
||||
Permeability = 3, // Aquifer permeability, AQUNUM(8)
|
||||
Depth = 4, // Aquifer depth, AQUNUM(9)
|
||||
Pressure = 5, // Aquifer pressure, AQUNUM(10)
|
||||
|
||||
Unknown_1 = 6, // Unknown item, = 1.0
|
||||
Unknown_2 = 7, // Unknown item, = 1.0
|
||||
Unknown_3 = 8, // Unknown item, = 1.0
|
||||
|
||||
PoreVolume = 9, // Total aquifer pore-volume (= Area * Length * Porosity)
|
||||
|
||||
FlowRate = 10, // Aquifer inflow rate (ANQR:N)
|
||||
ProdVolume = 11, // Total liquid volume produced from aquifer (AQNT:N)
|
||||
DynPressure = 12, // Dynamic aquifer pressure (ANQP:N)
|
||||
};
|
||||
} // RNumericAquifer
|
||||
|
||||
namespace SAnalyticAquifer {
|
||||
enum index : std::vector<float>::size_type {
|
||||
Compressibility = 0,
|
||||
Compressibility = 0, // Total aquifer compressibility (AQUCT(6), AQUFETP(5))
|
||||
|
||||
FetInitVol = 1,
|
||||
FetProdIndex = 2,
|
||||
FetTimeConstant = 3,
|
||||
FetInitVol = 1, // Initial aquifer volume (AQUFETP(4))
|
||||
FetProdIndex = 2, // Aquifer productivity index (AQUFETP(6))
|
||||
FetTimeConstant = 3, // Fetkovich Aquifer time constant (Compressibility * InitVol / ProdIndex)
|
||||
|
||||
CTRadius = 1,
|
||||
CTPermeability = 2,
|
||||
CTPorosity = 3,
|
||||
CTRadius = 1, // CT aquifer external radius (AQUCT(7))
|
||||
CTPermeability = 2, // CT aquifer permeability (AQUCT(4))
|
||||
CTPorosity = 3, // CT aquifer porosity (AQUCT(5))
|
||||
|
||||
InitPressure = 4,
|
||||
DatumDepth = 5,
|
||||
InitPressure = 4, // Initial aquifer pressure (AQUCT(3), AQUFETP(3))
|
||||
DatumDepth = 5, // Aquifer datum depth (AQUCT(2), AQUFETP(2))
|
||||
|
||||
CTThickness = 6,
|
||||
CTAngle = 7,
|
||||
CTWatMassDensity = 8,
|
||||
CTWatViscosity = 9,
|
||||
CTThickness = 6, // CT aquifer thickness (AQUCT(8))
|
||||
CTAngle = 7, // CT aquifer angle of influence (AQUCT(9) / 360.0)
|
||||
CTWatMassDensity = 8, // Water density at reservoir conditions
|
||||
CTWatViscosity = 9, // Water viscosity at reservoir conditions
|
||||
};
|
||||
} // SAnalyticAquifer
|
||||
|
||||
namespace SAnalyticAquiferConn {
|
||||
enum index : std::vector<float>::size_type {
|
||||
InfluxFraction = 0, // Connection's fraction of total aquifer influx coefficient
|
||||
FaceAreaToInfluxCoeff = 1, // Connection's effective face area divided by aquifer's total influx coefficient
|
||||
};
|
||||
} // SAnalyticAquiferConn
|
||||
|
||||
namespace XAnalyticAquifer {
|
||||
enum index : std::vector<double>::size_type {
|
||||
FlowRate = 0,
|
||||
Pressure = 1, // Dynamic aquifer pressure
|
||||
ProdVolume = 2, // Liquid volume produced from aquifer (into reservoir)
|
||||
TotalArea = 3,
|
||||
FlowRate = 0, // Aquifer rate (AAQR:N)
|
||||
Pressure = 1, // Dynamic aquifer pressure (AAQP:N)
|
||||
ProdVolume = 2, // Liquid volume produced from aquifer (into reservoir, AAQT:N)
|
||||
TotalInfluxCoeff = 3, // Total aquifer influx coefficient across all aquifer connections
|
||||
|
||||
CTRecipTimeConst = 4, // Reciprocal time constant for CT aquifer
|
||||
CTInfluxConstant = 5, // Influx constant "beta" for CT aquifer
|
||||
|
||||
CTDimensionLessTime = 8, // Dimensionless time for CT aquifer (AAQTD:N)
|
||||
CTDimensionLessPressure = 9, // Dimensionless pressure for CT aquifer (AAQPD:N)
|
||||
};
|
||||
} // XAnalyticAquifer
|
||||
|
||||
|
||||
@@ -56,12 +56,18 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
// Observe that these value should not be used as ordinary indices into
|
||||
// the the IGRP vector, they should all be used as IGRP[NWGMAX + $index]
|
||||
enum index : std::vector<int>::size_type {
|
||||
NoOfChildGroupsWells = 0,
|
||||
ProdActiveCMode = 1,
|
||||
ProdHighLevCtrl = 5,
|
||||
GuideRateDef = 6,
|
||||
ExceedAction = 7,
|
||||
WInjCMode = 16,
|
||||
GConProdCMode = 10,
|
||||
GInjCMode = 21,
|
||||
WInjActiveCMode = 16,
|
||||
WInjHighLevCtrl = 17,
|
||||
GConInjeWInjCMode = 19,
|
||||
GInjActiveCMode = 21,
|
||||
GInjHighLevCtrl = 22,
|
||||
GConInjeGInjCMode = 24,
|
||||
GroupType = 26,
|
||||
GroupLevel = 27,
|
||||
ParentGroup = 28,
|
||||
@@ -75,6 +81,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
Water = 2,
|
||||
Gas = 3,
|
||||
Liquid = 4,
|
||||
Resv = 6, // need to be verified!!!
|
||||
Potn = 7,
|
||||
Form = 8,
|
||||
Comb = 9,
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
NXGRPZ = 38, // Number of data elements per group in XGRP array
|
||||
NZGRPZ = 39, // Number of data elements per group in ZGRP array
|
||||
|
||||
NAQUIF = 40, // Number of *active* analytic aquifers (i.e., number of unique aquifer IDs) in model
|
||||
NCAMAX = 41, // Maximum number of analytic aquifer connections
|
||||
|
||||
NIAAQZ = 42, // Number of data elements per aquifer in IAAQ array
|
||||
@@ -123,6 +124,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
MAXNOLINES = 157, // Maximum number of lines of schedule data for ACTION keyword - including ENDACTIO
|
||||
MAXNOSTRPRLINE = 158, // Maximum number of 8-chars strings pr input line of Action data (rounded up from input)
|
||||
|
||||
MAX_ACT_ANLYTIC_AQUCONN = 162, // Maximum number of *active* connections across all analytic aquifers
|
||||
NWMAXZ = 163, // Maximum number of wells in the model
|
||||
|
||||
NSEGWL = 174, // Number of multisegment wells defined with WELSEG
|
||||
@@ -139,13 +141,22 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
WSEGITR_IT2 = 208, // NR - maximum no of times that a new iteration cycle with a reduced Wp will be started
|
||||
|
||||
NIIAQN = 223, // Number of data elements in IAQN array pr AQUNUM record
|
||||
NIRAQN = 224, // Number of data elements in RAQN array pr AQUNUM record
|
||||
|
||||
NUM_AQUNUM_RECORDS = 226, // Number of AQUNUM records (lines of AQUNUM data)
|
||||
|
||||
MAX_ACT_COND = 245, // Maximum number of conditions pr action
|
||||
MAX_AN_AQUIFERS = 252, // Maximum number of analytic aquifers
|
||||
MAX_AN_AQUIFER_ID = 252, // Maximum aquifer ID of all analytic aquifers (<= AQUDIMS(5))
|
||||
|
||||
NO_FIELD_UDQS = 262, // No of Field UDQ data (parameters) /
|
||||
NO_GROUP_UDQS = 263, // No of Group UDQ data (parameters) /
|
||||
NO_WELL_UDQS = 266, // No of Well UDQ data (parameters) /
|
||||
UDQPAR_1 = 267, // Integer seed value for the RAND /
|
||||
|
||||
AQU_UNKNOWN_1 = 269, // Not characterised. Equal to NAQUIF in all cases seen so far.
|
||||
MAX_ANALYTIC_AQUIFERS = 286, // Declared maximum number of analytic aquifers in model. AQUDIMS(5).
|
||||
|
||||
NO_IUADS = 290, // No IUADs
|
||||
NO_IUAPS = 291, // No IUAPs
|
||||
RSEED = 296,
|
||||
@@ -155,6 +166,14 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
ISECND = 410 // ISECND = current simulation time HH:MM:SS - number of seconds (SS), reported in microseconds
|
||||
// (0-59,999,999)
|
||||
};
|
||||
|
||||
namespace InteheadValues {
|
||||
enum LiftOpt : int {
|
||||
NotActive = 0, // Gas lift not enabled (LIFTOPT not present)
|
||||
FirstIterationOnly = 1, // Optimise gas lift in first Newton iteration only (LIFTOPT(4) = NO)
|
||||
EachNupCol = 2, // Optimise gas lift in each of first NUPCOL Newton iterations (LIFTOPT(4) = YES)
|
||||
};
|
||||
} // InteheadValues
|
||||
}}}} // Opm::RestartIO::Helpers::VectorItems
|
||||
|
||||
#endif // OPM_OUTPUT_ECLIPSE_VECTOR_INTEHEAD_HPP
|
||||
|
||||
@@ -45,6 +45,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
XFlow = 22,
|
||||
item25 = 24, // Unknown
|
||||
item32 = 31, // Unknown
|
||||
WTestCloseReason = 39,
|
||||
WTestConfigReason = 42,
|
||||
WTestRemaining = 45,
|
||||
item48 = 47, // Unknown
|
||||
|
||||
HistReqWCtrl = 49, // Well's requested control mode from
|
||||
@@ -141,6 +144,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
Open = 1,
|
||||
Auto = 3,
|
||||
};
|
||||
|
||||
} // Value
|
||||
} // IWell
|
||||
|
||||
@@ -162,8 +166,10 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
DrainageRadius = 17, // Well's drainage radius - item 7 from WELSPECS
|
||||
EfficiencyFactor1 = 24, // Item2 from WEFAC; this value is repeated at two locations.
|
||||
EfficiencyFactor2 = 31, // Item2 from WEFAC
|
||||
WTestInterval = 32,
|
||||
HistLiqRateTarget = 33, // Well's historical/observed liquid
|
||||
// rate target/limit
|
||||
WTestStartupTime = 39,
|
||||
|
||||
HistGasRateTarget = 54, // Well's historical/observed gas rate
|
||||
// target/limit
|
||||
|
||||
@@ -79,6 +79,11 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
throw std::invalid_argument("Window array with windowsize==0 is not permitted");
|
||||
}
|
||||
|
||||
WindowedArray(const WindowedArray& rhs) = default;
|
||||
WindowedArray(WindowedArray&& rhs) = default;
|
||||
WindowedArray& operator=(const WindowedArray& rhs) = delete;
|
||||
WindowedArray& operator=(WindowedArray&& rhs) = default;
|
||||
|
||||
/// Retrieve number of windows allocated for this array.
|
||||
Idx numWindows() const
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Opm {
|
||||
|
||||
namespace Opm { namespace data {
|
||||
|
||||
class WellRates;
|
||||
class Wells;
|
||||
|
||||
}} // namespace Opm::data
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Opm { namespace RftIO {
|
||||
const ::Opm::UnitSystem& usys,
|
||||
const ::Opm::EclipseGrid& grid,
|
||||
const ::Opm::Schedule& schedule,
|
||||
const ::Opm::data::WellRates& wellSol,
|
||||
const ::Opm::data::Wells& wellSol,
|
||||
::Opm::EclIO::OutputStream::RFT& rftFile);
|
||||
|
||||
}} // namespace Opm::RftIO
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace Opm {
|
||||
class Well;
|
||||
class UnitSystem;
|
||||
class UDQActive;
|
||||
class Actdims;
|
||||
|
||||
} // Opm
|
||||
|
||||
@@ -62,9 +63,26 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
const std::size_t lookup_step,
|
||||
const std::vector<int>& inteHead);
|
||||
|
||||
std::size_t
|
||||
entriesPerSACT();
|
||||
|
||||
std::size_t
|
||||
entriesPerIACT();
|
||||
|
||||
std::size_t
|
||||
entriesPerZACT();
|
||||
|
||||
std::size_t
|
||||
entriesPerZACN(const Opm::Actdims& actdims);
|
||||
|
||||
std::size_t
|
||||
entriesPerIACN(const Opm::Actdims& actdims);
|
||||
|
||||
std::size_t
|
||||
entriesPerSACN(const Opm::Actdims& actdims);
|
||||
|
||||
std::vector<int>
|
||||
createActionxDims( const Runspec& rspec,
|
||||
const Schedule& sched,
|
||||
createActionRSTDims(const Schedule& sched,
|
||||
const std::size_t simStep);
|
||||
|
||||
}}} // Opm::RestartIO::Helpers
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <optional>
|
||||
#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>
|
||||
|
||||
@@ -68,6 +70,8 @@ namespace Opm {
|
||||
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 {
|
||||
@@ -122,11 +126,13 @@ namespace Opm {
|
||||
using DeckView::size;
|
||||
using DeckView::begin;
|
||||
using DeckView::end;
|
||||
using DeckView::operator[];
|
||||
|
||||
using iterator = std::vector< DeckKeyword >::iterator;
|
||||
|
||||
Deck();
|
||||
Deck( const Deck& );
|
||||
Deck( Deck&& );
|
||||
|
||||
static Deck serializeObject();
|
||||
|
||||
@@ -145,10 +151,14 @@ namespace Opm {
|
||||
void selectActiveUnitSystem( UnitSystem::UnitType unit_type );
|
||||
|
||||
const std::string& getInputPath() const;
|
||||
const std::string& getDataFile() const;
|
||||
std::string getDataFile() const;
|
||||
void setDataFile(const std::string& dataFile);
|
||||
std::string makeDeckPath(const std::string& path) const;
|
||||
DeckTree& tree();
|
||||
DeckTree tree() const;
|
||||
|
||||
std::size_t size() const;
|
||||
bool empty() const;
|
||||
iterator begin();
|
||||
iterator end();
|
||||
void write( DeckOutput& output ) const ;
|
||||
@@ -174,8 +184,9 @@ namespace Opm {
|
||||
UnitSystem defaultUnits;
|
||||
std::unique_ptr<UnitSystem> activeUnits;
|
||||
|
||||
std::string m_dataFile;
|
||||
std::optional<std::string> m_dataFile;
|
||||
std::string input_path;
|
||||
DeckTree file_tree;
|
||||
mutable std::size_t unit_system_access_count = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -77,6 +77,10 @@ namespace Opm {
|
||||
const std::vector< double >& getSIDoubleData() const;
|
||||
const std::vector<value::status>& getValueStatus() const;
|
||||
|
||||
template< typename T>
|
||||
void shrink_to_fit();
|
||||
|
||||
|
||||
void push_back( UDAValue );
|
||||
void push_back( int );
|
||||
void push_back( double );
|
||||
@@ -86,15 +90,15 @@ namespace Opm {
|
||||
void push_back( int, size_t );
|
||||
void push_back( double, size_t );
|
||||
void push_back( std::string, size_t );
|
||||
void push_backDefault( UDAValue );
|
||||
void push_backDefault( int );
|
||||
void push_backDefault( double );
|
||||
void push_backDefault( std::string );
|
||||
void push_backDefault( RawString );
|
||||
void push_backDefault( UDAValue, std::size_t n = 1 );
|
||||
void push_backDefault( int, std::size_t n = 1 );
|
||||
void push_backDefault( double, std::size_t n = 1 );
|
||||
void push_backDefault( std::string, std::size_t n = 1 );
|
||||
void push_backDefault( RawString, std::size_t n = 1 );
|
||||
// trying to access the data of a "dummy default item" will raise an exception
|
||||
|
||||
template <typename T>
|
||||
void push_backDummyDefault();
|
||||
void push_backDummyDefault( std::size_t n = 1 );
|
||||
|
||||
type_tag getType() const;
|
||||
|
||||
@@ -145,6 +149,7 @@ namespace Opm {
|
||||
serializer.vector(default_dimensions);
|
||||
}
|
||||
|
||||
void reserve_additionalRawString(std::size_t);
|
||||
private:
|
||||
mutable std::vector< double > dval;
|
||||
std::vector< int > ival;
|
||||
@@ -169,7 +174,7 @@ namespace Opm {
|
||||
template< typename T > const std::vector< T >& value_ref() const;
|
||||
template< typename T > void push( T );
|
||||
template< typename T > void push( T, size_t );
|
||||
template< typename T > void push_default( T );
|
||||
template< typename T > void push_default( T, std::size_t n );
|
||||
template< typename T > void write_vector(DeckOutput& writer, const std::vector<T>& data) const;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,18 +22,16 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckValue.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/Deck/value_status.hpp>
|
||||
#include <opm/common/OpmLog/KeywordLocation.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class DeckOutput;
|
||||
class DeckValue;
|
||||
class ParserKeyword;
|
||||
class UnitSystem;
|
||||
|
||||
class DeckKeyword {
|
||||
public:
|
||||
@@ -56,10 +54,13 @@ namespace Opm {
|
||||
|
||||
|
||||
size_t size() const;
|
||||
bool empty() const;
|
||||
void addRecord(DeckRecord&& record);
|
||||
const DeckRecord& getRecord(size_t index) const;
|
||||
DeckRecord& getRecord(size_t index);
|
||||
const DeckRecord& getDataRecord() const;
|
||||
const DeckRecord& operator[](std::size_t index) const;
|
||||
DeckRecord& operator[](std::size_t index);
|
||||
void setDataKeyword(bool isDataKeyword = true);
|
||||
void setDoubleRecordKeyword(bool isDoubleRecordKeyword = true);
|
||||
bool isDataKeyword() const;
|
||||
|
||||
@@ -28,6 +28,13 @@ namespace Opm {
|
||||
|
||||
class DeckOutput {
|
||||
public:
|
||||
struct format {
|
||||
std::string item_sep = " "; // Separator between items on a row.
|
||||
size_t columns = 7; // The maximum number of columns on a record.
|
||||
std::string record_indent = " "; // The indentation when starting a new line.
|
||||
std::string keyword_sep = ""; // The separation between keywords;
|
||||
};
|
||||
|
||||
explicit DeckOutput(std::ostream& s, int precision = 10);
|
||||
~DeckOutput();
|
||||
void stash_default( );
|
||||
@@ -35,17 +42,13 @@ namespace Opm {
|
||||
void start_record( );
|
||||
void end_record( );
|
||||
|
||||
void start_keyword(const std::string& kw);
|
||||
void start_keyword(const std::string& kw, bool split_line);
|
||||
void end_keyword(bool add_slash);
|
||||
|
||||
void endl();
|
||||
void write_string(const std::string& s);
|
||||
template <typename T> void write(const T& value);
|
||||
|
||||
std::string item_sep = " "; // Separator between items on a row.
|
||||
size_t columns = 16; // The maximum number of columns on a record.
|
||||
std::string record_indent = " "; // The indentation when starting a new line.
|
||||
std::string keyword_sep = "\n\n"; // The separation between keywords;
|
||||
format fmt;
|
||||
private:
|
||||
std::ostream& os;
|
||||
size_t default_count;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Opm {
|
||||
typedef std::vector< DeckItem >::const_iterator const_iterator;
|
||||
|
||||
DeckRecord() = default;
|
||||
DeckRecord( std::vector< DeckItem >&& );
|
||||
DeckRecord( std::vector< DeckItem >&& items, const bool check_for_duplicate_names = true );
|
||||
|
||||
static DeckRecord serializeObject();
|
||||
|
||||
|
||||
71
opm/parser/eclipse/Deck/DeckTree.hpp
Normal file
71
opm/parser/eclipse/Deck/DeckTree.hpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
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 DECK_TREE_HPP
|
||||
#define DECK_TREE_HPP
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
|
||||
/*
|
||||
The purpose of the DeckTree class is to maintain a minimal relationship
|
||||
between the include files in the deck; the sole purpose of this class is to
|
||||
support writing of decks with the keywords in the correct files.
|
||||
*/
|
||||
|
||||
class DeckTree {
|
||||
public:
|
||||
DeckTree() = default;
|
||||
DeckTree(const std::string&);
|
||||
|
||||
const std::string& parent(const std::string& fname) const;
|
||||
bool includes(const std::string& parent_file, const std::string& include_file) const;
|
||||
void add_include(std::string parent_file, std::string include_file);
|
||||
void add_root(const std::string& fname);
|
||||
bool has_include(const std::string& fname) const;
|
||||
const std::string& root() const;
|
||||
|
||||
private:
|
||||
class TreeNode {
|
||||
public:
|
||||
explicit TreeNode(const std::string& fn);
|
||||
TreeNode(const std::string& pn, const std::string& fn);
|
||||
void add_include(const std::string& include_file);
|
||||
bool includes(const std::string& include_file) const;
|
||||
|
||||
std::string fname;
|
||||
std::optional<std::string> parent;
|
||||
std::unordered_set<std::string> include_files;
|
||||
};
|
||||
|
||||
std::string add_node(const std::string& fname);
|
||||
|
||||
std::optional<std::string> root_file;
|
||||
std::unordered_map<std::string, TreeNode> nodes;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif /* DECKRECORD_HPP */
|
||||
|
||||
161
opm/parser/eclipse/Deck/FileDeck.hpp
Normal file
161
opm/parser/eclipse/Deck/FileDeck.hpp
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
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 FILE_DECK_HPP
|
||||
#define FILE_DECK_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#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>
|
||||
|
||||
namespace fs = Opm::filesystem;
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
|
||||
class FileDeck {
|
||||
public:
|
||||
static const std::unordered_set<std::string> rst_keep_in_solution;
|
||||
|
||||
|
||||
enum class OutputMode {
|
||||
INLINE = 1,
|
||||
SHARE = 2,
|
||||
COPY = 3
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct Index {
|
||||
std::size_t file_index;
|
||||
std::size_t keyword_index;
|
||||
|
||||
Index(std::size_t file_index_arg, std::size_t keyword_index_arg, const FileDeck* deck_arg)
|
||||
: file_index(file_index_arg)
|
||||
, keyword_index(keyword_index_arg)
|
||||
, deck(deck_arg)
|
||||
{}
|
||||
|
||||
Index& operator--();
|
||||
Index operator--(int);
|
||||
Index& operator++();
|
||||
Index operator++(int);
|
||||
bool operator==(const Index& other) const;
|
||||
bool operator!=(const Index& other) const;
|
||||
bool operator<(const Index& other) const;
|
||||
|
||||
|
||||
private:
|
||||
const FileDeck * deck;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Block {
|
||||
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;
|
||||
bool empty() const;
|
||||
void erase(const FileDeck::Index& index);
|
||||
void insert(std::size_t keyword_index, const DeckKeyword& keyword);
|
||||
void dump(DeckOutput& out) const;
|
||||
|
||||
private:
|
||||
std::string fname;
|
||||
std::vector<DeckKeyword> keywords;
|
||||
|
||||
friend FileDeck;
|
||||
};
|
||||
|
||||
|
||||
explicit FileDeck(const Deck& deck);
|
||||
std::optional<Index> find(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);
|
||||
|
||||
void dump_stdout(const std::string& output_dir, OutputMode mode) const;
|
||||
void dump(const std::string& dir, const std::string& fname, OutputMode mode) const;
|
||||
const DeckKeyword& operator[](const Index& index) const;
|
||||
const Index start() const;
|
||||
const Index stop() const;
|
||||
|
||||
void rst_solution(const std::string& rst_base, int report_step);
|
||||
void insert_skiprest();
|
||||
|
||||
private:
|
||||
std::vector<Block> blocks;
|
||||
std::string input_directory;
|
||||
std::unordered_set<std::string> modified_files;
|
||||
DeckTree deck_tree;
|
||||
|
||||
struct DumpContext {
|
||||
std::unordered_map<std::string, std::ofstream> stream_map;
|
||||
std::unordered_map<std::string, std::string> file_map;
|
||||
|
||||
bool has_file(const std::string& fname) const {
|
||||
return this->file_map.count(fname) > 0;
|
||||
}
|
||||
|
||||
std::optional<std::ofstream *> get_stream(const std::string& deck_name) {
|
||||
auto name_iter = this->file_map.find(deck_name);
|
||||
if (name_iter == this->file_map.end())
|
||||
return {};
|
||||
|
||||
return &this->stream_map.at(name_iter->second);
|
||||
}
|
||||
|
||||
|
||||
std::ofstream& open_file(const std::string& deck_name, const fs::path& output_file)
|
||||
{
|
||||
if (this->stream_map.count(output_file.string()) == 0) {
|
||||
this->file_map.insert(std::make_pair( deck_name, output_file.string() ));
|
||||
|
||||
if (!fs::is_directory(output_file.parent_path()))
|
||||
fs::create_directories(output_file.parent_path());
|
||||
|
||||
std::ofstream stream{output_file};
|
||||
if (!stream)
|
||||
throw std::logic_error(fmt::format("Opening {} for writing failed", output_file.string()));
|
||||
this->stream_map.insert(std::make_pair(output_file.string(), std::move(stream)));
|
||||
}
|
||||
return this->stream_map.at(output_file.string());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void dump(std::ostream& os) const;
|
||||
void dump_shared(std::ostream& stream, const std::string& output_dir) const;
|
||||
void dump_inline() const;
|
||||
std::string dump_block(const Block& block, const std::string& dir, const std::optional<std::string>& fname, DumpContext& context) const;
|
||||
void include_block(const std::string& source_file, const std::string& target_file, const std::string& dir, DumpContext& context) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,8 +17,11 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef IMPORT_CONTAINER_HPP
|
||||
#define IMPORT_CONTAINER_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
@@ -27,6 +30,7 @@
|
||||
namespace Opm {
|
||||
|
||||
class Parser;
|
||||
class UnitSystem;
|
||||
|
||||
class ImportContainer {
|
||||
public:
|
||||
@@ -40,3 +44,5 @@ private:
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // IMPORT_CONTAINER_HPP
|
||||
|
||||
@@ -37,6 +37,10 @@ namespace Opm {
|
||||
class Deck;
|
||||
}
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
class RstAquifer;
|
||||
}} // Opm::RestartIO
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Aquancon {
|
||||
@@ -82,10 +86,12 @@ namespace Opm {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Aquancon() = default;
|
||||
Aquancon(const EclipseGrid& grid, const Deck& deck);
|
||||
Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
explicit Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
|
||||
void pruneDeactivatedAquiferConnections(const std::vector<std::size_t>& deactivated_cells);
|
||||
void loadFromRestart(const RestartIO::RstAquifer& rst_aquifers);
|
||||
|
||||
static Aquancon serializeObject();
|
||||
|
||||
|
||||
@@ -25,88 +25,110 @@
|
||||
This includes the logic for parsing as well as the associated tables. It is meant to be used by opm-grid and opm-simulators in order to
|
||||
implement the Carter Tracy analytical aquifer model in OPM Flow.
|
||||
*/
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/A.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/AqutabTable.hpp>
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class DeckRecord;
|
||||
class TableManager;
|
||||
}
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
class RstAquifer;
|
||||
}} // Opm::RestartIO
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class AquiferCT {
|
||||
public:
|
||||
|
||||
struct AQUCT_data{
|
||||
struct AQUCT_data
|
||||
{
|
||||
friend class AquiferCT;
|
||||
|
||||
AQUCT_data(const DeckRecord& record, const TableManager& tables);
|
||||
AQUCT_data() = default;
|
||||
AQUCT_data(int aqID,
|
||||
int infID,
|
||||
int pvtID,
|
||||
double phi_aq_,
|
||||
double d0_,
|
||||
double C_t_,
|
||||
double r_o_,
|
||||
double k_a_,
|
||||
double c1_,
|
||||
double h_,
|
||||
double theta_,
|
||||
double c2_,
|
||||
const std::pair<bool, double>& p0_,
|
||||
const std::vector<double>& td_,
|
||||
const std::vector<double>& pi_);
|
||||
AQUCT_data(const DeckRecord& record, const TableManager& tables);
|
||||
AQUCT_data(const int aqID,
|
||||
const int infID,
|
||||
const int pvtID,
|
||||
const double phi_aq_,
|
||||
const double d0_,
|
||||
const double C_t_,
|
||||
const double r_o_,
|
||||
const double k_a_,
|
||||
const double h_,
|
||||
const double theta_,
|
||||
const double p0_,
|
||||
const double T0_);
|
||||
|
||||
int aquiferID;
|
||||
int inftableID, pvttableID;
|
||||
int aquiferID{};
|
||||
int inftableID{};
|
||||
int pvttableID{};
|
||||
|
||||
double phi_aq , // aquifer porosity
|
||||
d0, // aquifer datum depth
|
||||
C_t , // total compressibility
|
||||
r_o , // aquifer inner radius
|
||||
k_a , // aquifer permeability
|
||||
c1, // 0.008527 (METRIC, PVT-M); 0.006328 (FIELD); 3.6 (LAB)
|
||||
h , // aquifer thickness
|
||||
theta , // angle subtended by the aquifer boundary
|
||||
c2 ; // 6.283 (METRIC, PVT-M); 1.1191 (FIELD); 6.283 (LAB).
|
||||
double porosity{};
|
||||
double datum_depth{};
|
||||
double total_compr{};
|
||||
double inner_radius{};
|
||||
double permeability{};
|
||||
double thickness{};
|
||||
double angle_fraction{};
|
||||
|
||||
std::pair<bool, double> p0; //Initial aquifer pressure at datum depth, d0
|
||||
std::vector<double> td, pi;
|
||||
std::optional<double> initial_pressure{};
|
||||
std::optional<double> initial_temperature{};
|
||||
std::vector<double> dimensionless_time{};
|
||||
std::vector<double> dimensionless_pressure{};
|
||||
|
||||
static AQUCT_data serializeObject();
|
||||
|
||||
double timeConstant() const { return this->time_constant_; }
|
||||
double influxConstant() const { return this->influx_constant_; }
|
||||
double waterDensity() const { return this->water_density_; }
|
||||
double waterViscosity() const { return this->water_viscosity_; }
|
||||
|
||||
bool operator==(const AQUCT_data& other) const;
|
||||
|
||||
void finishInitialisation(const TableManager& tables);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(aquiferID);
|
||||
serializer(inftableID);
|
||||
serializer(pvttableID);
|
||||
serializer(phi_aq);
|
||||
serializer(d0);
|
||||
serializer(C_t);
|
||||
serializer(r_o);
|
||||
serializer(k_a);
|
||||
serializer(c1);
|
||||
serializer(h);
|
||||
serializer(theta);
|
||||
serializer(c2);
|
||||
serializer(p0);
|
||||
serializer(td);
|
||||
serializer(pi);
|
||||
serializer(this->aquiferID);
|
||||
serializer(this->inftableID);
|
||||
serializer(this->pvttableID);
|
||||
serializer(this->porosity);
|
||||
serializer(this->datum_depth);
|
||||
serializer(this->total_compr);
|
||||
serializer(this->inner_radius);
|
||||
serializer(this->permeability);
|
||||
serializer(this->thickness);
|
||||
serializer(this->angle_fraction);
|
||||
serializer(this->initial_pressure);
|
||||
serializer(this->initial_temperature);
|
||||
serializer(this->dimensionless_time);
|
||||
serializer(this->dimensionless_pressure);
|
||||
serializer(this->time_constant_);
|
||||
serializer(this->influx_constant_);
|
||||
serializer(this->water_density_);
|
||||
serializer(this->water_viscosity_);
|
||||
}
|
||||
|
||||
private:
|
||||
double time_constant_{};
|
||||
double influx_constant_{};
|
||||
double water_density_{};
|
||||
double water_viscosity_{};
|
||||
};
|
||||
|
||||
AquiferCT() = default;
|
||||
AquiferCT(const TableManager& tables, const Deck& deck);
|
||||
AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
|
||||
|
||||
void loadFromRestart(const RestartIO::RstAquifer& rst,
|
||||
const TableManager& tables);
|
||||
|
||||
static AquiferCT serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
|
||||
@@ -25,12 +25,21 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/AquiferCT.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.hpp>
|
||||
|
||||
namespace Opm {
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
class TableManager;
|
||||
class EclipseGrid;
|
||||
class Deck;
|
||||
class FieldPropsManager;
|
||||
namespace Opm {
|
||||
class TableManager;
|
||||
class EclipseGrid;
|
||||
class Deck;
|
||||
class FieldPropsManager;
|
||||
} // namespace Opm
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
class RstAquifer;
|
||||
}} // namespace Opm::RestartIO
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class AquiferConfig {
|
||||
public:
|
||||
@@ -40,6 +49,9 @@ public:
|
||||
AquiferConfig(const Aquifetp& fetp, const AquiferCT& ct, const Aquancon& conn);
|
||||
void load_connections(const Deck& deck, const EclipseGrid& grid);
|
||||
|
||||
void pruneDeactivatedAquiferConnections(const std::vector<std::size_t>& deactivated_cells);
|
||||
void loadFromRestart(const RestartIO::RstAquifer& aquifers,
|
||||
const TableManager& tables);
|
||||
|
||||
static AquiferConfig serializeObject();
|
||||
|
||||
@@ -53,6 +65,7 @@ public:
|
||||
bool hasNumericalAquifer() const;
|
||||
bool hasAnalyticalAquifer() const;
|
||||
const NumericalAquifers& numericalAquifers() const;
|
||||
NumericalAquifers& mutableNumericalAquifers() const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
@@ -64,12 +77,14 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
Aquifetp aquifetp;
|
||||
AquiferCT aquiferct;
|
||||
NumericalAquifers numerical_aquifers;
|
||||
Aquancon aqconn;
|
||||
Aquifetp aquifetp{};
|
||||
AquiferCT aquiferct{};
|
||||
mutable NumericalAquifers numerical_aquifers{};
|
||||
Aquancon aqconn{};
|
||||
};
|
||||
|
||||
std::vector<int> analyticAquiferIDs(const AquiferConfig& cfg);
|
||||
std::vector<int> numericAquiferIDs(const AquiferConfig& cfg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,47 +25,87 @@
|
||||
This includes the logic for parsing as well as the associated tables. It is meant to be used by opm-grid and opm-simulators in order to
|
||||
implement the Fetkovich analytical aquifer model in OPM Flow.
|
||||
*/
|
||||
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace Opm {
|
||||
class Deck;
|
||||
class DeckRecord;
|
||||
class TableManager;
|
||||
}
|
||||
|
||||
namespace Opm { namespace RestartIO {
|
||||
class RstAquifer;
|
||||
}} // Opm::RestartIO
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class DeckRecord;
|
||||
|
||||
class Aquifetp {
|
||||
public:
|
||||
|
||||
struct AQUFETP_data{
|
||||
AQUFETP_data(const DeckRecord& record);
|
||||
struct AQUFETP_data
|
||||
{
|
||||
friend class Aquifetp;
|
||||
|
||||
AQUFETP_data() = default;
|
||||
AQUFETP_data(int aquiferID_, int pvttableID_, double J_, double C_t_, double V0_, double d0_, const std::pair<bool, double>& p0_);
|
||||
AQUFETP_data(const DeckRecord& record, const TableManager& tables);
|
||||
AQUFETP_data(const int aquiferID_,
|
||||
const int pvttableID_,
|
||||
const double J_,
|
||||
const double C_t_,
|
||||
const double V0_,
|
||||
const double d0_,
|
||||
const double p0_);
|
||||
|
||||
int aquiferID{};
|
||||
int pvttableID{};
|
||||
|
||||
double prod_index{};
|
||||
double total_compr{};
|
||||
double initial_watvolume{};
|
||||
double datum_depth{};
|
||||
|
||||
std::optional<double> initial_pressure{};
|
||||
|
||||
static AQUFETP_data serializeObject();
|
||||
|
||||
double timeConstant() const { return this->time_constant_; }
|
||||
double waterDensity() const { return this->water_density_; }
|
||||
double waterViscosity() const { return this->water_viscosity_; }
|
||||
|
||||
bool operator==(const AQUFETP_data& other) const;
|
||||
|
||||
int aquiferID;
|
||||
int pvttableID;
|
||||
double J, // Specified Productivity Index
|
||||
C_t, // total rock compressibility
|
||||
V0, // initial volume of water in aquifer
|
||||
d0; // aquifer datum depth
|
||||
std::pair<bool, double> p0;
|
||||
void finishInitialisation(const TableManager& tables);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(aquiferID);
|
||||
serializer(pvttableID);
|
||||
serializer(J);
|
||||
serializer(C_t);
|
||||
serializer(V0);
|
||||
serializer(d0);
|
||||
serializer(p0);
|
||||
serializer(this->aquiferID);
|
||||
serializer(this->pvttableID);
|
||||
serializer(this->prod_index);
|
||||
serializer(this->total_compr);
|
||||
serializer(this->initial_watvolume);
|
||||
serializer(this->datum_depth);
|
||||
serializer(this->initial_pressure);
|
||||
serializer(this->time_constant_);
|
||||
serializer(this->water_density_);
|
||||
serializer(this->water_viscosity_);
|
||||
}
|
||||
|
||||
private:
|
||||
double time_constant_{};
|
||||
double water_density_{};
|
||||
double water_viscosity_{};
|
||||
};
|
||||
|
||||
Aquifetp() = default;
|
||||
Aquifetp(const Deck& deck);
|
||||
Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
Aquifetp(const TableManager& tables, const Deck& deck);
|
||||
explicit Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
|
||||
void loadFromRestart(const RestartIO::RstAquifer& rst,
|
||||
const TableManager& tables);
|
||||
|
||||
static Aquifetp serializeObject();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef OPM_NUMERICALAQUIFERCELL_HPP
|
||||
#define OPM_NUMERICALAQUIFERCELL_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
|
||||
namespace Opm {
|
||||
@@ -28,19 +29,20 @@ namespace Opm {
|
||||
class FieldPropsManager;
|
||||
|
||||
struct NumericalAquiferCell {
|
||||
NumericalAquiferCell(const DeckRecord&, const EclipseGrid&, const FieldPropsManager&);
|
||||
NumericalAquiferCell(const std::size_t record_id_, const DeckRecord&, const EclipseGrid&, const FieldPropsManager&);
|
||||
NumericalAquiferCell() = default;
|
||||
size_t aquifer_id;
|
||||
size_t I, J, K;
|
||||
double area;
|
||||
double length;
|
||||
double porosity;
|
||||
double permeability;
|
||||
double depth;
|
||||
std::optional<double> init_pressure;
|
||||
int pvttable;
|
||||
int sattable;
|
||||
size_t global_index;
|
||||
std::size_t aquifer_id{};
|
||||
std::size_t I{}, J{}, K{};
|
||||
double area{};
|
||||
double length{};
|
||||
double porosity{};
|
||||
double permeability{};
|
||||
double depth{};
|
||||
std::optional<double> init_pressure{};
|
||||
int pvttable{};
|
||||
int sattable{};
|
||||
std::size_t global_index{};
|
||||
std::size_t record_id{};
|
||||
|
||||
double cellVolume() const;
|
||||
double poreVolume() const;
|
||||
@@ -62,6 +64,7 @@ namespace Opm {
|
||||
serializer(this->pvttable);
|
||||
serializer(this->sattable);
|
||||
serializer(this->global_index);
|
||||
serializer(this->record_id);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -65,9 +65,11 @@ namespace Opm {
|
||||
serializer(this->ve_frac_cappress);
|
||||
}
|
||||
|
||||
static std::map<size_t, std::map<size_t, NumericalAquiferConnection>> generateConnections(const Deck& deck, const EclipseGrid& grid);
|
||||
static std::map<size_t, std::map<size_t, NumericalAquiferConnection>>
|
||||
generateConnections(const Deck& deck, const EclipseGrid& grid);
|
||||
private:
|
||||
static std::vector<NumericalAquiferConnection> connectionsFromSingleRecord(const EclipseGrid& grid, const DeckRecord& record);
|
||||
static std::vector<NumericalAquiferConnection>
|
||||
connectionsFromSingleRecord(const EclipseGrid& grid, const DeckRecord& record);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
#ifndef OPM_NUMERICALAQUIFERS_HPP
|
||||
#define OPM_NUMERICALAQUIFERS_HPP
|
||||
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp>
|
||||
|
||||
@@ -36,6 +38,7 @@ namespace Opm {
|
||||
NumericalAquifers() = default;
|
||||
NumericalAquifers(const Deck& deck, const EclipseGrid& grid, const FieldPropsManager& field_props);
|
||||
|
||||
int numRecords() const { return static_cast<int>(this->m_num_records); }
|
||||
size_t size() const;
|
||||
bool hasAquifer(size_t aquifer_id) const;
|
||||
const SingleNumericalAquifer& getAquifer(size_t aquifer_id) const;
|
||||
@@ -46,22 +49,27 @@ namespace Opm {
|
||||
|
||||
std::unordered_map<size_t, double> aquiferCellVolumes() const;
|
||||
|
||||
std::vector<NNCdata> aquiferNNCs(const EclipseGrid& grid, const FieldPropsManager& fp) const;
|
||||
std::vector<NNCdata> aquiferCellNNCs() const;
|
||||
std::vector<NNCdata> aquiferConnectionNNCs(const EclipseGrid& grid, const FieldPropsManager& fp) const;
|
||||
|
||||
std::unordered_map<size_t, AquiferCellProps> aquiferCellProps() const;
|
||||
|
||||
void initConnections(const Deck& deck, const EclipseGrid& grid);
|
||||
void postProcessConnections(const EclipseGrid& grid, const std::vector<int>& actnum);
|
||||
|
||||
static NumericalAquifers serializeObject();
|
||||
template <class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.map(this->m_aquifers);
|
||||
serializer(this->m_num_records);
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<size_t, SingleNumericalAquifer> m_aquifers;
|
||||
std::map<size_t, SingleNumericalAquifer> m_aquifers{};
|
||||
size_t m_num_records{0};
|
||||
|
||||
void addAquiferCell(const NumericalAquiferCell& aqu_cell);
|
||||
void addAquiferConnections(const Deck &deck, const EclipseGrid &grid);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user