Compare commits
736 Commits
testing/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c72d2bf460 | ||
|
|
dfddff0562 | ||
|
|
1371b5706d | ||
|
|
b571dd9d66 | ||
|
|
ad746440e0 | ||
|
|
2bae3b2300 | ||
|
|
75a2a7e0ee | ||
|
|
917fc523ad | ||
|
|
28e492ecb9 | ||
|
|
ec1c315968 | ||
|
|
cf72ef0330 | ||
|
|
10a3bc4b56 | ||
|
|
8b4d8f1734 | ||
|
|
7cea357930 | ||
|
|
720fb8dcab | ||
|
|
8e56b44201 | ||
|
|
b14c5fc1a9 | ||
|
|
565d6b76dc | ||
|
|
ac840312e7 | ||
|
|
5e800ae2e7 | ||
|
|
2e0583cc74 | ||
|
|
8365eaed0b | ||
|
|
571582c881 | ||
|
|
6439ae1cea | ||
|
|
e796916057 | ||
|
|
63b663228a | ||
|
|
bf475b73b4 | ||
|
|
1e734020f1 | ||
|
|
60e9a9c6b9 | ||
|
|
48969b8b77 | ||
|
|
dd0041f8ee | ||
|
|
c4690fd3c0 | ||
|
|
d0828c4016 | ||
|
|
f0eaa8ea99 | ||
|
|
b082a4d02f | ||
|
|
22de4aaeee | ||
|
|
3db07ce4d3 | ||
|
|
f902ceb6d7 | ||
|
|
d37aa1116d | ||
|
|
0f5fddc470 | ||
|
|
ca508663b2 | ||
|
|
9a6d4d43a8 | ||
|
|
f32f971bc5 | ||
|
|
7f0700431a | ||
|
|
3c60cb3765 | ||
|
|
8debd0b044 | ||
|
|
0656b4bf17 | ||
|
|
23dccd9c54 | ||
|
|
c22a4ff980 | ||
|
|
6f23f05c03 | ||
|
|
3077f7aff8 | ||
|
|
89503cd4d9 | ||
|
|
635f3ccb4a | ||
|
|
78a6854214 | ||
|
|
082ab35a0e | ||
|
|
4da5a81233 | ||
|
|
54087e3bd8 | ||
|
|
0f22f897ed | ||
|
|
9194dd408e | ||
|
|
84ad5ef502 | ||
|
|
12b0537936 | ||
|
|
2d4175ed0f | ||
|
|
4b1609b20a | ||
|
|
f46a4c9a02 | ||
|
|
29e7ef4504 | ||
|
|
7a2394ae12 | ||
|
|
819b624809 | ||
|
|
dd30fb7bd8 | ||
|
|
fbfd95d2f2 | ||
|
|
a18539c63c | ||
|
|
53fddda62b | ||
|
|
78577e94cc | ||
|
|
e09b0a2de4 | ||
|
|
8e4d4827a2 | ||
|
|
34ca02c253 | ||
|
|
3dbb922cc7 | ||
|
|
315382bad8 | ||
|
|
ead07d2f3f | ||
|
|
685ab301d2 | ||
|
|
44c5a6c84c | ||
|
|
b899a1da64 | ||
|
|
637b1109aa | ||
|
|
d79b817a58 | ||
|
|
2b0fcc974c | ||
|
|
92e923b567 | ||
|
|
585e18d85f | ||
|
|
43e2fced7d | ||
|
|
8e3ba156a6 | ||
|
|
133ff18ee3 | ||
|
|
abaee17857 | ||
|
|
0cfc291039 | ||
|
|
0cdd6ba3d8 | ||
|
|
8816549f2f | ||
|
|
eb22f6cfd9 | ||
|
|
6707263385 | ||
|
|
636ce45596 | ||
|
|
742d8943ca | ||
|
|
593ee3174c | ||
|
|
4882e2d782 | ||
|
|
4d9be76910 | ||
|
|
3072f0dabe | ||
|
|
e417ca6688 | ||
|
|
12bbf19425 | ||
|
|
1c84c4c3f3 | ||
|
|
b8a66cb0fa | ||
|
|
f23257cbf5 | ||
|
|
784389d228 | ||
|
|
f494f6d5ce | ||
|
|
6c34c0304f | ||
|
|
f9b5946b25 | ||
|
|
2f2cbea424 | ||
|
|
33e3d36ef5 | ||
|
|
11f555c156 | ||
|
|
84eaef0372 | ||
|
|
e980713572 | ||
|
|
466e21e37e | ||
|
|
648a8d1413 | ||
|
|
0c91724927 | ||
|
|
750e7b8b24 | ||
|
|
8202c2007e | ||
|
|
161d337dd3 | ||
|
|
56745f57ac | ||
|
|
9a69c49ca9 | ||
|
|
f0d0fb1a83 | ||
|
|
3af0d4e623 | ||
|
|
e5583b738f | ||
|
|
acda777b9d | ||
|
|
efeafcc47c | ||
|
|
1efca16420 | ||
|
|
650ffb12b8 | ||
|
|
19693c7d3d | ||
|
|
afd0ed21ba | ||
|
|
cee75dcaac | ||
|
|
fb345f94af | ||
|
|
6296255ebc | ||
|
|
07d19b57d7 | ||
|
|
db8c9652e4 | ||
|
|
f260c05d9d | ||
|
|
2b81afc6fa | ||
|
|
1df8be064f | ||
|
|
b4f5848e3e | ||
|
|
eb89331403 | ||
|
|
ac35c7c936 | ||
|
|
075d018cf3 | ||
|
|
ab2e5cc310 | ||
|
|
b09814bc2e | ||
|
|
efb34b6533 | ||
|
|
8f81df09c4 | ||
|
|
1925fc3712 | ||
|
|
92efbb4713 | ||
|
|
b72f3b9d4b | ||
|
|
c9ae00707b | ||
|
|
2a9254e76d | ||
|
|
934def46d2 | ||
|
|
90940ed7b5 | ||
|
|
9764207bfd | ||
|
|
142061dbc0 | ||
|
|
4e0c0911f1 | ||
|
|
31fb7e6072 | ||
|
|
51866155c0 | ||
|
|
433a3a9e9b | ||
|
|
d78cc40bf1 | ||
|
|
907bdaf33e | ||
|
|
2ade5c67f3 | ||
|
|
f5b7d6cb98 | ||
|
|
c7e70da2c5 | ||
|
|
3b70c9edce | ||
|
|
5d61975622 | ||
|
|
33ad7a2620 | ||
|
|
2df7183f1b | ||
|
|
fd221bb949 | ||
|
|
e3c491ad38 | ||
|
|
c255116133 | ||
|
|
4919d850a9 | ||
|
|
33ecf4215d | ||
|
|
f8e793a21a | ||
|
|
dc0b91609e | ||
|
|
d918f052e2 | ||
|
|
dfb4b5ef3a | ||
|
|
d3817e2fc2 | ||
|
|
07e6be97e9 | ||
|
|
f115ed43f5 | ||
|
|
8483251aec | ||
|
|
7cd004bf71 | ||
|
|
e51edcf1c8 | ||
|
|
f3fbfc41ad | ||
|
|
9f7664fe13 | ||
|
|
03657799ce | ||
|
|
61fa2d899e | ||
|
|
21db859ece | ||
|
|
ea269c7cc7 | ||
|
|
f441d385f3 | ||
|
|
278402b63e | ||
|
|
fe6714c14d | ||
|
|
07e590a0ed | ||
|
|
efff382517 | ||
|
|
7c0ddd0b9d | ||
|
|
07843654b1 | ||
|
|
7aaf68fbc4 | ||
|
|
420446f318 | ||
|
|
3111505ed6 | ||
|
|
320f9b5510 | ||
|
|
a8ad5cd9f2 | ||
|
|
5ac2b3f531 | ||
|
|
6fb2989708 | ||
|
|
14bd2f7d48 | ||
|
|
5444eade2f | ||
|
|
cebef15dc4 | ||
|
|
cc60a65f14 | ||
|
|
fe1ef0a65f | ||
|
|
5c787ef97e | ||
|
|
43ef003452 | ||
|
|
bc28de3372 | ||
|
|
269537b101 | ||
|
|
7e26c6a5e9 | ||
|
|
fa8afbcc6d | ||
|
|
ebc92fb92e | ||
|
|
811d2e2a64 | ||
|
|
83d1627dbb | ||
|
|
0025144079 | ||
|
|
f320fe3d57 | ||
|
|
f59fec133d | ||
|
|
bbc87beed5 | ||
|
|
7bc5272290 | ||
|
|
d827fd6da5 | ||
|
|
ad5b410940 | ||
|
|
aa6128c4be | ||
|
|
22396d1b21 | ||
|
|
f613c15727 | ||
|
|
eb8f162663 | ||
|
|
97173e51a3 | ||
|
|
fba1858925 | ||
|
|
1113c25eb1 | ||
|
|
467f7879a6 | ||
|
|
50fb51d56e | ||
|
|
9d3ec9be61 | ||
|
|
687887939d | ||
|
|
562136772a | ||
|
|
7fc75ce61c | ||
|
|
413a45ec21 | ||
|
|
4c5b03b83e | ||
|
|
3e29350e94 | ||
|
|
54b714f361 | ||
|
|
3e2160af28 | ||
|
|
c41f375e00 | ||
|
|
6d8154823a | ||
|
|
c07a839f15 | ||
|
|
cce2bc0686 | ||
|
|
eca0589fe1 | ||
|
|
6ffb5883d4 | ||
|
|
cda315ce41 | ||
|
|
fce6eeca1b | ||
|
|
a8f0ebb183 | ||
|
|
4e08ff7f6d | ||
|
|
5a701a2ee8 | ||
|
|
52855cce1e | ||
|
|
06d317d119 | ||
|
|
c2bd04edcb | ||
|
|
39eb327551 | ||
|
|
9ad8465609 | ||
|
|
91841a99e1 | ||
|
|
c7d3603184 | ||
|
|
03efd5e589 | ||
|
|
9f0985850c | ||
|
|
9411af4dfc | ||
|
|
5c2a5898c0 | ||
|
|
8b2e503602 | ||
|
|
c68be43301 | ||
|
|
d40ebe647a | ||
|
|
179b6ba9ff | ||
|
|
9498217e0a | ||
|
|
00faf6099a | ||
|
|
fad5346ec1 | ||
|
|
611b21beab | ||
|
|
9ce64d5aae | ||
|
|
2d52268bf8 | ||
|
|
a0ebb2091f | ||
|
|
4c25ce69c1 | ||
|
|
4b687e3368 | ||
|
|
1ac240a425 | ||
|
|
d52180389b | ||
|
|
4a88b87958 | ||
|
|
0b0fab781b | ||
|
|
9d24f0dc34 | ||
|
|
6cf4b7efc7 | ||
|
|
1192830c60 | ||
|
|
41ae6b0bc4 | ||
|
|
0a8a25d5df | ||
|
|
2805f862db | ||
|
|
02a5501c0b | ||
|
|
a61c48521a | ||
|
|
f88d382172 | ||
|
|
0a9a0285dc | ||
|
|
e9e69ca44f | ||
|
|
e3bd1e6723 | ||
|
|
c33372b8b4 | ||
|
|
1a39c07981 | ||
|
|
d258ce5a57 | ||
|
|
b992ff0e1c | ||
|
|
f97dfda92e | ||
|
|
931fa96a59 | ||
|
|
c1caf4738e | ||
|
|
c3c6c93f65 | ||
|
|
d1527da245 | ||
|
|
8a420d30e6 | ||
|
|
3bc8f832d8 | ||
|
|
e7324ccd95 | ||
|
|
01d6ad95e0 | ||
|
|
f2e848bb5d | ||
|
|
2f8ad86afd | ||
|
|
45b501cb83 | ||
|
|
8d2cc14ad0 | ||
|
|
4e2dae298f | ||
|
|
81b70de140 | ||
|
|
d2af97b1b2 | ||
|
|
9632eae663 | ||
|
|
c7f6b22bdf | ||
|
|
d06a5a78e0 | ||
|
|
7852203d39 | ||
|
|
db72ff80ed | ||
|
|
6e5cd6c371 | ||
|
|
2c74b0961d | ||
|
|
ab71b43f10 | ||
|
|
fb4f026c97 | ||
|
|
f884c90745 | ||
|
|
06eeae89e6 | ||
|
|
eba0f3dcde | ||
|
|
89fe3c3d15 | ||
|
|
327fe79c90 | ||
|
|
62983db22f | ||
|
|
99375eb5be | ||
|
|
35afdd5131 | ||
|
|
21e9c1b952 | ||
|
|
a6a144a5be | ||
|
|
318ca70a0b | ||
|
|
fda69e9d57 | ||
|
|
0174a16386 | ||
|
|
6970158f7f | ||
|
|
701175c776 | ||
|
|
bb114b6a55 | ||
|
|
855b23aa1b | ||
|
|
e500fbbbca | ||
|
|
b12397c68e | ||
|
|
cb0f27c719 | ||
|
|
b940d81aed | ||
|
|
001877df2b | ||
|
|
84c57ff37b | ||
|
|
4bb453dd14 | ||
|
|
d9e1d397d6 | ||
|
|
c3de96b1f4 | ||
|
|
dbf17af4a7 | ||
|
|
861c098912 | ||
|
|
0265b7fb46 | ||
|
|
90a2eeb7fc | ||
|
|
e317b9663a | ||
|
|
e5e0a49e89 | ||
|
|
3af0bbf3cb | ||
|
|
402f28f749 | ||
|
|
c57af82c52 | ||
|
|
f0a25e4cf3 | ||
|
|
49bd6e9bd7 | ||
|
|
c97ff53a51 | ||
|
|
438e4b68bf | ||
|
|
f87369713b | ||
|
|
25e31a95ca | ||
|
|
7a6208a66a | ||
|
|
4b85366d7e | ||
|
|
059f2fba57 | ||
|
|
ae858182eb | ||
|
|
524b180102 | ||
|
|
63cbf052d6 | ||
|
|
66a4d1119d | ||
|
|
4d7d3b0e7c | ||
|
|
e4e853065c | ||
|
|
5304b0ce2b | ||
|
|
21e5d975e8 | ||
|
|
a87ec3ad46 | ||
|
|
12889a675d | ||
|
|
d25220ba4e | ||
|
|
6100e1f572 | ||
|
|
91bd6edd87 | ||
|
|
0a4bb79b4a | ||
|
|
0a45fd4da6 | ||
|
|
2a3b3e3e73 | ||
|
|
815526a4a8 | ||
|
|
7c298d0891 | ||
|
|
117682d211 | ||
|
|
a6f546a87a | ||
|
|
335eb8c5e1 | ||
|
|
dcbde5ea53 | ||
|
|
b045048e73 | ||
|
|
9fb608fd0d | ||
|
|
6079e1d261 | ||
|
|
39034dabe4 | ||
|
|
b9e745f3e5 | ||
|
|
689420f85a | ||
|
|
f271d75063 | ||
|
|
a6053d7817 | ||
|
|
9c1c9f9e29 | ||
|
|
4d0672d31a | ||
|
|
7e817e7d26 | ||
|
|
a4274c4b1a | ||
|
|
dc6f4291d8 | ||
|
|
ea45dcb01a | ||
|
|
461e24209d | ||
|
|
6519429291 | ||
|
|
91d62c63a1 | ||
|
|
f8cb4a80ff | ||
|
|
9cd1403b33 | ||
|
|
8ad0111ded | ||
|
|
e0a02e893a | ||
|
|
3ea3fb4f8f | ||
|
|
aa33b4c7c1 | ||
|
|
9e37416447 | ||
|
|
ae55a7f4d1 | ||
|
|
902fd38eb2 | ||
|
|
c88e586993 | ||
|
|
afa466771b | ||
|
|
5abfb155fb | ||
|
|
dc142f9f43 | ||
|
|
c1f5635210 | ||
|
|
40b230473c | ||
|
|
ac5d8817bc | ||
|
|
422509d201 | ||
|
|
f61da6684d | ||
|
|
21ba0ad213 | ||
|
|
bfc44df84f | ||
|
|
0f31e76ae7 | ||
|
|
977e1ce1d4 | ||
|
|
1573687264 | ||
|
|
9dc0761550 | ||
|
|
a7c9ca900c | ||
|
|
79263a74c4 | ||
|
|
f9aa3ee3d4 | ||
|
|
25a90bae6e | ||
|
|
27bfe63146 | ||
|
|
82ade7e7e1 | ||
|
|
78c15009e0 | ||
|
|
eb05ba503d | ||
|
|
2fd1170cd1 | ||
|
|
dadd5b59d6 | ||
|
|
64b21c2f96 | ||
|
|
4b7801ba84 | ||
|
|
48eee807f7 | ||
|
|
a89a669d20 | ||
|
|
26006cc317 | ||
|
|
abc73b341e | ||
|
|
86b003dfad | ||
|
|
1b1120646f | ||
|
|
9b7c057c22 | ||
|
|
9bb8350586 | ||
|
|
aa9810f1ca | ||
|
|
19df064ce3 | ||
|
|
276a65f232 | ||
|
|
d626e16623 | ||
|
|
ad32950271 | ||
|
|
0a5c8a883d | ||
|
|
d076a18b85 | ||
|
|
1a745ddaa0 | ||
|
|
b021e42f94 | ||
|
|
f615f9270b | ||
|
|
b0e0b71964 | ||
|
|
447b625362 | ||
|
|
acd73b76ea | ||
|
|
7699810f61 | ||
|
|
96d2cd59b3 | ||
|
|
a4d3ec33f1 | ||
|
|
1369a3509a | ||
|
|
51e3fac6b0 | ||
|
|
4a2ccf3170 | ||
|
|
3f4ff89b01 | ||
|
|
d27f537097 | ||
|
|
11be4ef2a4 | ||
|
|
7b446b4d89 | ||
|
|
08b7486597 | ||
|
|
641631d991 | ||
|
|
83f78c5918 | ||
|
|
6b18822c47 | ||
|
|
3575f88ee8 | ||
|
|
afd12dc1bd | ||
|
|
86ea1b8400 | ||
|
|
c5694f5d80 | ||
|
|
6bbf72bba8 | ||
|
|
a80c5ffad3 | ||
|
|
b0cd4e1c30 | ||
|
|
a9fbd6b5b7 | ||
|
|
17995453f4 | ||
|
|
dd4336e72c | ||
|
|
1f7d85d488 | ||
|
|
d7b6b282ca | ||
|
|
5090547a63 | ||
|
|
f36ebaec48 | ||
|
|
0b53169aff | ||
|
|
199fc65bce | ||
|
|
2dd91531ff | ||
|
|
3a181e1f08 | ||
|
|
2340a2a1ea | ||
|
|
8aee2cedbc | ||
|
|
bf1cbf1fed | ||
|
|
5f67172a9c | ||
|
|
86090e0325 | ||
|
|
ae6b05777b | ||
|
|
248f8881f4 | ||
|
|
8c2ab633a2 | ||
|
|
09ddcfa0eb | ||
|
|
eb91ba370b | ||
|
|
5d9605bc17 | ||
|
|
e47723dbdc | ||
|
|
2e5573e814 | ||
|
|
86b85aca01 | ||
|
|
ab50b48b42 | ||
|
|
c0e328fd65 | ||
|
|
0e8c5faba9 | ||
|
|
0a8c62ba3f | ||
|
|
c04dff98bf | ||
|
|
8bf05d9ba7 | ||
|
|
6c19c2e8bb | ||
|
|
76da13ba12 | ||
|
|
657b265f0a | ||
|
|
921daec3e7 | ||
|
|
bf59ac6d33 | ||
|
|
9e291c34be | ||
|
|
d59fd93563 | ||
|
|
7f1d0c40f9 | ||
|
|
6a7560beaa | ||
|
|
69f20d9125 | ||
|
|
e895fc05a6 | ||
|
|
eb1e71b625 | ||
|
|
4275feee3c | ||
|
|
ca205a1f5d | ||
|
|
0a69ecf663 | ||
|
|
93b2127a8b | ||
|
|
44219ac24e | ||
|
|
c230e4d7b7 | ||
|
|
badb934039 | ||
|
|
84820fc147 | ||
|
|
afa9f61219 | ||
|
|
e3ae38feb9 | ||
|
|
37a37d2f12 | ||
|
|
969bfe976c | ||
|
|
82ea605cb8 | ||
|
|
6479391903 | ||
|
|
704717950d | ||
|
|
e77a2c7816 | ||
|
|
68ac742f17 | ||
|
|
a18439bbcc | ||
|
|
db015638f8 | ||
|
|
4ea63cdba7 | ||
|
|
ff8cfcd7d1 | ||
|
|
58b7f8cd45 | ||
|
|
62a49dceb1 | ||
|
|
3362831db4 | ||
|
|
044b82459f | ||
|
|
d569225cc8 | ||
|
|
70b8fe0899 | ||
|
|
44e9dc1a7c | ||
|
|
18a263f3bc | ||
|
|
eed3811f45 | ||
|
|
7b1a165d4b | ||
|
|
3b92d5dc26 | ||
|
|
8e00b911e2 | ||
|
|
3957b528f6 | ||
|
|
8806d4e14c | ||
|
|
c822ae8a88 | ||
|
|
a8ce3ebdcc | ||
|
|
55c9822c1c | ||
|
|
f74aa2db07 | ||
|
|
cf9b9cf64c | ||
|
|
ed0ed133a2 | ||
|
|
e4465fc31c | ||
|
|
037620d83f | ||
|
|
928a9be5db | ||
|
|
9e804f36e5 | ||
|
|
8569274c01 | ||
|
|
561518317b | ||
|
|
10e3e5c998 | ||
|
|
31a53f2ec5 | ||
|
|
2419bb8d6a | ||
|
|
7767a8b2b5 | ||
|
|
62caad82a3 | ||
|
|
e41919c6f5 | ||
|
|
26b2a3a554 | ||
|
|
b274561f07 | ||
|
|
89479c5c75 | ||
|
|
544621e646 | ||
|
|
d79aadece0 | ||
|
|
3c4a6a41f2 | ||
|
|
47abe3cde9 | ||
|
|
d3ef0fd795 | ||
|
|
9967b38b16 | ||
|
|
bed8d5fd04 | ||
|
|
ce68078963 | ||
|
|
7e88f4b4c2 | ||
|
|
4101d51ce5 | ||
|
|
ec2cd2f9eb | ||
|
|
fb7d4315c9 | ||
|
|
939648e833 | ||
|
|
0457a33f3c | ||
|
|
23eda37c0a | ||
|
|
f7b2e70282 | ||
|
|
5736111cf5 | ||
|
|
dddd45cec8 | ||
|
|
604c8a1169 | ||
|
|
fb54272d6f | ||
|
|
4d01b85e99 | ||
|
|
d53826ed28 | ||
|
|
916516db60 | ||
|
|
1c29886ec0 | ||
|
|
47ff1fc297 | ||
|
|
7297a9736a | ||
|
|
4433731079 | ||
|
|
af61d58606 | ||
|
|
46abd74eba | ||
|
|
6e7f8e4009 | ||
|
|
acc8a5bc36 | ||
|
|
67f3d31254 | ||
|
|
d5c4487808 | ||
|
|
edf01bdcda | ||
|
|
952965ee07 | ||
|
|
191c50173a | ||
|
|
0910e55be7 | ||
|
|
e9bbab8b0d | ||
|
|
a28f146d71 | ||
|
|
e1dbd72689 | ||
|
|
23bdbe51f2 | ||
|
|
bf00fec1f9 | ||
|
|
03be91a951 | ||
|
|
ee5f311a04 | ||
|
|
034656b9fb | ||
|
|
0fa1be6f54 | ||
|
|
c7695a7ac1 | ||
|
|
a270964846 | ||
|
|
eb921fefa9 | ||
|
|
700a6720c4 | ||
|
|
4c06edcb22 | ||
|
|
7da9d975d4 | ||
|
|
8342d78fa0 | ||
|
|
fcfed6e125 | ||
|
|
7b70c109ff | ||
|
|
6f83c4198c | ||
|
|
36e91f5cff | ||
|
|
f25f7e77f5 | ||
|
|
7f6518af5f | ||
|
|
c5af3afebd | ||
|
|
97e55c565d | ||
|
|
d5855edc55 | ||
|
|
82028ca20d | ||
|
|
fcc2e32d66 | ||
|
|
60194fca04 | ||
|
|
af3f1b83e2 | ||
|
|
7a9c0171d1 | ||
|
|
c8c8ef006d | ||
|
|
0ec72754dd | ||
|
|
dce9a2222f | ||
|
|
7732e42658 | ||
|
|
d79350f20a | ||
|
|
96f22730ca | ||
|
|
af02d6620d | ||
|
|
472984233f | ||
|
|
ce930d0158 | ||
|
|
be2337e2c1 | ||
|
|
9b1d045631 | ||
|
|
83ace5c03e | ||
|
|
683723aa56 | ||
|
|
222e0e7699 | ||
|
|
61894b5c3a | ||
|
|
3cc78f2487 | ||
|
|
64206e1d9a | ||
|
|
35eb136986 | ||
|
|
8de70f9128 | ||
|
|
cb7e40345f | ||
|
|
1da29f8bd8 | ||
|
|
6a2c036582 | ||
|
|
c2108265b3 | ||
|
|
e3600cfc19 | ||
|
|
9b22cab024 | ||
|
|
02fd4ab340 | ||
|
|
d945dee95b | ||
|
|
b8a30805d3 | ||
|
|
cab6e21df6 | ||
|
|
ed0018ac98 | ||
|
|
b9b7cdc801 | ||
|
|
2edb1f4621 | ||
|
|
34984de671 | ||
|
|
d1e4b28ad2 | ||
|
|
46cba99cfb | ||
|
|
b46b50ed5f | ||
|
|
094270d994 | ||
|
|
915dc982e8 | ||
|
|
39c96ac9de | ||
|
|
d056e8e97d | ||
|
|
0bb822b9b5 | ||
|
|
327625b713 | ||
|
|
6e8b4a6c12 | ||
|
|
51a593de39 | ||
|
|
2eceab522d | ||
|
|
ff3949a6ce | ||
|
|
8f7eefcf2a | ||
|
|
825eb34e8a | ||
|
|
86768666ae | ||
|
|
43ae6e6a0e | ||
|
|
75b8c12090 | ||
|
|
884e5e820a | ||
|
|
13e838d171 | ||
|
|
9116f6410c | ||
|
|
f0f87bb4b5 | ||
|
|
f9c3368fc2 | ||
|
|
0cb8eecaa6 | ||
|
|
7fe4c3b23d | ||
|
|
9b0203b517 | ||
|
|
e4433dfc2d | ||
|
|
74e53f2a22 | ||
|
|
0b26ece3c4 | ||
|
|
33ebaa8753 | ||
|
|
ef1e6d5fd8 | ||
|
|
0fe106176e | ||
|
|
93615f53c5 | ||
|
|
d47a064c1c | ||
|
|
8501a7ead4 | ||
|
|
17ec37ae4e | ||
|
|
ac79a7a1b1 | ||
|
|
4b0ee9d0bb | ||
|
|
874c734628 | ||
|
|
f8c250be34 | ||
|
|
37d31aeac0 | ||
|
|
157d3e4279 | ||
|
|
3c0c94ff71 | ||
|
|
b53bd27a08 | ||
|
|
a984ca5beb | ||
|
|
c52efaecd3 | ||
|
|
a1708080c1 | ||
|
|
c8ff9503a2 | ||
|
|
c75421a73e | ||
|
|
1cbb1ddaf7 | ||
|
|
92eb721e85 | ||
|
|
26bd5fd4a0 |
@@ -53,6 +53,7 @@ endif()
|
||||
# we cannot generate dune.module since it is read by dunecontrol before
|
||||
# the build starts, so it makes sense to keep the data there then.
|
||||
include (OpmInit)
|
||||
OpmSetPolicies()
|
||||
|
||||
# Look for the opm-tests repository; if found the variable
|
||||
# HAVE_OPM_TESTS will be set to true.
|
||||
@@ -163,15 +164,17 @@ if (ENABLE_MOCKSIM)
|
||||
add_executable(msim examples/msim.cpp)
|
||||
target_link_libraries(msim mocksim)
|
||||
|
||||
set(_libs mocksim opmcommon
|
||||
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
||||
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
set(_libs mocksim opmcommon
|
||||
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
|
||||
|
||||
foreach( test test_msim test_msim_ACTIONX )
|
||||
opm_add_test(${test} SOURCES tests/msim/${test}.cpp
|
||||
LIBRARIES ${_libs}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests
|
||||
CONDITION HAVE_ECL_INPUT AND Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
endforeach()
|
||||
foreach( test test_msim test_msim_ACTIONX test_msim_EXIT)
|
||||
opm_add_test(${test} SOURCES tests/msim/${test}.cpp
|
||||
LIBRARIES ${_libs}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests
|
||||
CONDITION ${HAVE_ECL_INPUT})
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Build the compare utilities
|
||||
@@ -190,7 +193,11 @@ if(ENABLE_ECL_INPUT)
|
||||
test_util/summary.cpp
|
||||
)
|
||||
|
||||
foreach(target compareECL convertECL summary)
|
||||
add_executable(test_esmry_lod
|
||||
test_util/test_esmry_lod.cpp
|
||||
)
|
||||
|
||||
foreach(target compareECL convertECL summary test_esmry_lod)
|
||||
target_link_libraries(${target} opmcommon)
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
endforeach()
|
||||
@@ -240,7 +247,11 @@ install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc)
|
||||
if (OPM_ENABLE_PYTHON)
|
||||
# -------------------------------------------------------------------------
|
||||
# 1: Wrap C++ functionality in Python
|
||||
set(PYTHON_PACKAGE_PATH "site-packages")
|
||||
if (EXISTS "/etc/debian_version")
|
||||
set(PYTHON_PACKAGE_PATH "dist-packages")
|
||||
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")
|
||||
|
||||
make_directory(${PROJECT_BINARY_DIR}/python)
|
||||
@@ -349,7 +360,7 @@ if (OPM_ENABLE_PYTHON)
|
||||
# 2: Embed the Python interpreter for keywords like PYACTION and PYINPUT
|
||||
if (OPM_ENABLE_EMBEDDED_PYTHON)
|
||||
add_subdirectory(python/pybind11)
|
||||
target_include_directories(opmcommon PRIVATE "python/pybind11/include;${PYTHON_INCLUDE_DIRS}")
|
||||
target_include_directories(opmcommon SYSTEM PRIVATE "python/pybind11/include;${PYTHON_INCLUDE_DIRS}")
|
||||
target_link_libraries(opmcommon PUBLIC ${PYTHON_LIBRARY})
|
||||
|
||||
add_definitions(-DEMBEDDED_PYTHON)
|
||||
|
||||
@@ -41,6 +41,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
)
|
||||
if(ENABLE_ECL_INPUT)
|
||||
list(APPEND MAIN_SOURCE_FILES
|
||||
src/opm/io/eclipse/SummaryNode.cpp
|
||||
src/opm/json/JsonObject.cpp
|
||||
src/opm/parser/eclipse/Deck/Deck.cpp
|
||||
src/opm/parser/eclipse/Deck/DeckItem.cpp
|
||||
@@ -51,6 +52,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/Deck/DeckSection.cpp
|
||||
src/opm/parser/eclipse/Deck/UDAValue.cpp
|
||||
src/opm/parser/eclipse/Python/Python.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp
|
||||
src/opm/parser/eclipse/EclipseState/AquiferConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/AquiferCT.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Aquifetp.cpp
|
||||
@@ -83,6 +85,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Runspec.cpp
|
||||
src/opm/parser/eclipse/EclipseState/TracerConfig.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
|
||||
@@ -93,7 +96,6 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ActionValue.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/ASTNode.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/Condition.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ArrayDimChecker.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Group/Group.cpp
|
||||
@@ -114,6 +116,7 @@ if(ENABLE_ECL_INPUT)
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RFTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/RPTConfig.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.cpp
|
||||
src/opm/parser/eclipse/EclipseState/Schedule/SummaryState.cpp
|
||||
@@ -218,7 +221,10 @@ if(ENABLE_ECL_INPUT)
|
||||
set_source_files_properties(${PYTHON_CXX_SOURCE_FILES} PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
set_source_files_properties(src/opm/parser/eclipse/Python/PythonInterp.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
set_source_files_properties(src/opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.cpp PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
list( APPEND MAIN_SOURCE_FILES src/opm/parser/eclipse/Python/PythonInterp.cpp ${PYTHON_CXX_SOURCE_FILES})
|
||||
list( APPEND MAIN_SOURCE_FILES
|
||||
src/opm/parser/eclipse/Python/PythonInterp.cpp
|
||||
src/opm/parser/eclipse/Python/PyRunModule.cpp
|
||||
${PYTHON_CXX_SOURCE_FILES})
|
||||
endif()
|
||||
|
||||
list( APPEND PYTHON_CXX_DEPENDS ${PYTHON_CXX_SOURCE_FILES}
|
||||
@@ -237,8 +243,11 @@ if(ENABLE_ECL_OUTPUT)
|
||||
src/opm/io/eclipse/EGrid.cpp
|
||||
src/opm/io/eclipse/ERft.cpp
|
||||
src/opm/io/eclipse/ERst.cpp
|
||||
src/opm/io/eclipse/ERsm.cpp
|
||||
src/opm/io/eclipse/ESmry.cpp
|
||||
src/opm/io/eclipse/ESmry_write_rsm.cpp
|
||||
src/opm/io/eclipse/OutputStream.cpp
|
||||
src/opm/io/eclipse/SummaryNode.cpp
|
||||
src/opm/io/eclipse/rst/connection.cpp
|
||||
src/opm/io/eclipse/rst/group.cpp
|
||||
src/opm/io/eclipse/rst/header.cpp
|
||||
@@ -270,6 +279,8 @@ if(ENABLE_ECL_OUTPUT)
|
||||
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/Solution.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -290,6 +301,8 @@ list (APPEND TEST_SOURCE_FILES
|
||||
)
|
||||
if(ENABLE_ECL_INPUT)
|
||||
list(APPEND TEST_SOURCE_FILES
|
||||
tests/rst_test.cpp
|
||||
tests/test_ERsm.cpp
|
||||
tests/parser/ACTIONX.cpp
|
||||
tests/parser/ADDREGTests.cpp
|
||||
tests/parser/AquiferTests.cpp
|
||||
@@ -325,6 +338,7 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/ParseDATAWithDefault.cpp
|
||||
tests/parser/PYACTION.cpp
|
||||
tests/parser/RawKeywordTests.cpp
|
||||
tests/parser/test_ReportConfig.cpp
|
||||
tests/parser/ResinsightTest.cpp
|
||||
tests/parser/RestartConfigTests.cpp
|
||||
tests/parser/RFTConfigTests.cpp
|
||||
@@ -346,6 +360,7 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/parser/TableSchemaTests.cpp
|
||||
tests/parser/ThresholdPressureTest.cpp
|
||||
tests/parser/TimeMapTest.cpp
|
||||
tests/parser/TracerTests.cpp
|
||||
tests/parser/TransMultTests.cpp
|
||||
tests/parser/TuningTests.cpp
|
||||
tests/parser/UDQTests.cpp
|
||||
@@ -379,6 +394,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/test_rst.cpp
|
||||
tests/test_Solution.cpp
|
||||
tests/test_Summary.cpp
|
||||
tests/test_Summary_Group.cpp
|
||||
tests/test_Tables.cpp
|
||||
tests/test_Wells.cpp
|
||||
tests/test_WindowedArray.cpp
|
||||
@@ -410,6 +426,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/SOFR_TEST.DATA
|
||||
tests/UDQ_TEST_WCONPROD_IUAD-2.DATA
|
||||
tests/UDQ_ACTIONX_TEST1.DATA
|
||||
tests/UDQ_ACTIONX_TEST1_U.DATA
|
||||
tests/include_example_pvt.txt
|
||||
tests/include_example_summary.txt
|
||||
tests/include_sgof.txt
|
||||
@@ -418,6 +435,17 @@ if(ENABLE_ECL_OUTPUT)
|
||||
tests/SPE1CASE2.DATA
|
||||
tests/SPE1CASE2_RESTART.DATA
|
||||
tests/SPE1CASE2.X0060
|
||||
tests/PYACTION.DATA
|
||||
tests/act1.py
|
||||
tests/MSW.DATA
|
||||
tests/EXIT_TEST.DATA
|
||||
tests/action_syntax_error.py
|
||||
tests/action_missing_run.py
|
||||
tests/EMBEDDED_PYTHON.DATA
|
||||
tests/wclose.py
|
||||
tests/msim/MSIM_PYACTION.DATA
|
||||
tests/msim/action1.py
|
||||
tests/msim/action2.py
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -437,12 +465,13 @@ if(ENABLE_ECL_INPUT)
|
||||
tests/SPE1CASE1A.UNSMRY
|
||||
tests/SPE1CASE1_RST60.SMSPEC
|
||||
tests/SPE1CASE1_RST60.UNSMRY
|
||||
tests/MODEL2_RESTART.DATA
|
||||
tests/restart/MODEL2.UNRST
|
||||
)
|
||||
list (APPEND EXAMPLE_SOURCE_FILES
|
||||
examples/opmi.cpp
|
||||
examples/opmpack.cpp
|
||||
examples/opmhash.cpp
|
||||
tests/rst_load.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -494,15 +523,16 @@ list( APPEND PUBLIC_HEADER_FILES
|
||||
opm/common/utility/parameters/ParameterStrings.hpp
|
||||
opm/common/utility/parameters/ParameterTools.hpp
|
||||
opm/common/utility/numeric/calculateCellVol.hpp
|
||||
opm/common/utility/String.hpp
|
||||
opm/common/utility/TimeService.hpp
|
||||
)
|
||||
if(ENABLE_ECL_INPUT)
|
||||
list(APPEND PUBLIC_HEADER_FILES
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/json/JsonObject.hpp
|
||||
opm/parser/eclipse/Utility/Stringview.hpp
|
||||
opm/parser/eclipse/Utility/Functional.hpp
|
||||
opm/parser/eclipse/Utility/Typetools.hpp
|
||||
opm/parser/eclipse/Utility/String.hpp
|
||||
opm/parser/eclipse/Generator/KeywordGenerator.hpp
|
||||
opm/parser/eclipse/Generator/KeywordLoader.hpp
|
||||
opm/parser/eclipse/Units/UnitSystem.hpp
|
||||
@@ -541,6 +571,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp
|
||||
opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp
|
||||
opm/parser/eclipse/EclipseState/EndpointScaling.hpp
|
||||
opm/parser/eclipse/EclipseState/TracerConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/DenT.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/StandardCond.hpp
|
||||
@@ -614,6 +645,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp
|
||||
opm/parser/eclipse/EclipseState/Tables/TracerVdTable.hpp
|
||||
opm/parser/eclipse/EclipseState/EclipseState.hpp
|
||||
opm/parser/eclipse/EclipseState/EclipseConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Aquancon.hpp
|
||||
@@ -653,6 +685,7 @@ if(ENABLE_ECL_INPUT)
|
||||
opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/RFTConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/RPTConfig.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp
|
||||
opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp
|
||||
@@ -714,9 +747,11 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/io/eclipse/EGrid.hpp
|
||||
opm/io/eclipse/ERft.hpp
|
||||
opm/io/eclipse/ERst.hpp
|
||||
opm/io/eclipse/ERsm.hpp
|
||||
opm/io/eclipse/ESmry.hpp
|
||||
opm/io/eclipse/PaddedOutputString.hpp
|
||||
opm/io/eclipse/OutputStream.hpp
|
||||
opm/io/eclipse/SummaryNode.hpp
|
||||
opm/io/eclipse/rst/connection.hpp
|
||||
opm/io/eclipse/rst/group.hpp
|
||||
opm/io/eclipse/rst/header.hpp
|
||||
@@ -727,6 +762,7 @@ if(ENABLE_ECL_OUTPUT)
|
||||
opm/output/data/Cells.hpp
|
||||
opm/output/data/Solution.hpp
|
||||
opm/output/data/Wells.hpp
|
||||
opm/output/data/Groups.hpp
|
||||
opm/output/eclipse/VectorItems/aquifer.hpp
|
||||
opm/output/eclipse/VectorItems/connection.hpp
|
||||
opm/output/eclipse/VectorItems/group.hpp
|
||||
@@ -756,7 +792,14 @@ if(ENABLE_ECL_OUTPUT)
|
||||
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
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ECL_INPUT OR ENABLE_ECL_OUTPUT)
|
||||
list(APPEND TEST_SOURCE_FILES
|
||||
tests/test_SummaryNode.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -61,6 +61,16 @@ foreach (test BoxTest
|
||||
list(APPEND EXTRA_TESTS ${test})
|
||||
endforeach ()
|
||||
|
||||
opm_add_test( rst_spe1
|
||||
SOURCES tests/rst_test.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS tests/SPE1CASE2.DATA tests/SPE1CASE2_RESTART.DATA )
|
||||
|
||||
opm_add_test( rst_msw
|
||||
SOURCES tests/rst_test.cpp
|
||||
LIBRARIES ${TEST_LIBS}
|
||||
TEST_ARGS tests/MSW.DATA tests/MSW_RESTART.DATA )
|
||||
|
||||
# opm-tests dependent tests
|
||||
if(HAVE_OPM_TESTS)
|
||||
opm_add_test(parse_write ONLY_COMPILE
|
||||
@@ -105,8 +115,6 @@ if(HAVE_OPM_TESTS)
|
||||
opm_add_test("SPE9_CP_GROUP2" NO_COMPILE EXE_NAME parse_write TEST_ARGS "${OPM_TESTS_ROOT}/spe9group/SPE9_CP_GROUP.DATA")
|
||||
set_property(TEST NORNE_ATW2013
|
||||
PROPERTY ENVIRONMENT "OPM_ERRORS_IGNORE=PARSE_RANDOM_SLASH")
|
||||
|
||||
opm_add_test("RST_LOAD_MSW" NO_COMPILE EXE_NAME rst_load TEST_ARGS "${OPM_TESTS_ROOT}/msw_3d_hfa/opm-simulation-reference/flow/3D_MSW.UNRST")
|
||||
endif()
|
||||
|
||||
# JSON tests
|
||||
|
||||
@@ -58,6 +58,7 @@ if(PARMETIS_INCLUDE_DIR)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${MPI_C_COMPILE_FLAGS}")
|
||||
|
||||
include(CheckIncludeFile)
|
||||
check_include_file(parmetis.h PARMETIS_FOUND)
|
||||
_search_parmetis_lib(PARMETIS_LIBRARY parmetis "The main ParMETIS library.")
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ if(ZOLTAN_ROOT)
|
||||
set(ZOLTAN_NO_DEFAULT_PATH "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# We only need zoltan with MPI. Otherwise usage of alugrid is broken.
|
||||
find_package(MPI)
|
||||
|
||||
# Make sure we have checked for the underlying partitioners.
|
||||
find_package(PTScotch)
|
||||
#find_package(ParMETIS)
|
||||
@@ -39,20 +42,23 @@ find_library(ZOLTAN_LIBRARIES
|
||||
${ZOLTAN_NO_DEFAULT_PATH})
|
||||
|
||||
set (ZOLTAN_FOUND FALSE)
|
||||
if (ZOLTAN_INCLUDE_DIRS OR ZOLTAN_LIBRARIES)
|
||||
set(ZOLTAN_FOUND TRUE)
|
||||
|
||||
set (ZOLTAN_CONFIG_VAR HAVE_ZOLTAN)
|
||||
|
||||
# print a message to indicate status of this package
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(ZOLTAN
|
||||
DEFAULT_MSG
|
||||
ZOLTAN_LIBRARIES
|
||||
ZOLTAN_INCLUDE_DIRS
|
||||
MPI_FOUND
|
||||
)
|
||||
|
||||
if (ZOLTAN_FOUND)
|
||||
set(HAVE_ZOLTAN 1)
|
||||
set(ZOLTAN_LIBRARIES ${ZOLTAN_LIBRARIES} ${PARMETIS_LIBRARIES} ${PTSCOTCH_LIBRARIES})
|
||||
set(ZOLTAN_INCLUDE_DIRS ${ZOLTAN_INCLUDE_DIRS} ${PARMETIS_INCLUDE_DIRS}
|
||||
${PTSCOTCH_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
set (ZOLTAN_CONFIG_VAR HAVE_ZOLTAN)
|
||||
|
||||
# print a message to indicate status of this package
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZOLTAN
|
||||
DEFAULT_MSG
|
||||
ZOLTAN_LIBRARIES
|
||||
ZOLTAN_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
@@ -97,3 +97,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
list(APPEND ${project}_LIBRARIES stdc++fs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(OPM_CLANG_WITH_STDC++FS "Using libstdc++ with clang and we want to link to stdc++fs" OFF)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND OPM_CLANG_WITH_STDC++FS)
|
||||
list(APPEND ${project}_LIBRARIES stdc++fs)
|
||||
endif()
|
||||
|
||||
@@ -5,6 +5,8 @@ is_compiler_gcc_compatible ()
|
||||
include(TestCXXAcceptsFlag)
|
||||
|
||||
macro (opm_defaults opm)
|
||||
|
||||
message("Processing opm_defaults ${opm}")
|
||||
# if we are installing a development version (default when checking out of
|
||||
# VCS), then remember which directories were used when configuring. package
|
||||
# distribution should disable this option.
|
||||
|
||||
@@ -54,17 +54,6 @@ foreach (name IN LISTS _opm_proj_vars)
|
||||
endif (NOT DEFINED ${CMAKE_PROJECT_NAME}_${name})
|
||||
endforeach (name)
|
||||
|
||||
# these dependencies needs special treatment
|
||||
set (_opm_proj_exemptions
|
||||
dune-common
|
||||
dune-istl
|
||||
dune-grid
|
||||
dune-geometry
|
||||
dune-uggrid
|
||||
dune-alugrid
|
||||
dune-localfunctions
|
||||
dune-fem
|
||||
)
|
||||
|
||||
# insert this boilerplate whenever we are going to find a new package
|
||||
macro (find_and_append_package_to prefix name)
|
||||
@@ -115,21 +104,6 @@ macro (find_and_append_package_to prefix name)
|
||||
endif (EXISTS ${${NAME}_ROOT}/${name}-config.cmake OR EXISTS ${${NAME}_ROOT}/${name}Config.cmake)
|
||||
endif (NOT DEFINED ${name}_DIR AND (DEFINED ${name}_ROOT OR DEFINED ${NAME}_ROOT))
|
||||
|
||||
# these libraries need special handling which is not provided in
|
||||
# the -config.cmake file, but which must be provided by this project,
|
||||
# something which is done in our find module
|
||||
list (FIND _opm_proj_exemptions "${name}" _${name}_exempted)
|
||||
if ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR))
|
||||
set (${name}_ROOT "${${name}_DIR}")
|
||||
# store this for later, in case we reconfigure
|
||||
set (${name}_ROOT "${${name}_ROOT}" CACHE LOCATION "Path to ${name}")
|
||||
# clear this to not use config mode
|
||||
unset (${name}_DIR)
|
||||
# variables that are given on the command-line is also put in the cache
|
||||
# removing the local copy only "unshadows" this one
|
||||
unset (${name}_DIR CACHE)
|
||||
endif ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR))
|
||||
|
||||
# if we're told not to look for the package, pretend it was never found
|
||||
if (CMAKE_DISABLE_FIND_PACKAGE_${name})
|
||||
set (${name}_FOUND FALSE)
|
||||
@@ -151,10 +125,8 @@ 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 "(dune|opm)-.*" _is_opm ${name})
|
||||
if(_${name}_exempted LESS 0 AND NOT _is_opm)
|
||||
find_package (${name} ${ARGN})
|
||||
elseif(_${name}_exempted GREATER -1)
|
||||
string(REGEX MATCH "(opm)-.*" _is_opm ${name})
|
||||
if(NOT _is_opm)
|
||||
find_package (${name} ${ARGN})
|
||||
else()
|
||||
if(${name}_DIR)
|
||||
|
||||
@@ -12,6 +12,59 @@
|
||||
# This module should be the first to be included in the project,
|
||||
# because most of the others (OpmXxx.cmake) use these variables.
|
||||
|
||||
# for CMake >= 3.0, we need to change a few policies:
|
||||
#
|
||||
# - CMP0026 to allow access to the LOCATION target property
|
||||
# - CMP0048 to indicate that we want to deal with the *VERSION*
|
||||
# variables ourselves
|
||||
# - CMP0064 to indicate that we want TEST if conditions to be evaluated
|
||||
# - CMP0074 to indicate that <PackageName>_ROOT can be used to find package
|
||||
# config files
|
||||
macro(OpmSetPolicies)
|
||||
if (POLICY CMP0026)
|
||||
# Needed as we query LOCATION in OpmCompile.cmake and OpmSatellites.cmake
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0048)
|
||||
# We do not set version. Hence NEW should work and this can be removed later
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0064)
|
||||
cmake_policy(SET CMP0064 NEW)
|
||||
endif()
|
||||
|
||||
# set the behavior of the policy 0054 to NEW. (i.e. do not implicitly
|
||||
# expand variables in if statements)
|
||||
if (POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
# set the behavior of policy 0074 to new as we always used <PackageName>_ROOT as the
|
||||
# root of the installation
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
# include special
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.3")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.3")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.5")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.5")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.5")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.5")
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.7")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.7")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
endmacro()
|
||||
|
||||
|
||||
# helper macro to retrieve a single field of a dune.module file
|
||||
macro(OpmGetDuneModuleDirective field variable contents)
|
||||
string (REGEX MATCH ".*${field}:[ ]*([^\n]+).*" ${variable} "${contents}")
|
||||
|
||||
@@ -40,7 +40,7 @@ macro (opm_install opm)
|
||||
set (_sys_dbg_def OFF)
|
||||
endif (CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||
option (SYSTEM_DEBUG "Put .debug files in GDB debug file directory" ${_sys_dbg_def})
|
||||
set (DEBUG_FILE_DIRECTORY /usr/lib/debug CACHE LOCATION "GDB debug file directory")
|
||||
set (DEBUG_FILE_DIRECTORY /usr/lib/debug CACHE PATH "GDB debug file directory")
|
||||
mark_as_advanced (DEBUG_FILE_DIRECTORY)
|
||||
if (SYSTEM_DEBUG AND NOT APPLE)
|
||||
set (_dbg_prefix "${DEBUG_FILE_DIRECTORY}/")
|
||||
|
||||
@@ -15,55 +15,11 @@
|
||||
# tests_hook Do special processing before tests are compiled
|
||||
# files_hook Do special processing before final targets are added
|
||||
|
||||
# for CMake >= 3.0, we need to change a few policies:
|
||||
#
|
||||
# - CMP0026 to allow access to the LOCATION target property
|
||||
# - CMP0048 to indicate that we want to deal with the *VERSION*
|
||||
# variables ourselves
|
||||
# - CMP0064 to indicate that we want TEST if conditions to be evaluated
|
||||
if (POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 OLD)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0064)
|
||||
cmake_policy(SET CMP0064 NEW)
|
||||
endif()
|
||||
|
||||
# set the behavior of the policy 0054 to NEW. (i.e. do not implicitly
|
||||
# expand variables in if statements)
|
||||
if (POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
# include special
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.3")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.3")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.5")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.5")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.5")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.5")
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
message (STATUS "Enabling compatibility modules for CMake 2.8.7")
|
||||
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules/compat-2.8.7")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
|
||||
# don't write default flags into the cache, preserve that for user set values
|
||||
include (AddOptions)
|
||||
no_default_options ()
|
||||
|
||||
# C++ project
|
||||
project (${${project}_NAME})
|
||||
enable_language (C)
|
||||
enable_language (CXX)
|
||||
|
||||
# Languages and global compiler settings
|
||||
if(CMAKE_VERSION VERSION_LESS 3.8)
|
||||
message(WARNING "CMake version does not support c++17, guessing -std=c++17")
|
||||
|
||||
@@ -198,6 +198,7 @@ endmacro (opm_data satellite target dirname files)
|
||||
# TEST_DEPENDS Other tests which must be run before running this test (optional, default: None)
|
||||
# LIBRARIES Libraries to link test against (optional)
|
||||
# WORKING_DIRECTORY Working directory for test (optional, default: ${PROJECT_BINARY_DIR})
|
||||
# CONFIGURATION Configuration to add test to
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
@@ -211,7 +212,7 @@ include(CMakeParseArguments)
|
||||
macro(opm_add_test TestName)
|
||||
cmake_parse_arguments(CURTEST
|
||||
"NO_COMPILE;ONLY_COMPILE;ALWAYS_ENABLE" # flags
|
||||
"EXE_NAME;PROCESSORS;WORKING_DIRECTORY" # one value args
|
||||
"EXE_NAME;PROCESSORS;WORKING_DIRECTORY;CONFIGURATION" # one value args
|
||||
"CONDITION;DEFAULT_ENABLE_IF;TEST_DEPENDS;DRIVER;DRIVER_ARGS;DEPENDS;TEST_ARGS;SOURCES;LIBRARIES" # multi-value args
|
||||
${ARGN})
|
||||
|
||||
@@ -347,7 +348,8 @@ macro(opm_add_test TestName)
|
||||
|
||||
add_test(NAME ${_FANCY}
|
||||
WORKING_DIRECTORY "${CURTEST_WORKING_DIRECTORY}"
|
||||
COMMAND ${CURTEST_COMMAND})
|
||||
COMMAND ${CURTEST_COMMAND}
|
||||
CONFIGURATIONS ${CURTEST_CONFIGURATION})
|
||||
|
||||
# specify the dependencies between the tests
|
||||
if (CURTEST_TEST_DEPENDS)
|
||||
|
||||
@@ -42,7 +42,13 @@ macro (find_openmp opm)
|
||||
# enabling OpenMP is supposedly enough to make the compiler link with
|
||||
# the appropriate libraries
|
||||
find_package (OpenMP ${${opm}_QUIET})
|
||||
list (APPEND ${opm}_LIBRARIES ${OpenMP_LIBRARIES})
|
||||
|
||||
if(OpenMP_CXX_FOUND)
|
||||
list (APPEND ${opm}_LIBRARIES OpenMP::OpenMP_CXX)
|
||||
else()
|
||||
list (APPEND ${opm}_LIBRARIES ${OpenMP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (OPENMP_FOUND)
|
||||
add_options (C ALL_BUILDS "${OpenMP_C_FLAGS}")
|
||||
add_options (CXX ALL_BUILDS "${OpenMP_CXX_FLAGS}")
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
# makes changes to any of the unit tests.
|
||||
|
||||
message("-- Writing version information to local header project-version.h")
|
||||
string (TIMESTAMP build_timestamp "%Y-%m-%d at %H:%M:%S hrs")
|
||||
|
||||
string (TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_upper_)
|
||||
if (cmake_build_type_upper_ MATCHES DEBUG)
|
||||
@@ -23,6 +24,7 @@ if (cmake_build_type_upper_ MATCHES DEBUG)
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"debug\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (debug)\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
else ()
|
||||
@@ -41,6 +43,7 @@ else ()
|
||||
"#define PROJECT_VERSION_NAME \"${${project}_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"unknown git version\"\n"
|
||||
"#define PROJECT_VERSION \"${${project}_LABEL} (unknown git version)\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
else ()
|
||||
|
||||
@@ -47,6 +47,8 @@ if (sha1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
string (TIMESTAMP build_timestamp "%Y-%m-%d at %H:%M:%S hrs")
|
||||
|
||||
# write the content to a temporary file in a C compatible format
|
||||
file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
||||
"#ifndef OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
@@ -54,6 +56,7 @@ file (WRITE "${PROJECT_BINARY_DIR}/project-version.tmp"
|
||||
"#define PROJECT_VERSION_NAME \"${PROJECT_LABEL}\"\n"
|
||||
"#define PROJECT_VERSION_HASH \"${sha1}\"\n"
|
||||
"#define PROJECT_VERSION \"${PROJECT_LABEL} (${sha1})\"\n"
|
||||
"#define BUILD_TIMESTAMP \"${build_timestamp}\"\n"
|
||||
"#endif // OPM_GENERATED_OPM_VERSION_HEADER_INCLUDED\n"
|
||||
)
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ if(NOT @opm-project_NAME@_FOUND)
|
||||
set (@opm-project_NAME@_LINKER_FLAGS "@opm-project_LINKER_FLAGS@")
|
||||
set (@opm-project_NAME@_CONFIG_VARS "@opm-project_CONFIG_VARS@")
|
||||
|
||||
# The flag whether embedded Python is supported or not is passed to downstream modules,
|
||||
# it is only used to enable/disable regression testing with Python enabled input. The
|
||||
# actual code is self contained - and can be used downstream without awareness of this.
|
||||
set (@opm-project_NAME@_EMBEDDED_PYTHON @OPM_ENABLE_EMBEDDED_PYTHON@)
|
||||
|
||||
# libraries come from the build tree where this file was generated
|
||||
set (@opm-project_NAME@_LIBRARY "@opm-project_LIBRARY@")
|
||||
set (@opm-project_NAME@_LIBRARIES ${@opm-project_NAME@_LIBRARY} "@opm-project_LIBRARIES@")
|
||||
|
||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
||||
opm-common (2019.04-pre~xenial) xenial; urgency=medium
|
||||
opm-common (2020.04-1~xenial) xenial; urgency=medium
|
||||
|
||||
* New release
|
||||
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -16,7 +16,7 @@ Vcs-Browser: https://github.com/OPM/opm-common
|
||||
|
||||
Package: libopm-common1
|
||||
Section: libs
|
||||
Pre-Depends: ${misc:Pre-Depends}, multiarch-support
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
@@ -56,7 +56,7 @@ Description: OPM common library -- documentation
|
||||
|
||||
Package: python3-opm-common
|
||||
Section: libs
|
||||
Pre-Depends: ${misc:Pre-Depends}, multiarch-support
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libopm-common1, python3-numpy, python3-decorator
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
Module: opm-common
|
||||
Description: Open Porous Media Initiative shared infrastructure
|
||||
Version: 2020.04-pre
|
||||
Label: 2020.04-pre
|
||||
Version: 2020.04
|
||||
Label: 2020.04
|
||||
Maintainer: opm@opm-project.org
|
||||
MaintainerName: OPM community
|
||||
Url: http://opm-project.org
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
@@ -35,10 +36,11 @@ int main(int /* argc */, char** argv) {
|
||||
Opm::Parser parser;
|
||||
Opm::ParseContext parse_context;
|
||||
Opm::ErrorGuard error_guard;
|
||||
auto python = std::make_shared<Opm::Python>();
|
||||
|
||||
Opm::Deck deck = parser.parseFile(deck_file, parse_context, error_guard);
|
||||
Opm::EclipseState state(deck);
|
||||
Opm::Schedule schedule(deck, state, parse_context, error_guard);
|
||||
Opm::Schedule schedule(deck, state, parse_context, error_guard, python);
|
||||
Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager(), parse_context, error_guard);
|
||||
|
||||
if (error_guard) {
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/OpmLog/StreamLog.hpp>
|
||||
@@ -44,6 +45,7 @@ inline void loadDeck( const char * deck_file) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ErrorGuard errors;
|
||||
Opm::Parser parser;
|
||||
auto python = std::make_shared<Opm::Python>();
|
||||
|
||||
std::cout << "Loading deck: " << deck_file << " ..... "; std::cout.flush();
|
||||
|
||||
@@ -62,7 +64,7 @@ inline void loadDeck( const char * deck_file) {
|
||||
std::cout << "creating Schedule .... "; std::cout.flush();
|
||||
|
||||
start = std::chrono::system_clock::now();
|
||||
Opm::Schedule schedule( deck, state);
|
||||
Opm::Schedule schedule( deck, state, python);
|
||||
auto schedule_time = std::chrono::system_clock::now() - start;
|
||||
|
||||
std::cout << "creating SummaryConfig .... "; std::cout.flush();
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <getopt.h>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/I.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/P.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/G.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
@@ -85,9 +87,11 @@ void copy_file(const fs::path& source_dir, fs::path fname, const fs::path& targe
|
||||
|
||||
auto source_file = source_dir / fname;
|
||||
auto target_file = target_dir / fname;
|
||||
|
||||
if (!fs::is_directory(target_file.parent_path()))
|
||||
fs::create_directories(target_file.parent_path());
|
||||
{
|
||||
const auto& parent_path = target_file.parent_path();
|
||||
if (!parent_path.empty() && !fs::is_directory(parent_path))
|
||||
fs::create_directories(parent_path);
|
||||
}
|
||||
|
||||
fs::copy_file(source_file, target_file, fs::copy_options::overwrite_existing);
|
||||
std::cerr << "Copying file " << source_file.string() << " -> " << target_file.string() << std::endl;
|
||||
@@ -149,12 +153,22 @@ int main(int argc, char** argv) {
|
||||
copy_file(input_arg.parent_path(), restart_file, output_dir);
|
||||
}
|
||||
|
||||
for (std::size_t import_index = 0; import_index < deck.count("IMPORT"); import_index++) {
|
||||
const auto& import_keyword = deck.getKeyword("IMPORT", import_index);
|
||||
const auto& fname = import_keyword.getRecord(0).getItem("FILE").get<std::string>(0);
|
||||
using IMPORT = Opm::ParserKeywords::IMPORT;
|
||||
for (std::size_t import_index = 0; import_index < deck.count<IMPORT>(); import_index++) {
|
||||
const auto& import_keyword = deck.getKeyword<IMPORT>(import_index);
|
||||
const auto& fname = import_keyword.getRecord(0).getItem<IMPORT::FILE>().get<std::string>(0);
|
||||
copy_file(input_arg.parent_path(), fname, output_dir);
|
||||
}
|
||||
|
||||
|
||||
using PYACTION = Opm::ParserKeywords::PYACTION;
|
||||
for (std::size_t pyaction_index = 0; pyaction_index < deck.count<PYACTION>(); pyaction_index++) {
|
||||
const auto& pyaction_keyword = deck.getKeyword<PYACTION>(pyaction_index);
|
||||
const auto& fname = pyaction_keyword.getRecord(1).getItem<PYACTION::FILENAME>().get<std::string>(0);
|
||||
copy_file(input_arg.parent_path(), fname, output_dir);
|
||||
}
|
||||
|
||||
|
||||
using GDFILE = Opm::ParserKeywords::GDFILE;
|
||||
if (deck.hasKeyword<GDFILE>()) {
|
||||
const auto& gdfile_keyword = deck.getKeyword<GDFILE>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
declare -A configurations
|
||||
|
||||
declare -A EXTRA_MODULE_FLAGS
|
||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON"
|
||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON -DOPM_ENABLE_PYTHON=ON"
|
||||
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON"
|
||||
|
||||
# Parse revisions from trigger comment and setup arrays
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Opm {
|
||||
class EclipseIO;
|
||||
class ParseContext;
|
||||
class Parser;
|
||||
class Python;
|
||||
class SummaryState;
|
||||
class msim {
|
||||
|
||||
@@ -33,7 +34,7 @@ public:
|
||||
void well_rate(const std::string& well, data::Rates::opt rate, std::function<well_rate_function> func);
|
||||
void solution(const std::string& field, std::function<solution_function> func);
|
||||
void run(Schedule& schedule, EclipseIO& io, bool report_only);
|
||||
void post_step(Schedule& schedule, const SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step) const;
|
||||
void post_step(Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step);
|
||||
private:
|
||||
|
||||
void run_step(const Schedule& schedule, SummaryState& st, data::Solution& sol, data::Wells& well_data, size_t report_step, EclipseIO& io) const;
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <opm/output/eclipse/Summary.hpp>
|
||||
#include <opm/output/data/Solution.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
#include <opm/parser/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/SummaryState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionContext.hpp>
|
||||
@@ -41,11 +43,12 @@ msim::msim(const EclipseState& state_arg) :
|
||||
void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
const double week = 7 * 86400;
|
||||
data::Solution sol;
|
||||
data::Wells well_data;
|
||||
SummaryState st(std::chrono::system_clock::from_time_t(schedule.getStartTime()));
|
||||
Python python;
|
||||
|
||||
io.writeInitial();
|
||||
for (size_t report_step = 1; report_step < schedule.size(); report_step++) {
|
||||
data::Wells well_data;
|
||||
if (report_only)
|
||||
run_step(schedule, st, sol, well_data, report_step, io);
|
||||
else {
|
||||
@@ -53,11 +56,14 @@ void msim::run(Schedule& schedule, EclipseIO& io, bool report_only) {
|
||||
run_step(schedule, st, sol, well_data, report_step, time_step, io);
|
||||
}
|
||||
post_step(schedule, st, sol, well_data, report_step);
|
||||
const auto& exit_status = schedule.exitStatus();
|
||||
if (exit_status.has_value())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void msim::post_step(Schedule& schedule, const SummaryState& st, data::Solution& /* sol */, data::Wells& /* well_data */, size_t report_step) const {
|
||||
void msim::post_step(Schedule& schedule, SummaryState& st, data::Solution& /* sol */, data::Wells& /* well_data */, size_t report_step) {
|
||||
const auto& actions = schedule.actions(report_step);
|
||||
if (actions.empty())
|
||||
return;
|
||||
@@ -70,6 +76,9 @@ void msim::post_step(Schedule& schedule, const SummaryState& st, data::Solution&
|
||||
if (result)
|
||||
schedule.applyAction(report_step, *action, result);
|
||||
}
|
||||
|
||||
for (const auto& pyaction : actions.pending_python())
|
||||
pyaction->run(this->state, schedule, report_step, st);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +100,8 @@ void msim::run_step(const Schedule& schedule, SummaryState& st, data::Solution&
|
||||
|
||||
this->simulate(schedule, st, sol, well_data, report_step, seconds_elapsed, time_step);
|
||||
|
||||
Opm::data::Group group_data;
|
||||
|
||||
seconds_elapsed += time_step;
|
||||
|
||||
io.summary().eval(st,
|
||||
@@ -99,6 +110,7 @@ void msim::run_step(const Schedule& schedule, SummaryState& st, data::Solution&
|
||||
this->state,
|
||||
schedule,
|
||||
well_data,
|
||||
group_data,
|
||||
{});
|
||||
|
||||
this->output(st,
|
||||
@@ -113,11 +125,11 @@ void msim::run_step(const Schedule& schedule, SummaryState& st, data::Solution&
|
||||
|
||||
|
||||
|
||||
void msim::output(SummaryState& st, size_t report_step, bool /* substep */, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, EclipseIO& io) const {
|
||||
void msim::output(SummaryState& st, size_t report_step, bool substep, double seconds_elapsed, const data::Solution& sol, const data::Wells& well_data, EclipseIO& io) const {
|
||||
RestartValue value(sol, well_data);
|
||||
io.writeTimeStep(st,
|
||||
report_step,
|
||||
false,
|
||||
substep,
|
||||
seconds_elapsed,
|
||||
value);
|
||||
}
|
||||
@@ -131,6 +143,10 @@ void msim::simulate(const Schedule& schedule, const SummaryState& st, data::Solu
|
||||
|
||||
for (const auto& well_pair : this->well_rates) {
|
||||
const std::string& well_name = well_pair.first;
|
||||
const auto& sched_well = schedule.getWell(well_name, report_step);
|
||||
if (sched_well.getStatus() != Well::Status::OPEN)
|
||||
continue;
|
||||
|
||||
data::Well& well = well_data[well_name];
|
||||
for (const auto& rate_pair : well_pair.second) {
|
||||
auto rate = rate_pair.first;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-common_CONFIG_VAR
|
||||
"HAS_ATTRIBUTE_UNUSED")
|
||||
HAVE_OPENMP
|
||||
)
|
||||
|
||||
# dependencies
|
||||
set (opm-common_DEPS
|
||||
@@ -14,6 +15,7 @@ set (opm-common_DEPS
|
||||
list(APPEND opm-common_DEPS
|
||||
# various runtime library enhancements
|
||||
"Boost 1.44.0 COMPONENTS system unit_test_framework REQUIRED"
|
||||
"OpenMP QUIET"
|
||||
)
|
||||
|
||||
find_package_deps(opm-common)
|
||||
|
||||
@@ -33,10 +33,26 @@ public:
|
||||
lineno(lno)
|
||||
{}
|
||||
|
||||
static Location serializeObject()
|
||||
{
|
||||
Location result;
|
||||
result.filename = "test";
|
||||
result.lineno = 1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const Location& data) const {
|
||||
return filename == data.filename &&
|
||||
lineno == data.lineno;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(filename);
|
||||
serializer(lineno);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -39,12 +39,21 @@ namespace Opm {
|
||||
month == data.month &&
|
||||
day == data.day;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(year);
|
||||
serializer(month);
|
||||
serializer(day);
|
||||
}
|
||||
};
|
||||
|
||||
TimeStampUTC() = default;
|
||||
|
||||
explicit TimeStampUTC(const std::time_t tp);
|
||||
explicit TimeStampUTC(const YMD& ymd);
|
||||
TimeStampUTC(int year, int month, int day);
|
||||
TimeStampUTC(const YMD& ymd,
|
||||
int hour,
|
||||
int minutes,
|
||||
@@ -68,7 +77,18 @@ namespace Opm {
|
||||
int seconds() const { return this->seconds_; }
|
||||
int microseconds() const { return this->usec_; }
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
ymd_.serializeOp(serializer);
|
||||
serializer(hour_);
|
||||
serializer(minutes_);
|
||||
serializer(seconds_);
|
||||
serializer(usec_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
YMD ymd_{};
|
||||
int hour_{0};
|
||||
int minutes_{0};
|
||||
@@ -78,6 +98,7 @@ 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);
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
||||
@@ -44,16 +44,20 @@ public:
|
||||
template <typename T>
|
||||
const std::vector<T>& getRft(const std::string& name, const std::string& wellName,
|
||||
int year, int month, int day) const;
|
||||
template <typename T>
|
||||
const std::vector<T>& getRft(const std::string& name, int reportIndex) const;
|
||||
|
||||
std::vector<std::string> listOfWells() const;
|
||||
std::vector<RftDate> listOfdates() const;
|
||||
|
||||
using RftReportList = std::vector<std::pair<std::string, RftDate>>;
|
||||
using RftReportList = std::vector<std::tuple<std::string, RftDate, float>>;
|
||||
const RftReportList& listOfRftReports() const { return rftReportList; }
|
||||
|
||||
bool hasRft(const std::string& wellName, const RftDate& date) const;
|
||||
bool hasRft(const std::string& wellName, int year, int month, int day) const;
|
||||
|
||||
std::vector<EclEntry> listOfRftArrays(int reportIndex ) const;
|
||||
|
||||
std::vector<EclEntry> listOfRftArrays(const std::string& wellName,
|
||||
const RftDate& date) const;
|
||||
|
||||
@@ -63,8 +67,12 @@ public:
|
||||
bool hasArray(const std::string& arrayName, const std::string& wellName,
|
||||
const RftDate& date) const;
|
||||
|
||||
bool hasArray(const std::string& arrayName, int reportInd) const;
|
||||
|
||||
int numberOfReports() { return numReports; }
|
||||
|
||||
private:
|
||||
std::map<int, std::pair<int,int>> arrIndexRange;
|
||||
std::map<int, std::tuple<int,int>> arrIndexRange;
|
||||
int numReports;
|
||||
std::vector<float> timeList;
|
||||
|
||||
@@ -72,9 +80,11 @@ private:
|
||||
std::set<RftDate> dateList;
|
||||
RftReportList rftReportList;
|
||||
|
||||
std::map<std::pair<std::string,RftDate>,int> reportIndex; // mapping report index to wellName and date (tupe)
|
||||
std::map<std::tuple<std::string,RftDate>,int> reportIndices; // mapping report index to wellName and date (tupe)
|
||||
|
||||
int getReportIndex(const std::string& wellName, const RftDate& date) const;
|
||||
|
||||
int getArrayIndex(const std::string& name, int reportIndex) const;
|
||||
int getArrayIndex(const std::string& name, const std::string& wellName,
|
||||
const RftDate& date) const;
|
||||
};
|
||||
|
||||
79
opm/io/eclipse/ERsm.hpp
Normal file
79
opm/io/eclipse/ERsm.hpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_IO_ERSM_HPP
|
||||
#define OPM_IO_ERSM_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/io/eclipse/SummaryNode.hpp>
|
||||
#include <opm/common/utility/TimeService.hpp>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
/*
|
||||
Small class to load RSM files. The RSM file is a text based version of the
|
||||
information found in the summary file. The format seems quite fragile - with
|
||||
significant whitespace all over the place.The ambition of this ERsm clas is to
|
||||
be able to do regression testing of the RSM files we export from the ESmry
|
||||
class - it is not meant to be a rock-solid-works-in-every-lunar phase RSM
|
||||
loader.
|
||||
*/
|
||||
class ESmry;
|
||||
|
||||
class ERsm
|
||||
{
|
||||
|
||||
struct Vector{
|
||||
SummaryNode header;
|
||||
std::vector<double> data;
|
||||
|
||||
Vector(SummaryNode header_, std::size_t size_advice) :
|
||||
header(std::move(header_))
|
||||
{
|
||||
this->data.reserve(size_advice);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
ERsm(const std::string& fname);
|
||||
|
||||
const std::vector<TimeStampUTC>& dates() const;
|
||||
const std::vector<double>& days() const;
|
||||
bool has_dates() const;
|
||||
|
||||
const std::vector<double>& get(const std::string& key) const;
|
||||
bool has(const std::string& key) const;
|
||||
private:
|
||||
void load_block(std::deque<std::string>& lines , std::size_t& vector_length);
|
||||
|
||||
std::unordered_map<std::string, Vector> vectors;
|
||||
std::variant<std::vector<double>, std::vector<TimeStampUTC>> time;
|
||||
};
|
||||
|
||||
bool cmp(const ESmry& esmr, const ERsm& ersm);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
}
|
||||
|
||||
int count(const std::string& name, int reportStepNumber) const;
|
||||
size_t numberOfReportSteps() const { return seqnum.size(); };
|
||||
|
||||
const std::vector<int>& listOfReportStepNumbers() const { return seqnum; }
|
||||
|
||||
|
||||
@@ -19,52 +19,124 @@
|
||||
#ifndef OPM_IO_ESMRY_HPP
|
||||
#define OPM_IO_ESMRY_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/io/eclipse/SummaryNode.hpp>
|
||||
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
using ArrSourceEntry = std::tuple<std::string, std::string, int, uint64_t>;
|
||||
using TimeStepEntry = std::tuple<int, int, uint64_t>;
|
||||
|
||||
class ESmry
|
||||
{
|
||||
public:
|
||||
|
||||
// input is smspec (or fsmspec file)
|
||||
// input is smspec (or fsmspec file)
|
||||
explicit ESmry(const std::string& filename, bool loadBaseRunData=false);
|
||||
|
||||
|
||||
int numberOfVectors() const { return nVect; }
|
||||
|
||||
bool hasKey(const std::string& key) const;
|
||||
|
||||
const std::vector<float>& get(const std::string& name) const;
|
||||
const std::vector<float>& get(const SummaryNode& node) const;
|
||||
std::vector<std::chrono::system_clock::time_point> dates() const;
|
||||
|
||||
std::vector<float> get_at_rstep(const std::string& name) const;
|
||||
std::vector<float> get_at_rstep(const SummaryNode& node) const;
|
||||
std::vector<std::chrono::system_clock::time_point> dates_at_rstep() const;
|
||||
|
||||
const std::vector<std::string>& keywordList() const { return keyword; }
|
||||
void LoadData(const std::vector<std::string>& vectList) const;
|
||||
void LoadData() const;
|
||||
|
||||
std::chrono::system_clock::time_point startdate() const { return startdat; }
|
||||
|
||||
const std::vector<std::string>& keywordList() const;
|
||||
std::vector<std::string> keywordList(const std::string& pattern) const;
|
||||
const std::vector<SummaryNode>& summaryNodeList() const;
|
||||
|
||||
int timestepIdxAtReportstepStart(const int reportStep) const;
|
||||
|
||||
private:
|
||||
int nVect, nI, nJ, nK;
|
||||
size_t numberOfTimeSteps() const { return timeStepList.size(); }
|
||||
|
||||
void ijk_from_global_index(int glob, int &i, int &j, int &k) const;
|
||||
std::vector<std::vector<float>> param;
|
||||
const std::string& get_unit(const std::string& name) const;
|
||||
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;
|
||||
|
||||
private:
|
||||
Opm::filesystem::path inputFileName;
|
||||
int nI, nJ, nK, nSpecFiles;
|
||||
size_t nVect;
|
||||
|
||||
std::vector<bool> formattedFiles;
|
||||
std::vector<std::string> dataFileList;
|
||||
mutable std::vector<std::vector<float>> vectorData;
|
||||
mutable std::vector<bool> vectorLoaded;
|
||||
std::vector<TimeStepEntry> timeStepList;
|
||||
std::vector<std::map<int, int>> arrayPos;
|
||||
std::vector<std::string> keyword;
|
||||
std::map<std::string, int> keyword_index;
|
||||
std::vector<int> nParamsSpecFile;
|
||||
|
||||
std::vector<std::vector<std::string>> keywordListSpecFile;
|
||||
|
||||
std::vector<int> seqIndex;
|
||||
std::vector<float> seqTime;
|
||||
|
||||
|
||||
void ijk_from_global_index(int glob, int &i, int &j, int &k) const;
|
||||
|
||||
std::vector<SummaryNode> summaryNodes;
|
||||
std::unordered_map<std::string, std::string> kwunits;
|
||||
|
||||
std::chrono::system_clock::time_point startdat;
|
||||
|
||||
std::vector<std::string> checkForMultipleResultFiles(const Opm::filesystem::path& rootN, bool formatted) const;
|
||||
|
||||
void getRstString(const std::vector<std::string>& restartArray,
|
||||
|
||||
void getRstString(const std::vector<std::string>& restartArray,
|
||||
Opm::filesystem::path& pathRst,
|
||||
Opm::filesystem::path& rootN) const;
|
||||
|
||||
void updatePathAndRootName(Opm::filesystem::path& dir, Opm::filesystem::path& rootN) const;
|
||||
|
||||
std::string makeKeyString(const std::string& keyword, const std::string& wgname, int num) const;
|
||||
|
||||
std::string unpackNumber(const SummaryNode&) const;
|
||||
std::string lookupKey(const SummaryNode&) const;
|
||||
|
||||
|
||||
void write_block(std::ostream &, bool write_dates, const std::vector<std::string>& time_column, const std::vector<SummaryNode>&) const;
|
||||
|
||||
template <typename T>
|
||||
std::vector<T> rstep_vector(const std::vector<T>& full_vector) const {
|
||||
std::vector<T> result;
|
||||
result.reserve(seqIndex.size());
|
||||
|
||||
for (const auto& ind : seqIndex){
|
||||
result.push_back(full_vector[ind]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::tuple <std::string, uint64_t>> getListOfArrays(std::string filename, bool formatted);
|
||||
std::vector<int> makeKeywPosVector(int speInd) const;
|
||||
};
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Opm::EclIO::ESmry& smry) {
|
||||
smry.write_rsm(os);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
#endif // OPM_IO_ESMRY_HPP
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
char_array.clear();
|
||||
}
|
||||
|
||||
using EclEntry = std::tuple<std::string, eclArrType, int>;
|
||||
using EclEntry = std::tuple<std::string, eclArrType, int64_t>;
|
||||
std::vector<EclEntry> getList() const;
|
||||
|
||||
template <typename T>
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
const std::vector<T>& get(const std::string& name);
|
||||
|
||||
bool hasKey(const std::string &name) const;
|
||||
std::size_t count(const std::string& name) const;
|
||||
|
||||
const std::vector<std::string>& arrayNames() const { return array_name; }
|
||||
std::size_t size() const;
|
||||
@@ -78,9 +79,9 @@ protected:
|
||||
|
||||
std::vector<std::string> array_name;
|
||||
std::vector<eclArrType> array_type;
|
||||
std::vector<int> array_size;
|
||||
std::vector<int64_t> array_size;
|
||||
|
||||
std::vector<unsigned long int> ifStreamPos;
|
||||
std::vector<uint64_t> ifStreamPos;
|
||||
|
||||
std::map<std::string, int> array_index;
|
||||
|
||||
@@ -108,7 +109,7 @@ private:
|
||||
std::vector<bool> arrayLoaded;
|
||||
|
||||
void loadBinaryArray(std::fstream& fileH, std::size_t arrIndex);
|
||||
void loadFormattedArray(const std::string& fileStr, std::size_t arrIndex, long int fromPos);
|
||||
void loadFormattedArray(const std::string& fileStr, std::size_t arrIndex, int64_t fromPos);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <opm/io/eclipse/EclIOdata.hpp>
|
||||
#include <opm/io/eclipse/PaddedOutputString.hpp>
|
||||
#include <iostream>
|
||||
|
||||
namespace Opm { namespace EclIO { namespace OutputStream {
|
||||
class Restart;
|
||||
@@ -78,7 +79,7 @@ public:
|
||||
friend class OutputStream::SummarySpecification;
|
||||
|
||||
private:
|
||||
void writeBinaryHeader(const std::string& arrName, int size, eclArrType arrType);
|
||||
void writeBinaryHeader(const std::string& arrName, int64_t size, eclArrType arrType);
|
||||
|
||||
template <typename T>
|
||||
void writeBinaryArray(const std::vector<T>& data);
|
||||
@@ -94,6 +95,7 @@ private:
|
||||
void writeFormattedCharArray(const std::vector<std::string>& data);
|
||||
void writeFormattedCharArray(const std::vector<PaddedOutputString<8>>& data);
|
||||
|
||||
void writeArrayType(const eclArrType arrType);
|
||||
std::string make_real_string(float value) const;
|
||||
std::string make_doub_string(double value) const;
|
||||
|
||||
|
||||
@@ -27,14 +27,29 @@
|
||||
namespace Opm { namespace EclIO {
|
||||
|
||||
int flipEndianInt(int num);
|
||||
int64_t flipEndianLongInt(int64_t num);
|
||||
float flipEndianFloat(float num);
|
||||
double flipEndianDouble(double num);
|
||||
bool isEOF(std::fstream* fileH);
|
||||
|
||||
std::tuple<int, int> block_size_data_binary(eclArrType arrType);
|
||||
std::tuple<int, int, int> block_size_data_formatted(eclArrType arrType);
|
||||
|
||||
std::string trimr(const std::string &str1);
|
||||
|
||||
uint64_t sizeOnDiskBinary(int64_t num, Opm::EclIO::eclArrType arrType);
|
||||
uint64_t sizeOnDiskFormatted(const int64_t num, Opm::EclIO::eclArrType arrType);
|
||||
|
||||
void readBinaryHeader(std::fstream& fileH, std::string& tmpStrName,
|
||||
int& tmpSize, std::string& tmpStrType);
|
||||
|
||||
void readBinaryHeader(std::fstream& fileH, std::string& arrName,
|
||||
int64_t& size, Opm::EclIO::eclArrType &arrType);
|
||||
|
||||
void readFormattedHeader(std::fstream& fileH, std::string& arrName,
|
||||
int64_t &num, Opm::EclIO::eclArrType &arrType);
|
||||
|
||||
|
||||
}} // namespace Opm::EclIO
|
||||
|
||||
#endif // OPM_IO_ECLUTIL_HPP
|
||||
|
||||
77
opm/io/eclipse/SummaryNode.hpp
Normal file
77
opm/io/eclipse/SummaryNode.hpp
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
Copyright 2020 Equinor ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_IO_SUMMARYNODE_HPP
|
||||
#define OPM_IO_SUMMARYNODE_HPP
|
||||
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace Opm::EclIO {
|
||||
|
||||
struct SummaryNode {
|
||||
enum class Category {
|
||||
Aquifer,
|
||||
Well,
|
||||
Group,
|
||||
Field,
|
||||
Region,
|
||||
Block,
|
||||
Connection,
|
||||
Segment,
|
||||
Miscellaneous,
|
||||
};
|
||||
|
||||
enum class Type {
|
||||
Rate,
|
||||
Total,
|
||||
Ratio,
|
||||
Pressure,
|
||||
Count,
|
||||
Mode,
|
||||
Undefined,
|
||||
};
|
||||
|
||||
std::string keyword;
|
||||
Category category;
|
||||
Type type;
|
||||
std::string wgname;
|
||||
int number;
|
||||
|
||||
constexpr static int default_number { std::numeric_limits<int>::min() };
|
||||
|
||||
std::string unique_key() const;
|
||||
|
||||
using number_renderer = std::function<std::string(const SummaryNode&)>;
|
||||
std::string unique_key(number_renderer) const;
|
||||
|
||||
bool is_user_defined() const;
|
||||
|
||||
static Category category_from_keyword(const std::string&, const std::unordered_set<std::string> &miscellaneous_keywords = {});
|
||||
|
||||
std::optional<std::string> display_name() const;
|
||||
std::optional<std::string> display_number() const;
|
||||
std::optional<std::string> display_number(number_renderer) const;
|
||||
};
|
||||
|
||||
} // namespace Opm::EclIO
|
||||
|
||||
#endif // OPM_IO_SUMMARYNODE_HPP
|
||||
@@ -31,9 +31,10 @@ namespace RestartIO {
|
||||
class Header;
|
||||
|
||||
struct RstConnection {
|
||||
RstConnection(const ::Opm::UnitSystem& unit_system, const int* icon, const float* scon, const double *xcon);
|
||||
RstConnection(const ::Opm::UnitSystem& unit_system, std::size_t rst_index, int nsconz, const int* icon, const float* scon, const double *xcon);
|
||||
static double inverse_peaceman(double cf, double kh, double rw, double skin);
|
||||
|
||||
int insert_index;
|
||||
std::size_t rst_index;
|
||||
std::array<int,3> ijk;
|
||||
Connection::State state;
|
||||
int drain_sat_table;
|
||||
@@ -41,8 +42,10 @@ struct RstConnection {
|
||||
int completion;
|
||||
Connection::Direction dir;
|
||||
int segment;
|
||||
Connection::CTFKind cf_kind;
|
||||
|
||||
float tran;
|
||||
float skin_factor;
|
||||
float cf;
|
||||
float depth;
|
||||
float diameter;
|
||||
float kh;
|
||||
@@ -54,6 +57,7 @@ struct RstConnection {
|
||||
double gas_rate;
|
||||
double pressure;
|
||||
double resv_rate;
|
||||
double r0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ struct RstGroup {
|
||||
double voidage_production_total;
|
||||
double water_injection_total;
|
||||
double gas_injection_total;
|
||||
double voidage_injection_total;
|
||||
double oil_production_potential;
|
||||
double water_production_potential;
|
||||
double history_total_oil_production;
|
||||
|
||||
@@ -30,7 +30,7 @@ class UnitSystem;
|
||||
namespace RestartIO {
|
||||
|
||||
struct RstSegment {
|
||||
RstSegment(const ::Opm::UnitSystem& unit_system, const int* iseg, const double * rseg);
|
||||
RstSegment(const ::Opm::UnitSystem& unit_system, int segment_number, const int* iseg, const double * rseg);
|
||||
|
||||
int segment;
|
||||
int outlet_segment;
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
#include <opm/io/eclipse/rst/header.hpp>
|
||||
#include <opm/io/eclipse/rst/group.hpp>
|
||||
#include <opm/io/eclipse/rst/well.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class UnitSystem;
|
||||
|
||||
namespace RestartIO {
|
||||
struct RstState {
|
||||
RstState(const ::Opm::UnitSystem& unit_system,
|
||||
@@ -71,12 +73,18 @@ struct RstState {
|
||||
static RstState load(EclIO::ERst& rst_file, int report_step);
|
||||
|
||||
const RstWell& get_well(const std::string& wname) const;
|
||||
|
||||
const ::Opm::UnitSystem unit_system;
|
||||
RstHeader header;
|
||||
std::vector<RstWell> wells;
|
||||
std::vector<RstGroup> groups;
|
||||
RstHeader header;
|
||||
Tuning tuning;
|
||||
|
||||
private:
|
||||
void add_groups(const ::Opm::UnitSystem& unit_system,
|
||||
const std::vector<std::string>& zgrp,
|
||||
void load_tuning(const std::vector<int>& intehead,
|
||||
const std::vector<double>& doubhead);
|
||||
|
||||
void add_groups(const std::vector<std::string>& zgrp,
|
||||
const std::vector<int>& igrp,
|
||||
const std::vector<float>& sgrp,
|
||||
const std::vector<double>& xgrp);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <opm/io/eclipse/rst/connection.hpp>
|
||||
#include <opm/io/eclipse/rst/segment.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleTypes.hpp>
|
||||
|
||||
namespace Opm {
|
||||
class UnitSystem;
|
||||
@@ -64,7 +65,7 @@ struct RstWell {
|
||||
std::string group;
|
||||
std::array<int, 2> ij;
|
||||
std::pair<int,int> k1k2;
|
||||
int wtype;
|
||||
WellType wtype;
|
||||
int active_control;
|
||||
int vfp_table;
|
||||
int pred_requested_control;
|
||||
@@ -72,6 +73,7 @@ struct RstWell {
|
||||
int hist_requested_control;
|
||||
int msw_index;
|
||||
int completion_ordering;
|
||||
int pvt_table;
|
||||
|
||||
float orat_target;
|
||||
float wrat_target;
|
||||
@@ -84,6 +86,8 @@ struct RstWell {
|
||||
float hist_grat_target;
|
||||
float hist_bhp_target;
|
||||
float datum_depth;
|
||||
float drainage_radius;
|
||||
float efficiency_factor;
|
||||
|
||||
double oil_rate;
|
||||
double water_rate;
|
||||
@@ -99,6 +103,7 @@ struct RstWell {
|
||||
double void_total;
|
||||
double water_inj_total;
|
||||
double gas_inj_total;
|
||||
double void_inj_total;
|
||||
double gas_fvf;
|
||||
double bhp_target_double;
|
||||
double hist_oil_total;
|
||||
|
||||
112
opm/output/data/Groups.hpp
Normal file
112
opm/output/data/Groups.hpp
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
Copyright 2016 Statoil ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_OUTPUT_GROUPS_HPP
|
||||
#define OPM_OUTPUT_GROUPS_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace data {
|
||||
|
||||
struct currentGroupConstraints {
|
||||
Opm::Group::ProductionCMode currentProdConstraint;
|
||||
Opm::Group::InjectionCMode currentGasInjectionConstraint;
|
||||
Opm::Group::InjectionCMode currentWaterInjectionConstraint;
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const;
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
inline currentGroupConstraints& set( Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic);
|
||||
};
|
||||
|
||||
|
||||
class Group : public std::map<std::string, Opm::data::currentGroupConstraints> {
|
||||
public:
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const {
|
||||
unsigned int size = this->size();
|
||||
buffer.write(size);
|
||||
for (const auto& witr : *this) {
|
||||
const std::string& name = witr.first;
|
||||
buffer.write(name);
|
||||
const auto& pi_constr = witr.second;
|
||||
pi_constr.write(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer) {
|
||||
unsigned int size;
|
||||
buffer.read(size);
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
std::string name;
|
||||
buffer.read(name);
|
||||
currentGroupConstraints cgc;
|
||||
cgc.read(buffer);
|
||||
this->emplace(name, cgc);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* IMPLEMENTATIONS */
|
||||
|
||||
template <class MessageBufferType>
|
||||
void currentGroupConstraints::write(MessageBufferType& buffer) const {
|
||||
buffer.write(this->currentProdConstraint);
|
||||
buffer.write(this->currentGasInjectionConstraint);
|
||||
buffer.write(this->currentWaterInjectionConstraint);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void currentGroupConstraints::read(MessageBufferType& buffer) {
|
||||
buffer.read(this->currentProdConstraint);
|
||||
buffer.read(this->currentGasInjectionConstraint);
|
||||
buffer.read(this->currentWaterInjectionConstraint);
|
||||
}
|
||||
|
||||
|
||||
inline currentGroupConstraints& currentGroupConstraints::set( Opm::Group::ProductionCMode cpc,
|
||||
Opm::Group::InjectionCMode cgic,
|
||||
Opm::Group::InjectionCMode cwic) {
|
||||
this->currentGasInjectionConstraint = cgic;
|
||||
this->currentWaterInjectionConstraint = cwic;
|
||||
this->currentProdConstraint = cpc;
|
||||
return *this;
|
||||
}
|
||||
|
||||
}} // Opm::data
|
||||
|
||||
#endif //OPM_OUTPUT_GROUPS_HPP
|
||||
@@ -150,15 +150,63 @@ namespace Opm {
|
||||
void read(MessageBufferType& buffer);
|
||||
};
|
||||
|
||||
class SegmentPressures {
|
||||
public:
|
||||
enum class Value : std::size_t {
|
||||
Pressure, PDrop, PDropHydrostatic, PDropAccel, PDropFriction,
|
||||
};
|
||||
|
||||
double& operator[](const Value i)
|
||||
{
|
||||
return this->values_[this->index(i)];
|
||||
}
|
||||
|
||||
double operator[](const Value i) const
|
||||
{
|
||||
return this->values_[this->index(i)];
|
||||
}
|
||||
|
||||
bool operator==(const SegmentPressures& segpres2) const
|
||||
{
|
||||
return this->values_ == segpres2.values_;
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void write(MessageBufferType& buffer) const
|
||||
{
|
||||
for (const auto& value : this->values_) {
|
||||
buffer.write(value);
|
||||
}
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer)
|
||||
{
|
||||
for (auto& value : this->values_) {
|
||||
buffer.read(value);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
constexpr static std::size_t numvals = 5;
|
||||
|
||||
std::array<double, numvals> values_;
|
||||
|
||||
std::size_t index(const Value ix) const
|
||||
{
|
||||
return static_cast<std::size_t>(ix);
|
||||
}
|
||||
};
|
||||
|
||||
struct Segment {
|
||||
Rates rates;
|
||||
double pressure;
|
||||
SegmentPressures pressures;
|
||||
std::size_t segNumber;
|
||||
|
||||
bool operator==(const Segment& seg2) const
|
||||
{
|
||||
return rates == seg2.rates &&
|
||||
pressure == seg2.pressure &&
|
||||
pressures == seg2.pressures &&
|
||||
segNumber == seg2.segNumber;
|
||||
}
|
||||
|
||||
@@ -210,6 +258,30 @@ namespace Opm {
|
||||
template <class MessageBufferType>
|
||||
void read(MessageBufferType& buffer);
|
||||
|
||||
const Connection* find_connection(Connection::global_index connection_grid_index) const {
|
||||
const auto connection = std::find_if( this->connections.begin() ,
|
||||
this->connections.end() ,
|
||||
[=]( const Connection& c ) {
|
||||
return c.index == connection_grid_index; });
|
||||
|
||||
if( connection == this->connections.end() )
|
||||
return nullptr;
|
||||
|
||||
return &*connection;
|
||||
}
|
||||
|
||||
Connection* find_connection(Connection::global_index connection_grid_index) {
|
||||
auto connection = std::find_if( this->connections.begin() ,
|
||||
this->connections.end() ,
|
||||
[=]( const Connection& c ) {
|
||||
return c.index == connection_grid_index; });
|
||||
|
||||
if( connection == this->connections.end() )
|
||||
return nullptr;
|
||||
|
||||
return &*connection;
|
||||
}
|
||||
|
||||
bool operator==(const Well& well2) const
|
||||
{
|
||||
return rates == well2.rates &&
|
||||
@@ -428,7 +500,7 @@ namespace Opm {
|
||||
void Segment::write(MessageBufferType& buffer) const {
|
||||
buffer.write(this->segNumber);
|
||||
this->rates.write(buffer);
|
||||
buffer.write(this->pressure);
|
||||
this->pressures.write(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
@@ -506,7 +578,7 @@ namespace Opm {
|
||||
void Segment::read(MessageBufferType& buffer) {
|
||||
buffer.read(this->segNumber);
|
||||
this->rates.read(buffer);
|
||||
buffer.read(this->pressure);
|
||||
this->pressures.read(buffer);
|
||||
}
|
||||
|
||||
template <class MessageBufferType>
|
||||
|
||||
@@ -72,14 +72,14 @@ public:
|
||||
const std::vector<std::string> restart_group_keys = {"GOPP", "GWPP", "GOPR", "GWPR", "GGPR",
|
||||
"GVPR", "GWIR", "GGIR", "GWCT", "GGOR",
|
||||
"GOPT", "GWPT", "GGPT", "GVPT", "GWIT",
|
||||
"GGIT",
|
||||
"GGIT", "GVIT",
|
||||
"GOPTH", "GWPTH", "GGPTH",
|
||||
"GWITH", "GGITH"};
|
||||
|
||||
const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR",
|
||||
"FVPR", "FWIR", "FGIR", "FWCT", "FGOR",
|
||||
"FOPT", "FWPT", "FGPT", "FVPT", "FWIT",
|
||||
"FGIT",
|
||||
"FGIT", "FVIT",
|
||||
"FOPTH", "FWPTH", "FGPTH",
|
||||
"FWITH", "FGITH"};
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
{"GVPT", 13},
|
||||
{"GWIT", 15},
|
||||
{"GGIT", 16},
|
||||
{"GVIT", 17},
|
||||
{"GOPP", 22},
|
||||
{"GWPP", 23},
|
||||
{"GOPTH", 135},
|
||||
@@ -135,6 +136,7 @@ public:
|
||||
{"FVPT", 13},
|
||||
{"FWIT", 15},
|
||||
{"FGIT", 16},
|
||||
{"FVIT", 17},
|
||||
{"FOPP", 22},
|
||||
{"FWPP", 23},
|
||||
{"FOPTH", 135},
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef OPM_OUTPUT_SUMMARY_HPP
|
||||
#define OPM_OUTPUT_SUMMARY_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -36,6 +38,7 @@ namespace Opm {
|
||||
|
||||
namespace Opm { namespace data {
|
||||
class WellRates;
|
||||
class Group;
|
||||
}} // namespace Opm::data
|
||||
|
||||
namespace Opm { namespace out {
|
||||
@@ -62,12 +65,14 @@ public:
|
||||
const EclipseState& es,
|
||||
const Schedule& schedule,
|
||||
const data::WellRates& well_solution,
|
||||
const data::Group& group_solution,
|
||||
const GlobalProcessParameters& single_values,
|
||||
const RegionParameters& region_values = {},
|
||||
const BlockValues& block_values = {}) const;
|
||||
|
||||
void write() const;
|
||||
|
||||
|
||||
private:
|
||||
class SummaryImplementation;
|
||||
std::unique_ptr<SummaryImplementation> pImpl_;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
Diameter = 2, // Connection diameter
|
||||
|
||||
EffectiveKH = 3, // Effective Kh product of connection
|
||||
|
||||
SkinFactor = 4, // Skinfactor - item 'SKIN' from COMPDAT
|
||||
item12 = 11, // Connection transmissibility factor
|
||||
|
||||
SegDistEnd = 20, // Distance to end of connection in segment
|
||||
|
||||
@@ -30,6 +30,23 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
TsInit = 1, // Maximum Length of Next Timestep
|
||||
TsMaxz = 2, // Maximum Length of Timestep After Next
|
||||
TsMinz = 3, // Minumum Length of All Timesteps
|
||||
TsMchp = 4,
|
||||
TsFMax = 5,
|
||||
TsFMin = 6,
|
||||
TsFcnv = 7,
|
||||
TrgTTE = 8,
|
||||
TrgCNV = 9,
|
||||
TrgMBE = 10,
|
||||
TrgLCV = 11,
|
||||
XxxTTE = 16,
|
||||
XxxCNV = 17,
|
||||
XxxMBE = 18,
|
||||
XxxLCV = 19,
|
||||
XxxWFL = 20,
|
||||
TrgDPR = 82,
|
||||
TfDiff = 83,
|
||||
DdpLim = 84,
|
||||
DdsLim = 85,
|
||||
GRpar_a = 87, // Guiderate parameter A
|
||||
GRpar_b = 88, // Guiderate parameter B
|
||||
GRpar_c = 89, // Guiderate parameter C
|
||||
@@ -37,6 +54,10 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
GRpar_e = 91, // Guiderate parameter E
|
||||
GRpar_f = 92, // Guiderate parameter F
|
||||
GRpar_int = 97, // Guiderate parameter delay interval
|
||||
ThrUPT = 99,
|
||||
XxxDPR = 100,
|
||||
TrgFIP = 101,
|
||||
TrgSFT = 102,
|
||||
GRpar_damp = 144, // Guiderate parameter damping factor
|
||||
UdqPar_2 = 212, // UDQPARAM item number 2 (Permitted range (+/-) of user-defined quantities)
|
||||
UdqPar_3 = 213, // UDQPARAM item number 3 (Value given to undefined elements when outputting data)
|
||||
|
||||
@@ -67,8 +67,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
VoidPrTotal = 13, // Group's total cumulative reservoir
|
||||
// voidage production
|
||||
|
||||
WatInjTotal = 15, // Group's total cumulative water injection
|
||||
GasInjTotal = 16, // Group's total cumulative gas injection
|
||||
WatInjTotal = 15, // Group's total cumulative water injection
|
||||
GasInjTotal = 16, // Group's total cumulative gas injection
|
||||
VoidInjTotal = 17, // Group's total cumulative reservoir volume injection
|
||||
|
||||
OilPrPot = 22, // Group's oil production potential
|
||||
WatPrPot = 23, // Group's water production potential
|
||||
|
||||
@@ -62,12 +62,6 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
};
|
||||
|
||||
namespace Value {
|
||||
enum WellType : int {
|
||||
Producer = 1, // Well is producer
|
||||
OilInj = 2, // Well is oil injector
|
||||
WatInj = 3, // Well is water injector
|
||||
GasInj = 4, // Well is gas injector
|
||||
};
|
||||
|
||||
enum WellCtrlMode : int {
|
||||
WMCtlUnk = -10, // Unknown well control mode (OPM only)
|
||||
@@ -120,6 +114,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
|
||||
DatumDepth = 9, // Well's reference depth for BHP
|
||||
|
||||
DrainageRadius = 17, // Well's drainage radius - item 7 from WELSPECS
|
||||
EfficiencyFactor1 = 24, // Item2 from WEFAC; this value is repeated at two locations.
|
||||
EfficiencyFactor2 = 31, //
|
||||
HistLiqRateTarget = 33, // Well's historical/observed liquid
|
||||
// rate target/limit
|
||||
|
||||
@@ -149,8 +146,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
VoidPrTotal = 21, // Well's total cumulative reservoir
|
||||
// voidage production
|
||||
|
||||
WatInjTotal = 23, // Well's total cumulative water injection
|
||||
GasInjTotal = 24, // Well's total cumulative gas injection
|
||||
WatInjTotal = 23, // Well's total cumulative water injection
|
||||
GasInjTotal = 24, // Well's total cumulative gas injection
|
||||
VoidInjTotal = 25, // Well's total cumulative reservoir volume injection
|
||||
|
||||
GasFVF = 34, // Well's producing gas formation volume factor.
|
||||
|
||||
|
||||
46
opm/output/eclipse/WriteRPT.hpp
Normal file
46
opm/output/eclipse/WriteRPT.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright (c) 2020 Equinor ASA
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_WRITE_RPT_HPP
|
||||
#define OPM_WRITE_RPT_HPP
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Schedule;
|
||||
class EclipseGrid;
|
||||
|
||||
namespace RptIO {
|
||||
|
||||
void write_report(
|
||||
std::ostream&,
|
||||
const std::string& report,
|
||||
unsigned value,
|
||||
const Schedule& schedule,
|
||||
const EclipseGrid& grid,
|
||||
std::size_t time_step
|
||||
);
|
||||
|
||||
namespace workers {
|
||||
|
||||
void write_WELSPECS(std::ostream&, unsigned, const Schedule&, const EclipseGrid& grid, std::size_t);
|
||||
|
||||
} } }
|
||||
#endif // OPM_WRITE_RPT_HPP
|
||||
@@ -22,11 +22,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Missing definitions (really belong in ert/ecl_well/well_const.h, but not
|
||||
// defined there)
|
||||
#define SCON_KH_INDEX 3
|
||||
|
||||
|
||||
// Forward declarations
|
||||
|
||||
namespace Opm {
|
||||
@@ -43,8 +38,6 @@ namespace Opm {
|
||||
|
||||
namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
|
||||
const double UNIMPLEMENTED_VALUE = 1e-100; // placeholder for values not yet available
|
||||
|
||||
std::vector<double>
|
||||
createDoubHead(const EclipseState& es,
|
||||
const Schedule& sched,
|
||||
@@ -52,15 +45,14 @@ namespace Opm { namespace RestartIO { namespace Helpers {
|
||||
const double simTime,
|
||||
const double nextTimeStep);
|
||||
|
||||
|
||||
|
||||
std::vector<int>
|
||||
createInteHead(const EclipseState& es,
|
||||
const EclipseGrid& grid,
|
||||
const Schedule& sched,
|
||||
const double simTime,
|
||||
const int num_solver_steps,
|
||||
const int lookup_step); // The integer index used to look up dynamic properties, e.g. the number of well.
|
||||
const int report_step,
|
||||
const int lookup_step);
|
||||
|
||||
std::vector<bool>
|
||||
createLogiHead(const EclipseState& es);
|
||||
|
||||
@@ -77,6 +77,10 @@ namespace Opm {
|
||||
const DeckKeyword& getKeyword( size_t index ) const {
|
||||
return getKeyword( Keyword::keywordName, index );
|
||||
}
|
||||
template< class Keyword >
|
||||
std::size_t count() const {
|
||||
return count( Keyword::keywordName );
|
||||
}
|
||||
|
||||
const std::vector< const DeckKeyword* > getKeywordList( const std::string& keyword ) const;
|
||||
template< class Keyword >
|
||||
@@ -122,14 +126,9 @@ namespace Opm {
|
||||
using iterator = std::vector< DeckKeyword >::iterator;
|
||||
|
||||
Deck();
|
||||
|
||||
Deck( const Deck& );
|
||||
Deck(const std::vector<DeckKeyword>& keywords,
|
||||
const UnitSystem& defUnits,
|
||||
const UnitSystem* activeUnits,
|
||||
const std::string& dataFile,
|
||||
const std::string& inputPath,
|
||||
size_t accessCount);
|
||||
|
||||
static Deck serializeObject();
|
||||
|
||||
Deck& operator=(const Deck& rhs);
|
||||
bool operator==(const Deck& data) const;
|
||||
@@ -155,9 +154,19 @@ namespace Opm {
|
||||
void write( DeckOutput& output ) const ;
|
||||
friend std::ostream& operator<<(std::ostream& os, const Deck& deck);
|
||||
|
||||
const std::vector<DeckKeyword>& keywords() const;
|
||||
std::size_t unitSystemAccessCount() const;
|
||||
const std::unique_ptr<UnitSystem>& activeUnitSystem() const;
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(keywordList);
|
||||
defaultUnits.serializeOp(serializer);
|
||||
serializer(activeUnits);
|
||||
serializer(m_dataFile);
|
||||
serializer(input_path);
|
||||
serializer(unit_system_access_count);
|
||||
if (!serializer.isSerializing())
|
||||
this->init(this->keywordList.begin(), this->keywordList.end());
|
||||
}
|
||||
|
||||
private:
|
||||
Deck(std::vector<DeckKeyword>&& keywordList);
|
||||
|
||||
|
||||
@@ -39,21 +39,14 @@ namespace Opm {
|
||||
|
||||
DeckItem() = default;
|
||||
DeckItem( const std::string&, int);
|
||||
DeckItem( const std::string&, RawString);
|
||||
DeckItem( const std::string&, std::string);
|
||||
DeckItem( const std::string&, double) = delete;
|
||||
DeckItem( const std::string&, UDAValue) = delete;
|
||||
DeckItem( const std::string&, UDAValue, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
|
||||
DeckItem( const std::string&, double, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
|
||||
DeckItem(const std::vector<double>& dVec,
|
||||
const std::vector<int>& iVec,
|
||||
const std::vector<std::string>& sVec,
|
||||
const std::vector<UDAValue>& uVec,
|
||||
type_tag type,
|
||||
const std::string& itemName,
|
||||
const std::vector<value::status>& valueStat,
|
||||
bool rawdata,
|
||||
const std::vector<Dimension>& activeDim,
|
||||
const std::vector<Dimension>& defDim);
|
||||
|
||||
static DeckItem serializeObject();
|
||||
|
||||
const std::string& name() const;
|
||||
|
||||
@@ -88,6 +81,7 @@ namespace Opm {
|
||||
void push_back( int );
|
||||
void push_back( double );
|
||||
void push_back( std::string );
|
||||
void push_back( RawString );
|
||||
void push_back( UDAValue, size_t );
|
||||
void push_back( int, size_t );
|
||||
void push_back( double, size_t );
|
||||
@@ -96,6 +90,7 @@ namespace Opm {
|
||||
void push_backDefault( int );
|
||||
void push_backDefault( double );
|
||||
void push_backDefault( std::string );
|
||||
void push_backDefault( RawString );
|
||||
// trying to access the data of a "dummy default item" will raise an exception
|
||||
|
||||
template <typename T>
|
||||
@@ -127,16 +122,6 @@ namespace Opm {
|
||||
bool operator!=(const DeckItem& other) const;
|
||||
static bool to_bool(std::string string_value);
|
||||
|
||||
const std::vector<double>& dVal() const;
|
||||
const std::vector<int>& iVal() const;
|
||||
const std::vector<std::string>& sVal() const;
|
||||
const std::vector<UDAValue>& uVal() const;
|
||||
|
||||
const std::vector<value::status>& valueStatus() const;
|
||||
bool rawData() const;
|
||||
const std::vector<Dimension>& activeDimensions() const;
|
||||
const std::vector<Dimension>& defaultDimensions() const;
|
||||
|
||||
bool is_uda() { return (type == get_type< UDAValue >()); };
|
||||
bool is_double() { return type == get_type< double >(); };
|
||||
bool is_int() { return type == get_type< int >() ; };
|
||||
@@ -144,10 +129,26 @@ namespace Opm {
|
||||
|
||||
UDAValue& get_uda() { return uval[0]; };
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(dval);
|
||||
serializer(ival);
|
||||
serializer(sval);
|
||||
serializer.vector(uval);
|
||||
serializer(type);
|
||||
serializer(item_name);
|
||||
serializer.template vector<value::status, false>(value_status);
|
||||
serializer(raw_data);
|
||||
serializer.vector(active_dimensions);
|
||||
serializer.vector(default_dimensions);
|
||||
}
|
||||
|
||||
private:
|
||||
mutable std::vector< double > dval;
|
||||
std::vector< int > ival;
|
||||
std::vector< std::string > sval;
|
||||
std::vector< RawString > rsval;
|
||||
std::vector< UDAValue > uval;
|
||||
|
||||
type_tag type = type_tag::unknown;
|
||||
|
||||
@@ -47,12 +47,8 @@ namespace Opm {
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<std::vector<DeckValue>>& record_list, UnitSystem& system_active, UnitSystem& system_default);
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<int>& data);
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<double>& data, UnitSystem& system_active, UnitSystem& system_default);
|
||||
DeckKeyword(const std::string& kwName,
|
||||
const Location& loc,
|
||||
const std::vector<DeckRecord>& record,
|
||||
bool dataKw,
|
||||
bool slashTerminated);
|
||||
|
||||
static DeckKeyword serializeObject();
|
||||
|
||||
const std::string& name() const;
|
||||
void setFixedSize();
|
||||
@@ -63,13 +59,11 @@ namespace Opm {
|
||||
void addRecord(DeckRecord&& record);
|
||||
const DeckRecord& getRecord(size_t index) const;
|
||||
DeckRecord& getRecord(size_t index);
|
||||
const std::vector<DeckRecord>& records() const;
|
||||
const DeckRecord& getDataRecord() const;
|
||||
void setDataKeyword(bool isDataKeyword = true);
|
||||
void setDoubleRecordKeyword(bool isDoubleRecordKeyword = true);
|
||||
bool isDataKeyword() const;
|
||||
bool isDoubleRecordKeyword() const;
|
||||
bool isSlashTerminated() const;
|
||||
|
||||
const std::vector<int>& getIntData() const;
|
||||
const std::vector<double>& getRawDoubleData() const;
|
||||
@@ -97,6 +91,18 @@ namespace Opm {
|
||||
bool operator!=(const DeckKeyword& other) const;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const DeckKeyword& keyword);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_keywordName);
|
||||
m_location.serializeOp(serializer);
|
||||
serializer.vector(m_recordList);
|
||||
serializer(m_isDataKeyword);
|
||||
serializer(m_slashTerminated);
|
||||
serializer(m_isDoubleRecordKeyword);
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_keywordName;
|
||||
Location m_location;
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Opm {
|
||||
DeckRecord() = default;
|
||||
DeckRecord( std::vector< DeckItem >&& );
|
||||
|
||||
static DeckRecord serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
void addItem( DeckItem deckItem );
|
||||
|
||||
@@ -70,7 +72,11 @@ namespace Opm {
|
||||
bool operator==(const DeckRecord& other) const;
|
||||
bool operator!=(const DeckRecord& other) const;
|
||||
|
||||
const std::vector<DeckItem>& getItems() const;
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_items);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector< DeckItem > m_items;
|
||||
|
||||
@@ -34,10 +34,12 @@ public:
|
||||
UDAValue();
|
||||
explicit UDAValue(double);
|
||||
explicit UDAValue(const std::string&);
|
||||
UDAValue(const UDAValue& src, const Dimension& dim);
|
||||
explicit UDAValue(const Dimension& dim);
|
||||
UDAValue(double data, const Dimension& dim);
|
||||
UDAValue(const std::string& data, const Dimension& dim);
|
||||
|
||||
static UDAValue serializeObject();
|
||||
|
||||
/*
|
||||
The get<double>() and get<std::string>() methods will throw an
|
||||
exception if the internal type and the template parameter disagree.
|
||||
@@ -55,25 +57,31 @@ public:
|
||||
template<typename T>
|
||||
bool is() const;
|
||||
|
||||
void reset(double value);
|
||||
void reset(const std::string& value);
|
||||
|
||||
void assert_numeric() const;
|
||||
void assert_numeric(const std::string& error_msg) const;
|
||||
const Dimension& get_dim() const;
|
||||
|
||||
bool operator==(const UDAValue& other) const;
|
||||
bool operator!=(const UDAValue& other) const;
|
||||
UDAValue& operator=(double value);
|
||||
UDAValue& operator=(const std::string& value);
|
||||
|
||||
bool is_numeric() { return numeric_value; }
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(numeric_value);
|
||||
serializer(double_value);
|
||||
serializer(string_value);
|
||||
dim.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
bool numeric_value;
|
||||
double double_value;
|
||||
std::string string_value;
|
||||
|
||||
/* This 'mutable' modifier is a hack to avoid tampering with the overall
|
||||
const-ness of the data in a deck item. */
|
||||
Dimension dim;
|
||||
};
|
||||
|
||||
|
||||
@@ -66,6 +66,15 @@ namespace Opm {
|
||||
this->face_dir == other.face_dir;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(aquiferID);
|
||||
serializer(global_index);
|
||||
serializer(influx_coeff);
|
||||
serializer(influx_mult);
|
||||
serializer(face_dir);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -73,13 +82,21 @@ namespace Opm {
|
||||
Aquancon(const EclipseGrid& grid, const Deck& deck);
|
||||
Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
|
||||
static Aquancon serializeObject();
|
||||
|
||||
const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data() const;
|
||||
bool operator==(const Aquancon& other) const;
|
||||
bool active() const;
|
||||
|
||||
const std::vector<Aquancon::AquancCell> operator[](int aquiferID) const;
|
||||
private:
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.map(cells);
|
||||
}
|
||||
|
||||
private:
|
||||
static bool cellInsideReservoirAndActive(const EclipseGrid& grid, int i, int j, int k);
|
||||
static bool neighborCellInsideReservoirAndActive(const EclipseGrid& grid, int i, int j, int k, FaceDir::DirEnum faceDir);
|
||||
|
||||
|
||||
@@ -83,16 +83,47 @@ namespace Opm {
|
||||
std::vector<int> cell_id;
|
||||
|
||||
bool operator==(const AQUCT_data& other) const;
|
||||
|
||||
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(cell_id);
|
||||
}
|
||||
};
|
||||
|
||||
AquiferCT() = default;
|
||||
AquiferCT(const TableManager& tables, const Deck& deck);
|
||||
AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
|
||||
|
||||
static AquiferCT serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
std::vector<AquiferCT::AQUCT_data>::const_iterator begin() const;
|
||||
std::vector<AquiferCT::AQUCT_data>::const_iterator end() const;
|
||||
const std::vector<AquiferCT::AQUCT_data>& data() const;
|
||||
bool operator==(const AquiferCT& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_aquct);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<AquiferCT::AQUCT_data> m_aquct;
|
||||
};
|
||||
|
||||
@@ -36,11 +36,22 @@ public:
|
||||
AquiferConfig(const TableManager& tables, const EclipseGrid& grid, const Deck& deck);
|
||||
AquiferConfig(const Aquifetp& fetp, const AquiferCT& ct, const Aquancon& conn);
|
||||
|
||||
static AquiferConfig serializeObject();
|
||||
|
||||
bool active() const;
|
||||
const AquiferCT& ct() const;
|
||||
const Aquifetp& fetp() const;
|
||||
const Aquancon& connections() const;
|
||||
bool operator==(const AquiferConfig& other);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
aquifetp.serializeOp(serializer);
|
||||
aquiferct.serializeOp(serializer);
|
||||
aqconn.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
Aquifetp aquifetp;
|
||||
AquiferCT aquiferct;
|
||||
|
||||
@@ -49,17 +49,39 @@ class Aquifetp {
|
||||
V0, // initial volume of water in aquifer
|
||||
d0; // aquifer datum depth
|
||||
std::pair<bool, double> p0;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(aquiferID);
|
||||
serializer(pvttableID);
|
||||
serializer(J);
|
||||
serializer(C_t);
|
||||
serializer(V0);
|
||||
serializer(d0);
|
||||
serializer(p0);
|
||||
}
|
||||
};
|
||||
|
||||
Aquifetp() = default;
|
||||
Aquifetp(const Deck& deck);
|
||||
Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
|
||||
static Aquifetp serializeObject();
|
||||
|
||||
const std::vector<Aquifetp::AQUFETP_data>& data() const;
|
||||
|
||||
std::size_t size() const;
|
||||
std::vector<Aquifetp::AQUFETP_data>::const_iterator begin() const;
|
||||
std::vector<Aquifetp::AQUFETP_data>::const_iterator end() const;
|
||||
bool operator==(const Aquifetp& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_aqufetp);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Aquifetp::AQUFETP_data> m_aqufetp;
|
||||
};
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Opm {
|
||||
EclipseConfig(const Deck& deck);
|
||||
EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf);
|
||||
|
||||
static EclipseConfig serializeObject();
|
||||
|
||||
const InitConfig& init() const;
|
||||
IOConfig& io();
|
||||
const IOConfig& io() const;
|
||||
@@ -43,6 +45,13 @@ namespace Opm {
|
||||
|
||||
bool operator==(const EclipseConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
m_initConfig.serializeOp(serializer);
|
||||
io_config.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
InitConfig m_initConfig;
|
||||
IOConfig io_config;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/AquiferConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/TracerConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
@@ -70,6 +71,7 @@ namespace Opm {
|
||||
|
||||
EclipseState() = default;
|
||||
EclipseState(const Deck& deck);
|
||||
virtual ~EclipseState() = default;
|
||||
|
||||
const IOConfig& getIOConfig() const;
|
||||
IOConfig& getIOConfig();
|
||||
@@ -112,6 +114,27 @@ namespace Opm {
|
||||
|
||||
const Runspec& runspec() const;
|
||||
const AquiferConfig& aquifer() const;
|
||||
const TracerConfig& tracer() const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
// FieldPropsManager is handled otherwise, do not add
|
||||
m_tables.serializeOp(serializer);
|
||||
m_runspec.serializeOp(serializer);
|
||||
m_eclipseConfig.serializeOp(serializer);
|
||||
m_deckUnitSystem.serializeOp(serializer);
|
||||
m_inputNnc.serializeOp(serializer);
|
||||
m_inputEditNnc.serializeOp(serializer);
|
||||
m_gridDims.serializeOp(serializer);
|
||||
m_simulationConfig.serializeOp(serializer);
|
||||
m_transMult.serializeOp(serializer);
|
||||
m_faults.serializeOp(serializer);
|
||||
serializer(m_title);
|
||||
aquifer_config.serializeOp(serializer);
|
||||
tracer_config.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
void initIOConfigPostSchedule(const Deck& deck);
|
||||
void initTransMult();
|
||||
@@ -138,6 +161,7 @@ namespace Opm {
|
||||
FaultCollection m_faults;
|
||||
std::string m_title;
|
||||
AquiferConfig aquifer_config;
|
||||
TracerConfig tracer_config;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ public:
|
||||
/// Construct from input deck
|
||||
explicit EDITNNC(const Deck& deck);
|
||||
|
||||
explicit EDITNNC(const std::vector<NNCdata>& data);
|
||||
/// Returns an instance used for serialization test
|
||||
static EDITNNC serializeObject();
|
||||
|
||||
/// \brief Get an ordered set of EDITNNC
|
||||
const std::vector<NNCdata>& data() const
|
||||
@@ -46,6 +47,12 @@ public:
|
||||
|
||||
bool operator==(const EDITNNC& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_editnnc);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<NNCdata> m_editnnc;
|
||||
};
|
||||
|
||||
@@ -29,7 +29,8 @@ class EndpointScaling {
|
||||
public:
|
||||
EndpointScaling() noexcept = default;
|
||||
explicit EndpointScaling( const Deck& );
|
||||
EndpointScaling(const std::bitset<4>& opts);
|
||||
|
||||
static EndpointScaling serializeObject();
|
||||
|
||||
/* true if endpoint scaling is enabled, otherwise false */
|
||||
operator bool() const noexcept;
|
||||
@@ -41,10 +42,20 @@ class EndpointScaling {
|
||||
bool twopoint() const noexcept;
|
||||
bool threepoint() const noexcept;
|
||||
|
||||
unsigned long getBits() const;
|
||||
|
||||
bool operator==(const EndpointScaling& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
if (serializer.isSerializing())
|
||||
serializer(options.to_ulong());
|
||||
else {
|
||||
unsigned long bits = 0;
|
||||
serializer(bits);
|
||||
options = std::bitset<4>(bits);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
enum class option {
|
||||
any = 0,
|
||||
|
||||
@@ -154,6 +154,7 @@ namespace Opm {
|
||||
std::array<double, 3> getCellCenter(size_t i,size_t j, size_t k) const;
|
||||
std::array<double, 3> getCellCenter(size_t globalIndex) const;
|
||||
std::array<double, 3> getCornerPos(size_t i,size_t j, size_t k, size_t corner_index) const;
|
||||
std::vector<double> activeVolume() const;
|
||||
double getCellVolume(size_t globalIndex) const;
|
||||
double getCellVolume(size_t i , size_t j , size_t k) const;
|
||||
double getCellThickness(size_t globalIndex) const;
|
||||
@@ -214,43 +215,38 @@ namespace Opm {
|
||||
std::vector<int> m_global_to_active;
|
||||
|
||||
void initGridFromEGridFile(Opm::EclIO::EclFile& egridfile, std::string fileName);
|
||||
void resetACTNUM( const int* actnum);
|
||||
|
||||
void initBinaryGrid(const Deck& deck);
|
||||
|
||||
void initCornerPointGrid(const std::array<int,3>& dims ,
|
||||
const std::vector<double>& coord ,
|
||||
void initCornerPointGrid(const std::vector<double>& coord ,
|
||||
const std::vector<double>& zcorn ,
|
||||
const int * actnum,
|
||||
const double * mapaxes);
|
||||
|
||||
bool keywInputBeforeGdfile(const Deck& deck, const std::string keyword) const;
|
||||
|
||||
void initCylindricalGrid( const std::array<int, 3>&, const Deck&);
|
||||
void initCartesianGrid( const std::array<int, 3>&, const Deck&);
|
||||
void initCornerPointGrid( const std::array<int, 3>&, const Deck&);
|
||||
void initDTOPSGrid( const std::array<int, 3>&, const Deck&);
|
||||
void initDVDEPTHZGrid( const std::array<int, 3>&, const Deck&);
|
||||
void initGrid( const std::array<int, 3>&, const Deck&);
|
||||
void assertCornerPointKeywords( const std::array<int, 3>&, const Deck&);
|
||||
void initCylindricalGrid(const Deck&);
|
||||
void initCartesianGrid(const Deck&);
|
||||
void initDTOPSGrid(const Deck&);
|
||||
void initDVDEPTHZGrid(const Deck&);
|
||||
void initGrid(const Deck&);
|
||||
void initCornerPointGrid(const Deck&);
|
||||
void assertCornerPointKeywords(const Deck&);
|
||||
|
||||
static bool hasDVDEPTHZKeywords(const Deck&);
|
||||
static bool hasDTOPSKeywords( const Deck&);
|
||||
static void assertVectorSize( const std::vector<double>& vector, size_t expectedSize, const std::string& msg);
|
||||
static std::vector<double> createTOPSVector(const std::array<int, 3>& dims, const std::vector<double>& DZ,
|
||||
const Deck&);
|
||||
static std::vector<double> createDVector(const std::array<int, 3>& dims, size_t dim, const std::string& DKey,
|
||||
const std::string& DVKey, const Deck&);
|
||||
static bool hasDTOPSKeywords(const Deck&);
|
||||
static void assertVectorSize(const std::vector<double>& vector, size_t expectedSize, const std::string& msg);
|
||||
|
||||
static std::vector<double> createTOPSVector(const std::array<int, 3>& dims, const std::vector<double>& DZ, const Deck&);
|
||||
static std::vector<double> createDVector(const std::array<int, 3>& dims, std::size_t dim, const std::string& DKey, const std::string& DVKey, const Deck&);
|
||||
static void scatterDim(const std::array<int, 3>& dims , size_t dim , const std::vector<double>& DV , std::vector<double>& D);
|
||||
|
||||
|
||||
std::vector<double> makeCoordDxDyDzTops(const std::array<int, 3>& dims, const std::vector<double>& dx, const std::vector<double>& dy, const std::vector<double>& dz, const std::vector<double>& tops) const;
|
||||
std::vector<double> makeZcornDzTops(const std::array<int, 3>& dims, const std::vector<double>& dz, const std::vector<double>& tops) const ;
|
||||
std::vector<double> makeZcornDzvDepthz(const std::array<int, 3>& dims, const std::vector<double>& dzv, const std::vector<double>& depthz) const;
|
||||
std::vector<double> makeCoordDxvDyvDzvDepthz(const std::array<int, 3>& dims, const std::vector<double>& dxv, const std::vector<double>& dyv, const std::vector<double>& dzv, const std::vector<double>& depthz) const;
|
||||
|
||||
double sumIdir(int j, int k, int i1, const std::array<int, 3>& dims, const std::vector<double>& dx) const;
|
||||
double sumJdir(int i, int k, int j1, const std::array<int, 3>& dims, const std::vector<double>& dy) const;
|
||||
double sumKdir(int i, int j, const std::array<int, 3>& dims, const std::vector<double>& dz) const;
|
||||
std::vector<double> makeCoordDxDyDzTops(const std::vector<double>& dx, const std::vector<double>& dy, const std::vector<double>& dz, const std::vector<double>& tops) const;
|
||||
std::vector<double> makeZcornDzTops(const std::vector<double>& dz, const std::vector<double>& tops) const ;
|
||||
std::vector<double> makeZcornDzvDepthz(const std::vector<double>& dzv, const std::vector<double>& depthz) const;
|
||||
std::vector<double> makeCoordDxvDyvDzvDepthz(const std::vector<double>& dxv, const std::vector<double>& dyv, const std::vector<double>& dzv, const std::vector<double>& depthz) const;
|
||||
|
||||
void getCellCorners(const std::array<int, 3>& ijk, const std::array<int, 3>& dims, std::array<double,8>& X, std::array<double,8>& Y, std::array<double,8>& Z) const;
|
||||
void getCellCorners(const std::size_t globalIndex,
|
||||
|
||||
@@ -34,9 +34,8 @@ class Fault {
|
||||
public:
|
||||
Fault() = default;
|
||||
explicit Fault(const std::string& faultName);
|
||||
Fault(const std::string& name,
|
||||
double transMult,
|
||||
const std::vector<FaultFace>& faceList);
|
||||
|
||||
static Fault serializeObject();
|
||||
|
||||
const std::string& getName() const;
|
||||
void setTransMult(double transMult);
|
||||
@@ -44,11 +43,18 @@ public:
|
||||
void addFace( FaultFace );
|
||||
std::vector< FaultFace >::const_iterator begin() const;
|
||||
std::vector< FaultFace >::const_iterator end() const;
|
||||
const std::vector<FaultFace>& getFaceList() const;
|
||||
|
||||
bool operator==( const Fault& rhs ) const;
|
||||
bool operator!=( const Fault& rhs ) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_transMult);
|
||||
serializer.vector(m_faceList);
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
double m_transMult = 0.0;
|
||||
|
||||
@@ -36,7 +36,8 @@ class FaultCollection {
|
||||
public:
|
||||
FaultCollection();
|
||||
FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
|
||||
FaultCollection(const OrderedMap<std::string, Fault>& faults);
|
||||
|
||||
static FaultCollection serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
bool hasFault(const std::string& faultName) const;
|
||||
@@ -49,10 +50,14 @@ public:
|
||||
void addFault(const std::string& faultName);
|
||||
void setTransMult(const std::string& faultName , double transMult);
|
||||
|
||||
const OrderedMap<std::string, Fault>& getFaults() const;
|
||||
|
||||
bool operator==(const FaultCollection& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
m_faults.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
void addFaultFaces(const GridDims& grid,
|
||||
const DeckRecord& faultRecord,
|
||||
|
||||
@@ -35,16 +35,23 @@ public:
|
||||
size_t J1 , size_t J2,
|
||||
size_t K1 , size_t K2,
|
||||
FaceDir::DirEnum faceDir);
|
||||
FaultFace(const std::vector<size_t>& indices, FaceDir::DirEnum faceDir);
|
||||
|
||||
static FaultFace serializeObject();
|
||||
|
||||
std::vector<size_t>::const_iterator begin() const;
|
||||
std::vector<size_t>::const_iterator end() const;
|
||||
FaceDir::DirEnum getDir() const;
|
||||
const std::vector<size_t>& getIndices() const;
|
||||
|
||||
bool operator==( const FaultFace& rhs ) const;
|
||||
bool operator!=( const FaultFace& rhs ) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_faceDir);
|
||||
serializer(m_indexList);
|
||||
}
|
||||
|
||||
private:
|
||||
static void checkCoord(size_t dim , size_t l1 , size_t l2);
|
||||
FaceDir::DirEnum m_faceDir = FaceDir::XPlus;
|
||||
|
||||
@@ -34,9 +34,10 @@ namespace Opm {
|
||||
|
||||
GridDims();
|
||||
explicit GridDims(std::array<int, 3> xyz);
|
||||
|
||||
GridDims(size_t nx, size_t ny, size_t nz);
|
||||
|
||||
static GridDims serializeObject();
|
||||
|
||||
explicit GridDims(const Deck& deck);
|
||||
|
||||
size_t getNX() const;
|
||||
@@ -59,6 +60,14 @@ namespace Opm {
|
||||
|
||||
bool operator==(const GridDims& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_nx);
|
||||
serializer(m_ny);
|
||||
serializer(m_nz);
|
||||
}
|
||||
|
||||
protected:
|
||||
size_t m_nx;
|
||||
size_t m_ny;
|
||||
|
||||
@@ -66,6 +66,17 @@ namespace Opm {
|
||||
nnc_behaviour == data.nnc_behaviour &&
|
||||
region_name == data.region_name;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(src_value);
|
||||
serializer(target_value);
|
||||
serializer(trans_mult);
|
||||
serializer(directions);
|
||||
serializer(nnc_behaviour);
|
||||
serializer(region_name);
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map< std::pair<int , int> , const MULTREGTRecord * > MULTREGTSearchMap;
|
||||
@@ -83,24 +94,31 @@ namespace Opm {
|
||||
MULTREGTScanner(const GridDims& grid,
|
||||
const FieldPropsManager* fp_arg,
|
||||
const std::vector< const DeckKeyword* >& keywords);
|
||||
MULTREGTScanner(const std::array<size_t,3>& size,
|
||||
const std::vector<MULTREGTRecord>& records,
|
||||
const ExternalSearchMap& searchMap,
|
||||
const std::map<std::string, std::vector<int>>& region,
|
||||
const std::string& defaultRegion);
|
||||
|
||||
static MULTREGTScanner serializeObject();
|
||||
|
||||
double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const;
|
||||
|
||||
std::array<size_t,3> getSize() const;
|
||||
const std::vector<MULTREGTRecord>& getRecords() const;
|
||||
ExternalSearchMap getSearchMap() const;
|
||||
const std::map<std::string, std::vector<int>>& getRegions() const;
|
||||
const std::string& getDefaultRegion() const;
|
||||
|
||||
bool operator==(const MULTREGTScanner& data) const;
|
||||
MULTREGTScanner& operator=(const MULTREGTScanner& data);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(nx);
|
||||
serializer(ny);
|
||||
serializer(nz);
|
||||
serializer.vector(m_records);
|
||||
ExternalSearchMap searchMap = getSearchMap();
|
||||
serializer(searchMap);
|
||||
if (m_searchMap.empty())
|
||||
constructSearchMap(searchMap);
|
||||
serializer(regions);
|
||||
serializer(default_region);
|
||||
}
|
||||
|
||||
private:
|
||||
ExternalSearchMap getSearchMap() const;
|
||||
void constructSearchMap(const ExternalSearchMap& searchMap);
|
||||
|
||||
void addKeyword( const DeckKeyword& deckKeyword, const std::string& defaultRegion);
|
||||
|
||||
@@ -40,6 +40,14 @@ struct NNCdata {
|
||||
trans == data.trans;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(cell1);
|
||||
serializer(cell2);
|
||||
serializer(trans);
|
||||
}
|
||||
|
||||
size_t cell1;
|
||||
size_t cell2;
|
||||
double trans;
|
||||
@@ -56,7 +64,9 @@ public:
|
||||
|
||||
/// Construct from input deck.
|
||||
explicit NNC(const Deck& deck);
|
||||
explicit NNC(const std::vector<NNCdata>& nncdata) : m_nnc(nncdata) {}
|
||||
|
||||
static NNC serializeObject();
|
||||
|
||||
void addNNC(const size_t cell1, const size_t cell2, const double trans);
|
||||
const std::vector<NNCdata>& data() const { return m_nnc; }
|
||||
size_t numNNC() const;
|
||||
@@ -64,6 +74,12 @@ public:
|
||||
|
||||
bool operator==(const NNC& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_nnc);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
std::vector<NNCdata> m_nnc;
|
||||
|
||||
@@ -49,10 +49,8 @@ namespace Opm {
|
||||
public:
|
||||
TransMult() = default;
|
||||
TransMult(const GridDims& dims, const Deck& deck, const FieldPropsManager& fp);
|
||||
TransMult(const std::array<size_t,3>& size,
|
||||
const std::map<FaceDir::DirEnum, std::vector<double>>& trans,
|
||||
const std::map<FaceDir::DirEnum, std::string>& names,
|
||||
const MULTREGTScanner& scanner);
|
||||
|
||||
static TransMult serializeObject();
|
||||
|
||||
double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const;
|
||||
double getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const;
|
||||
@@ -61,13 +59,20 @@ namespace Opm {
|
||||
void applyMULTFLT(const FaultCollection& faults);
|
||||
void applyMULTFLT(const Fault& fault);
|
||||
|
||||
std::array<size_t,3> getSize() const;
|
||||
const std::map<FaceDir::DirEnum, std::vector<double>>& getTrans() const;
|
||||
const std::map<FaceDir::DirEnum, std::string>& getNames() const;
|
||||
const MULTREGTScanner& getScanner() const;
|
||||
|
||||
bool operator==(const TransMult& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_nx);
|
||||
serializer(m_ny);
|
||||
serializer(m_nz);
|
||||
// map used to avoid explicit instances with FaceDir::DirEnum in serializer
|
||||
serializer.template map<decltype(m_trans),false>(m_trans);
|
||||
serializer.template map<decltype(m_names),false>(m_names);
|
||||
m_multregtScanner.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
size_t getGlobalIndex(size_t i , size_t j , size_t k) const;
|
||||
void assertIJK(size_t i , size_t j , size_t k) const;
|
||||
|
||||
@@ -151,15 +151,8 @@ namespace Opm {
|
||||
IOConfig() = default;
|
||||
explicit IOConfig( const Deck& );
|
||||
explicit IOConfig( const std::string& input_path );
|
||||
IOConfig(bool write_init, bool write_egrid,
|
||||
bool unifin, bool unifout,
|
||||
bool fmtin, bool fmtout,
|
||||
const std::string& deck_name,
|
||||
bool output_enabled,
|
||||
const std::string& output_dir,
|
||||
bool no_sim,
|
||||
const std::string& base_name,
|
||||
bool ecl_compatible_rst);
|
||||
|
||||
static IOConfig serializeObject();
|
||||
|
||||
void setEclCompatibleRST(bool ecl_rst);
|
||||
bool getEclCompatibleRST() const;
|
||||
@@ -169,8 +162,6 @@ namespace Opm {
|
||||
bool getUNIFIN() const;
|
||||
bool getFMTIN() const;
|
||||
bool getFMTOUT() const;
|
||||
const std::string& getDeckFileName() const;
|
||||
bool getNoSim() const;
|
||||
const std::string& getEclipseInputPath() const;
|
||||
|
||||
void overrideNOSIM(bool nosim);
|
||||
@@ -195,6 +186,23 @@ namespace Opm {
|
||||
|
||||
bool operator==(const IOConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_write_INIT_file);
|
||||
serializer(m_write_EGRID_file);
|
||||
serializer(m_UNIFIN);
|
||||
serializer(m_UNIFOUT);
|
||||
serializer(m_FMTIN);
|
||||
serializer(m_FMTOUT);
|
||||
serializer(m_deck_filename);
|
||||
serializer(m_output_enabled);
|
||||
serializer(m_output_dir);
|
||||
serializer(m_nosim);
|
||||
serializer(m_base_name);
|
||||
serializer(ecl_compatible_rst);
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_write_INIT_file = false;
|
||||
bool m_write_EGRID_file = true;
|
||||
|
||||
@@ -298,11 +298,22 @@ namespace Opm {
|
||||
RestartSchedule() = default;
|
||||
explicit RestartSchedule( size_t sched_restart);
|
||||
RestartSchedule( size_t step, size_t b, size_t freq);
|
||||
|
||||
static RestartSchedule serializeObject();
|
||||
|
||||
bool writeRestartFile( size_t timestep , const TimeMap& timemap) const;
|
||||
bool operator!=(const RestartSchedule& rhs) const;
|
||||
bool operator==( const RestartSchedule& rhs ) const;
|
||||
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(timestep);
|
||||
serializer(basic);
|
||||
serializer(frequency);
|
||||
serializer(rptsched_restart_set);
|
||||
serializer(rptsched_restart);
|
||||
}
|
||||
|
||||
//private:
|
||||
size_t timestep = 0;
|
||||
@@ -322,12 +333,8 @@ namespace Opm {
|
||||
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, T&& errors );
|
||||
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, ErrorGuard& errors );
|
||||
RestartConfig( const TimeMap& time_map, const Deck& );
|
||||
RestartConfig(const TimeMap& timeMap,
|
||||
int firstRestartStep,
|
||||
bool writeInitial,
|
||||
const DynamicState<RestartSchedule>& restart_sched,
|
||||
const DynamicState<std::map<std::string,int>>& restart_keyw,
|
||||
const std::vector<bool>& save_keyw);
|
||||
|
||||
static RestartConfig serializeObject();
|
||||
|
||||
int getFirstRestartStep() const;
|
||||
bool getWriteRestartFile(size_t timestep, bool log=true) const;
|
||||
@@ -341,17 +348,20 @@ namespace Opm {
|
||||
RestartSchedule getNode( size_t timestep ) const;
|
||||
static std::string getRestartFileName(const std::string& restart_base, int report_step, bool unified, bool fmt_file);
|
||||
|
||||
const TimeMap& timeMap() const;
|
||||
bool writeInitialRst() const;
|
||||
const DynamicState<RestartSchedule>& restartSchedule() const;
|
||||
const DynamicState<std::map<std::string,int>>& restartKeywords() const;
|
||||
const std::vector<bool>& saveKeywords() const;
|
||||
|
||||
bool operator==(const RestartConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
m_timemap.serializeOp(serializer);
|
||||
serializer(m_first_restart_step);
|
||||
serializer(m_write_initial_RST_file);
|
||||
restart_schedule.serializeOp(serializer);
|
||||
restart_keywords.serializeOp<Serializer, false>(serializer);
|
||||
serializer(save_keywords);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
/// This method will internalize variables with information of
|
||||
/// the first report step with restart and rft output
|
||||
/// respectively. This information is important because right
|
||||
|
||||
@@ -25,6 +25,20 @@ namespace Opm {
|
||||
|
||||
bool operator==(const EquilRecord& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(datum_depth);
|
||||
serializer(datum_depth_ps);
|
||||
serializer(water_oil_contact_depth);
|
||||
serializer(water_oil_contact_capillary_pressure);
|
||||
serializer(gas_oil_contact_depth);
|
||||
serializer(gas_oil_contact_capillary_pressure);
|
||||
serializer(live_oil_init_proc);
|
||||
serializer(wet_gas_init_proc);
|
||||
serializer(init_target_accuracy);
|
||||
}
|
||||
|
||||
private:
|
||||
double datum_depth;
|
||||
double datum_depth_ps;
|
||||
@@ -44,10 +58,10 @@ namespace Opm {
|
||||
|
||||
Equil() = default;
|
||||
explicit Equil( const DeckKeyword& );
|
||||
Equil(const std::vector<EquilRecord>& records);
|
||||
|
||||
static Equil serializeObject();
|
||||
|
||||
const EquilRecord& getRecord( size_t id ) const;
|
||||
const std::vector<EquilRecord>& records() const;
|
||||
|
||||
size_t size() const;
|
||||
bool empty() const;
|
||||
@@ -57,6 +71,12 @@ namespace Opm {
|
||||
|
||||
bool operator==(const Equil& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(m_records);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector< EquilRecord > m_records;
|
||||
};
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef OPM_FOAMCONFIG_HPP
|
||||
#define OPM_FOAMCONFIG_HPP
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
@@ -36,11 +38,8 @@ public:
|
||||
FoamData();
|
||||
FoamData(const DeckRecord& FOAMFSC_record, const DeckRecord& FOAMROCK_record);
|
||||
explicit FoamData(const DeckRecord& FOAMROCK_record);
|
||||
FoamData(double reference_surfactant_concentration,
|
||||
double exponent,
|
||||
double minimum_surfactant_concentration,
|
||||
bool allow_desorption,
|
||||
double rock_density);
|
||||
|
||||
static FoamData serializeObject();
|
||||
|
||||
double referenceSurfactantConcentration() const;
|
||||
double exponent() const;
|
||||
@@ -51,6 +50,16 @@ public:
|
||||
|
||||
bool operator==(const FoamData& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(reference_surfactant_concentration_);
|
||||
serializer(exponent_);
|
||||
serializer(minimum_surfactant_concentration_);
|
||||
serializer(allow_desorption_);
|
||||
serializer(rock_density_);
|
||||
}
|
||||
|
||||
private:
|
||||
double reference_surfactant_concentration_;
|
||||
double exponent_;
|
||||
@@ -63,12 +72,20 @@ private:
|
||||
class FoamConfig
|
||||
{
|
||||
public:
|
||||
enum class MobilityModel {
|
||||
TAB,
|
||||
FUNC
|
||||
};
|
||||
|
||||
FoamConfig() = default;
|
||||
explicit FoamConfig(const Deck&);
|
||||
FoamConfig(const std::vector<FoamData>& data);
|
||||
|
||||
static FoamConfig serializeObject();
|
||||
|
||||
const FoamData& getRecord(std::size_t index) const;
|
||||
const std::vector<FoamData>& records() const;
|
||||
|
||||
Opm::Phase getTransportPhase() const;
|
||||
MobilityModel getMobilityModel() const;
|
||||
|
||||
std::size_t size() const;
|
||||
bool empty() const;
|
||||
@@ -79,8 +96,18 @@ public:
|
||||
|
||||
bool operator==(const FoamConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(data_);
|
||||
serializer(transport_phase_);
|
||||
serializer(mobility_model_);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<FoamData> data_;
|
||||
Phase transport_phase_ = Phase::GAS;
|
||||
MobilityModel mobility_model_ = MobilityModel::TAB;
|
||||
};
|
||||
|
||||
} // end namespace Opm
|
||||
|
||||
@@ -34,9 +34,8 @@ namespace Opm {
|
||||
public:
|
||||
InitConfig();
|
||||
explicit InitConfig(const Deck& deck);
|
||||
InitConfig(const Equil& equil, const FoamConfig& foam,
|
||||
bool filleps, bool gravity, bool restartReq, int restartStep,
|
||||
const std::string& restartRootName);
|
||||
|
||||
static InitConfig serializeObject();
|
||||
|
||||
void setRestart( const std::string& root, int step);
|
||||
bool restartRequested() const;
|
||||
@@ -58,6 +57,18 @@ namespace Opm {
|
||||
|
||||
bool operator==(const InitConfig& config) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
equil.serializeOp(serializer);
|
||||
foamconfig.serializeOp(serializer);
|
||||
serializer(m_filleps);
|
||||
serializer(m_gravity);
|
||||
serializer(m_restartRequested);
|
||||
serializer(m_restartStep);
|
||||
serializer(m_restartRootName);
|
||||
}
|
||||
|
||||
private:
|
||||
Equil equil;
|
||||
FoamConfig foamconfig;
|
||||
|
||||
@@ -54,14 +54,26 @@ class Phases {
|
||||
Phases() noexcept = default;
|
||||
Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false, bool energy = false,
|
||||
bool polymw = false, bool foam = false, bool brine = false ) noexcept;
|
||||
Phases(const std::bitset<NUM_PHASES_IN_ENUM>& bbits);
|
||||
unsigned long getBits() const;
|
||||
|
||||
static Phases serializeObject();
|
||||
|
||||
bool active( Phase ) const noexcept;
|
||||
size_t size() const noexcept;
|
||||
|
||||
bool operator==(const Phases& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
if (serializer.isSerializing())
|
||||
serializer(bits.to_ulong());
|
||||
else {
|
||||
unsigned long Bits = 0;
|
||||
serializer(Bits);
|
||||
bits = std::bitset<NUM_PHASES_IN_ENUM>(Bits);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::bitset< NUM_PHASES_IN_ENUM > bits;
|
||||
};
|
||||
@@ -71,8 +83,8 @@ class Welldims {
|
||||
public:
|
||||
Welldims() = default;
|
||||
explicit Welldims(const Deck& deck);
|
||||
Welldims(int WMax, int CWMax, int WGMax, int GMax) :
|
||||
nWMax(WMax), nCWMax(CWMax), nWGMax(WGMax), nGMax(GMax) {}
|
||||
|
||||
static Welldims serializeObject();
|
||||
|
||||
int maxConnPerWell() const
|
||||
{
|
||||
@@ -89,7 +101,7 @@ public:
|
||||
return this->nGMax;
|
||||
}
|
||||
|
||||
int maxWellsInField() const
|
||||
int maxWellsInField() const
|
||||
{
|
||||
return this->nWMax;
|
||||
}
|
||||
@@ -101,6 +113,15 @@ public:
|
||||
this->maxWellsInField() == data.maxWellsInField();
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(nWMax);
|
||||
serializer(nCWMax);
|
||||
serializer(nWGMax);
|
||||
serializer(nGMax);
|
||||
}
|
||||
|
||||
private:
|
||||
int nWMax { 0 };
|
||||
int nCWMax { 0 };
|
||||
@@ -112,7 +133,8 @@ class WellSegmentDims {
|
||||
public:
|
||||
WellSegmentDims();
|
||||
explicit WellSegmentDims(const Deck& deck);
|
||||
WellSegmentDims(int segWellMax, int segMax, int latBranchMax);
|
||||
|
||||
static WellSegmentDims serializeObject();
|
||||
|
||||
|
||||
int maxSegmentedWells() const
|
||||
@@ -132,6 +154,14 @@ public:
|
||||
|
||||
bool operator==(const WellSegmentDims& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(nSegWellMax);
|
||||
serializer(nSegmentMax);
|
||||
serializer(nLatBranchMax);
|
||||
}
|
||||
|
||||
private:
|
||||
int nSegWellMax;
|
||||
int nSegmentMax;
|
||||
@@ -143,8 +173,8 @@ class EclHysterConfig
|
||||
public:
|
||||
EclHysterConfig() = default;
|
||||
explicit EclHysterConfig(const Deck& deck);
|
||||
EclHysterConfig(bool active, int pcMod, int krMod);
|
||||
|
||||
static EclHysterConfig serializeObject();
|
||||
|
||||
/*!
|
||||
* \brief Specify whether hysteresis is enabled or not.
|
||||
@@ -174,6 +204,14 @@ public:
|
||||
|
||||
bool operator==(const EclHysterConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(activeHyst);
|
||||
serializer(pcHystMod);
|
||||
serializer(krHystMod);
|
||||
}
|
||||
|
||||
private:
|
||||
// enable hysteresis at all
|
||||
bool activeHyst { false };
|
||||
@@ -185,34 +223,50 @@ private:
|
||||
|
||||
class SatFuncControls {
|
||||
public:
|
||||
enum class ThreePhaseOilKrModel {
|
||||
Default,
|
||||
Stone1,
|
||||
Stone2
|
||||
};
|
||||
|
||||
SatFuncControls();
|
||||
explicit SatFuncControls(const Deck& deck);
|
||||
explicit SatFuncControls(const double tolcritArg);
|
||||
SatFuncControls(const double tolcritArg,
|
||||
ThreePhaseOilKrModel model);
|
||||
|
||||
|
||||
static SatFuncControls serializeObject();
|
||||
|
||||
double minimumRelpermMobilityThreshold() const
|
||||
{
|
||||
return this->tolcrit;
|
||||
}
|
||||
|
||||
ThreePhaseOilKrModel krModel() const
|
||||
{
|
||||
return this->krmodel;
|
||||
}
|
||||
|
||||
bool operator==(const SatFuncControls& rhs) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(tolcrit);
|
||||
serializer(krmodel);
|
||||
}
|
||||
|
||||
private:
|
||||
double tolcrit;
|
||||
ThreePhaseOilKrModel krmodel = ThreePhaseOilKrModel::Default;
|
||||
};
|
||||
|
||||
class Runspec {
|
||||
public:
|
||||
Runspec() = default;
|
||||
explicit Runspec( const Deck& );
|
||||
Runspec(const Phases& act_phases,
|
||||
const Tabdims& tabdims,
|
||||
const EndpointScaling& endScale,
|
||||
const Welldims& wellDims,
|
||||
const WellSegmentDims& wsegDims,
|
||||
const UDQParams& udqparams,
|
||||
const EclHysterConfig& hystPar,
|
||||
const Actdims& actDims,
|
||||
const SatFuncControls& sfuncctrl);
|
||||
|
||||
static Runspec serializeObject();
|
||||
|
||||
const UDQParams& udqParams() const noexcept;
|
||||
const Phases& phases() const noexcept;
|
||||
@@ -227,6 +281,20 @@ public:
|
||||
|
||||
bool operator==(const Runspec& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
active_phases.serializeOp(serializer);
|
||||
m_tabdims.serializeOp(serializer);
|
||||
endscale.serializeOp(serializer);
|
||||
welldims.serializeOp(serializer);
|
||||
wsegdims.serializeOp(serializer);
|
||||
udq_params.serializeOp(serializer);
|
||||
hystpar.serializeOp(serializer);
|
||||
m_actdims.serializeOp(serializer);
|
||||
m_sfuncctrl.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
Phases active_phases;
|
||||
Tabdims m_tabdims;
|
||||
|
||||
@@ -17,9 +17,8 @@ public:
|
||||
ASTNode(TokenType type_arg);
|
||||
ASTNode(double value);
|
||||
ASTNode(TokenType type_arg, FuncType func_type_arg, const std::string& func_arg, const std::vector<std::string>& arg_list_arg);
|
||||
ASTNode(TokenType type_arg, FuncType ftype, const std::string& func_arg,
|
||||
const std::vector<std::string>& args, double number,
|
||||
const std::vector<ASTNode>& childs);
|
||||
|
||||
static ASTNode serializeObject();
|
||||
|
||||
Action::Result eval(const Action::Context& context) const;
|
||||
Action::Value value(const Action::Context& context) const;
|
||||
@@ -29,12 +28,19 @@ public:
|
||||
size_t size() const;
|
||||
std::string func;
|
||||
|
||||
const std::vector<std::string>& argList() const;
|
||||
const std::vector<ASTNode>& childrens() const;
|
||||
double getNumber() const;
|
||||
|
||||
bool operator==(const ASTNode& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(type);
|
||||
serializer(func_type);
|
||||
serializer(func);
|
||||
serializer(arg_list);
|
||||
serializer(number);
|
||||
serializer.vector(children);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::string> arg_list;
|
||||
double number = 0.0;
|
||||
|
||||
@@ -28,8 +28,8 @@ class Actdims {
|
||||
public:
|
||||
Actdims();
|
||||
explicit Actdims(const Deck& deck);
|
||||
Actdims(std::size_t keyw, std::size_t line_cnt,
|
||||
std::size_t chars, std::size_t conds);
|
||||
|
||||
static Actdims serializeObject();
|
||||
|
||||
std::size_t max_keywords() const;
|
||||
std::size_t max_line_count() const;
|
||||
@@ -38,6 +38,15 @@ public:
|
||||
|
||||
bool operator==(const Actdims& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(keywords);
|
||||
serializer(line_count);
|
||||
serializer(characters);
|
||||
serializer(conditions);
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t keywords;
|
||||
std::size_t line_count;
|
||||
|
||||
@@ -44,12 +44,19 @@ class AST{
|
||||
public:
|
||||
AST() = default;
|
||||
explicit AST(const std::vector<std::string>& tokens);
|
||||
AST(const std::shared_ptr<ASTNode>& cond);
|
||||
|
||||
static AST serializeObject();
|
||||
|
||||
Result eval(const Context& context) const;
|
||||
|
||||
std::shared_ptr<ASTNode> getCondition() const;
|
||||
|
||||
bool operator==(const AST& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(condition);
|
||||
}
|
||||
|
||||
private:
|
||||
/*
|
||||
The use of a pointer here is to be able to create this class with only a
|
||||
|
||||
@@ -67,15 +67,8 @@ public:
|
||||
ActionX(const std::string& name, size_t max_run, double max_wait, std::time_t start_time);
|
||||
ActionX(const DeckKeyword& kw, std::time_t start_time);
|
||||
ActionX(const DeckRecord& record, std::time_t start_time);
|
||||
ActionX(const std::string& nam,
|
||||
size_t maxRun,
|
||||
double minWait,
|
||||
std::time_t startTime,
|
||||
const std::vector<DeckKeyword>& keyword,
|
||||
const AST& cond,
|
||||
const std::vector<Condition>& conditions,
|
||||
size_t runCount,
|
||||
std::time_t lastRun);
|
||||
|
||||
static ActionX serializeObject();
|
||||
|
||||
void addKeyword(const DeckKeyword& kw);
|
||||
bool ready(std::time_t sim_time) const;
|
||||
@@ -94,15 +87,25 @@ public:
|
||||
The conditions() and keyword_strings() methods, and their underlying data
|
||||
members are only present to support writing formatted restart files.
|
||||
*/
|
||||
const std::vector<DeckKeyword>& getKeywords() const;
|
||||
const std::vector<Condition>& conditions() const;
|
||||
const Action::AST& getCondition() const;
|
||||
std::vector<std::string> keyword_strings() const;
|
||||
size_t getRunCount() const;
|
||||
std::time_t getLastRun() const;
|
||||
|
||||
bool operator==(const ActionX& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_max_run);
|
||||
serializer(m_min_wait);
|
||||
serializer(m_start_time);
|
||||
serializer.vector(keywords);
|
||||
condition.serializeOp(serializer);
|
||||
serializer.vector(m_conditions);
|
||||
serializer(run_count);
|
||||
serializer(last_run);
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
size_t m_max_run = 0;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Action/PyAction.hpp>
|
||||
|
||||
namespace Opm {
|
||||
namespace Action {
|
||||
@@ -38,25 +39,36 @@ namespace Action {
|
||||
class Actions {
|
||||
public:
|
||||
Actions() = default;
|
||||
Actions(const std::vector<ActionX>& action);
|
||||
Actions(const std::vector<ActionX>& action, const std::vector<PyAction>& pyactions);
|
||||
|
||||
static Actions serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
int max_input_lines() const;
|
||||
bool empty() const;
|
||||
void add(const ActionX& action);
|
||||
void add(const PyAction& pyaction);
|
||||
bool ready(std::time_t sim_time) const;
|
||||
const ActionX& get(const std::string& name) const;
|
||||
const ActionX& get(std::size_t index) const;
|
||||
std::vector<const ActionX *> pending(std::time_t sim_time) const;
|
||||
std::vector<const PyAction *> pending_python() const;
|
||||
|
||||
std::vector<ActionX>::const_iterator begin() const;
|
||||
std::vector<ActionX>::const_iterator end() const;
|
||||
|
||||
const std::vector<ActionX>& getActions() const;
|
||||
|
||||
bool operator==(const Actions& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.vector(actions);
|
||||
serializer.vector(pyactions);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<ActionX> actions;
|
||||
std::vector<PyAction> pyactions;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,13 @@ public:
|
||||
return quantity == data.quantity &&
|
||||
args == data.args;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(quantity);
|
||||
serializer(args);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -80,6 +87,16 @@ enum class Comparator {
|
||||
std::string cmp_string;
|
||||
|
||||
bool operator==(const Condition& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
lhs.serializeOp(serializer);
|
||||
rhs.serializeOp(serializer);
|
||||
serializer(logic);
|
||||
serializer(cmp);
|
||||
serializer(cmp_string);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -23,30 +23,56 @@
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Python;
|
||||
class EclipseState;
|
||||
class Schedule;
|
||||
class SummaryState;
|
||||
class PyRunModule;
|
||||
|
||||
namespace Action {
|
||||
|
||||
class PyAction {
|
||||
public:
|
||||
explicit PyAction(const std::string& code_arg);
|
||||
const std::string& code() const;
|
||||
~PyAction();
|
||||
enum class RunCount {
|
||||
single,
|
||||
unlimited,
|
||||
first_true
|
||||
};
|
||||
|
||||
/*
|
||||
Storage is a void pointer to a Python dictionary: py::dict. It is represented
|
||||
with a void pointer in this way to avoid adding the Pybind11 headers to this
|
||||
file. Calling scope must do a cast before using the storage pointer:
|
||||
|
||||
py::dict * storage = static_cast<py::dict *>(py_action.storage());
|
||||
static RunCount from_string(std::string run_count);
|
||||
static PyAction serializeObject();
|
||||
PyAction() = default;
|
||||
PyAction(std::shared_ptr<const Python> python, const std::string& name, RunCount run_count, const std::string& module_file);
|
||||
bool run(EclipseState& ecl_state, Schedule& schedule, std::size_t report_step, SummaryState& st) const;
|
||||
const std::string& name() const;
|
||||
bool active() const;
|
||||
bool operator==(const PyAction& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_run_count);
|
||||
serializer(module_file);
|
||||
serializer(m_active);
|
||||
}
|
||||
|
||||
The purpose of this dictionary is to allow PYACTION scripts to store state
|
||||
between invocations.
|
||||
*/
|
||||
void * storage() const;
|
||||
private:
|
||||
std::string input_code;
|
||||
void * m_storage;
|
||||
void update(bool result) const;
|
||||
|
||||
mutable std::shared_ptr< PyRunModule > run_module;
|
||||
std::string m_name;
|
||||
RunCount m_run_count;
|
||||
std::string module_file;
|
||||
mutable bool m_active = true;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Opm {
|
||||
|
||||
template< class T >
|
||||
class DynamicState {
|
||||
|
||||
friend class Schedule;
|
||||
public:
|
||||
typedef typename std::vector< T >::iterator iterator;
|
||||
|
||||
@@ -118,6 +118,9 @@ class DynamicState {
|
||||
return result;
|
||||
}
|
||||
|
||||
bool is_new_data(size_t index) const {
|
||||
return index == 0 || (at(index) != at(index - 1));
|
||||
}
|
||||
|
||||
/**
|
||||
If the current value has been changed the method will
|
||||
@@ -227,9 +230,48 @@ class DynamicState {
|
||||
initial_range == data.initial_range;
|
||||
}
|
||||
|
||||
// complexType=true if contained type has a serializeOp
|
||||
template<class Serializer, bool complexType = true>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
std::vector<T> unique;
|
||||
auto indices = split(unique);
|
||||
serializer.template vector<T,complexType>(unique);
|
||||
serializer(indices);
|
||||
if (!serializer.isSerializing())
|
||||
reconstruct(unique, indices);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector< T > m_data;
|
||||
size_t initial_range;
|
||||
|
||||
std::vector<size_t> split(std::vector<T>& unique) const {
|
||||
std::vector<size_t> idxVec;
|
||||
idxVec.reserve(m_data.size() + 1);
|
||||
for (const auto& w : m_data) {
|
||||
auto candidate = std::find(unique.begin(), unique.end(), w);
|
||||
size_t idx = candidate - unique.begin();
|
||||
if (candidate == unique.end()) {
|
||||
unique.push_back(w);
|
||||
idx = unique.size() - 1;
|
||||
}
|
||||
idxVec.push_back(idx);
|
||||
}
|
||||
idxVec.push_back(initial_range);
|
||||
|
||||
return idxVec;
|
||||
}
|
||||
|
||||
void reconstruct(const std::vector<T>& unique,
|
||||
const std::vector<size_t>& idxVec) {
|
||||
m_data.clear();
|
||||
m_data.reserve(idxVec.size() - 1);
|
||||
for (size_t i = 0; i < idxVec.size() - 1; ++i)
|
||||
m_data.push_back(unique[idxVec[i]]);
|
||||
|
||||
initial_range = idxVec.back();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -64,12 +64,14 @@ namespace Opm {
|
||||
(*this)[index] = std::move( value );
|
||||
}
|
||||
|
||||
const std::vector<T>& data() const {
|
||||
return m_data;
|
||||
bool operator==(const DynamicVector<T>& data) const {
|
||||
return this->m_data == data.m_data;
|
||||
}
|
||||
|
||||
bool operator==(const DynamicVector<T>& data) const {
|
||||
return this->data() == data.data();
|
||||
template<class Serializer, bool complexType = true>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.template vector<T, complexType>(m_data);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -123,14 +123,20 @@ namespace Opm
|
||||
public:
|
||||
Events() = default;
|
||||
explicit Events(const TimeMap& timeMap);
|
||||
explicit Events(const DynamicVector<uint64_t>& events);
|
||||
|
||||
static Events serializeObject();
|
||||
|
||||
void addEvent(ScheduleEvents::Events event, size_t reportStep);
|
||||
bool hasEvent(uint64_t eventMask, size_t reportStep) const;
|
||||
|
||||
const DynamicVector<uint64_t>& events() const;
|
||||
|
||||
bool operator==(const Events& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
m_events.template serializeOp<Serializer,false>(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
DynamicVector<uint64_t> m_events;
|
||||
};
|
||||
|
||||
@@ -52,6 +52,17 @@ namespace Opm {
|
||||
udq_undefined == data.udq_undefined &&
|
||||
unit_system == data.unit_system;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
sales_target.serializeOp(serializer);
|
||||
max_sales_rate.serializeOp(serializer);
|
||||
min_sales_rate.serializeOp(serializer);
|
||||
serializer(max_proc);
|
||||
serializer(udq_undefined);
|
||||
unit_system.serializeOp(serializer);
|
||||
}
|
||||
};
|
||||
|
||||
struct GCONSALEGroupProp {
|
||||
@@ -61,8 +72,7 @@ namespace Opm {
|
||||
MaxProcedure max_proc;
|
||||
};
|
||||
|
||||
GConSale() = default;
|
||||
GConSale(const std::map<std::string, GCONSALEGroup>& group);
|
||||
static GConSale serializeObject();
|
||||
|
||||
bool has(const std::string& name) const;
|
||||
const GCONSALEGroup& get(const std::string& name) const;
|
||||
@@ -71,10 +81,14 @@ namespace Opm {
|
||||
void add(const std::string& name, const UDAValue& sales_target, const UDAValue& max_rate, const UDAValue& min_rate, const std::string& procedure, double udq_undefined_arg, const UnitSystem& unit_system);
|
||||
size_t size() const;
|
||||
|
||||
const std::map<std::string, GCONSALEGroup>& getGroups() const;
|
||||
|
||||
bool operator==(const GConSale& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.map(groups);
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<std::string, GCONSALEGroup> groups;
|
||||
};
|
||||
|
||||
@@ -45,6 +45,16 @@ namespace Opm {
|
||||
udq_undefined == data.udq_undefined &&
|
||||
unit_system == data.unit_system;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
consumption_rate.serializeOp(serializer);
|
||||
import_rate.serializeOp(serializer);
|
||||
serializer(network_node);
|
||||
serializer(udq_undefined);
|
||||
unit_system.serializeOp(serializer);
|
||||
}
|
||||
};
|
||||
|
||||
struct GCONSUMPGroupProp {
|
||||
@@ -53,8 +63,7 @@ namespace Opm {
|
||||
std::string network_node;
|
||||
};
|
||||
|
||||
GConSump() = default;
|
||||
GConSump(const std::map<std::string, GCONSUMPGroup>& group);
|
||||
static GConSump serializeObject();
|
||||
|
||||
bool has(const std::string& name) const;
|
||||
const GCONSUMPGroup& get(const std::string& name) const;
|
||||
@@ -62,10 +71,14 @@ namespace Opm {
|
||||
void add(const std::string& name, const UDAValue& consumption_rate, const UDAValue& import_rate, const std::string network_node, double udq_undefined_arg, const UnitSystem& unit_system);
|
||||
size_t size() const;
|
||||
|
||||
const std::map<std::string, GCONSUMPGroup>& getGroups() const;
|
||||
|
||||
bool operator==(const GConSump& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer.map(groups);
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<std::string, GCONSUMPGroup> groups;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
@@ -29,7 +30,7 @@ namespace Opm {
|
||||
|
||||
class GTNode {
|
||||
public:
|
||||
GTNode(const Group& group, const GTNode* parent);
|
||||
GTNode(const Group& group, std::size_t level, const std::optional<std::string>& parent_name);
|
||||
|
||||
void add_group(const GTNode& child_group);
|
||||
void add_well(const Well& well);
|
||||
@@ -37,11 +38,13 @@ public:
|
||||
const std::vector<Well>& wells() const;
|
||||
const std::vector<GTNode>& groups() const;
|
||||
const std::string& name() const;
|
||||
const GTNode& parent() const;
|
||||
const std::string& parent_name() const;
|
||||
|
||||
const Group& group() const;
|
||||
private:
|
||||
const Group m_group;
|
||||
const GTNode * m_parent;
|
||||
std::size_t m_level;
|
||||
std::optional<std::string> m_parent_name;
|
||||
/*
|
||||
Class T with a stl container <T> - supposedly undefined behavior before
|
||||
C++17 - but it compiles without warnings.
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#define GROUP2_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/UDAValue.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/IOrderSet.hpp>
|
||||
@@ -113,10 +114,28 @@ struct GroupInjectionProperties {
|
||||
UDAValue target_void_fraction;
|
||||
std::string reinj_group;
|
||||
std::string voidage_group;
|
||||
bool available_group_control;
|
||||
|
||||
static GroupInjectionProperties serializeObject();
|
||||
|
||||
int injection_controls = 0;
|
||||
bool operator==(const GroupInjectionProperties& other) const;
|
||||
bool operator!=(const GroupInjectionProperties& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(phase);
|
||||
serializer(cmode);
|
||||
surface_max_rate.serializeOp(serializer);
|
||||
resv_max_rate.serializeOp(serializer);
|
||||
target_reinj_fraction.serializeOp(serializer);
|
||||
target_void_fraction.serializeOp(serializer);
|
||||
serializer(reinj_group);
|
||||
serializer(voidage_group);
|
||||
serializer(injection_controls);
|
||||
serializer(available_group_control);
|
||||
}
|
||||
};
|
||||
|
||||
struct InjectionControls {
|
||||
@@ -142,12 +161,31 @@ struct GroupProductionProperties {
|
||||
double guide_rate;
|
||||
GuideRateTarget guide_rate_def;
|
||||
double resv_target = 0;
|
||||
bool available_group_control = true;
|
||||
static GroupProductionProperties serializeObject();
|
||||
|
||||
int production_controls = 0;
|
||||
bool operator==(const GroupProductionProperties& other) const;
|
||||
bool operator!=(const GroupProductionProperties& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(cmode);
|
||||
serializer(exceed_action);
|
||||
oil_target.serializeOp(serializer);
|
||||
water_target.serializeOp(serializer);
|
||||
gas_target.serializeOp(serializer);
|
||||
liquid_target.serializeOp(serializer);
|
||||
serializer(guide_rate);
|
||||
serializer(guide_rate_def);
|
||||
serializer(resv_target);
|
||||
serializer(available_group_control);
|
||||
serializer(production_controls);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct ProductionControls {
|
||||
ProductionCMode cmode;
|
||||
ExceedAction exceed_action;
|
||||
@@ -165,38 +203,22 @@ struct ProductionControls {
|
||||
|
||||
Group();
|
||||
Group(const std::string& group_name, std::size_t insert_index_arg, std::size_t init_step_arg, double udq_undefined_arg, const UnitSystem& unit_system);
|
||||
Group(const std::string& gname,
|
||||
std::size_t insert_idx,
|
||||
std::size_t initstep,
|
||||
double udqUndef,
|
||||
const UnitSystem& units,
|
||||
GroupType gtype,
|
||||
double groupEF,
|
||||
bool transferGroupEF,
|
||||
bool availableForGroupControl,
|
||||
int vfp,
|
||||
const std::string& parent,
|
||||
const IOrderSet<std::string>& well,
|
||||
const IOrderSet<std::string>& group,
|
||||
const std::map<Phase, GroupInjectionProperties> &injProps,
|
||||
const GroupProductionProperties& prodProps);
|
||||
|
||||
static Group serializeObject();
|
||||
|
||||
bool defined(std::size_t timeStep) const;
|
||||
std::size_t insert_index() const;
|
||||
std::size_t initStep() const;
|
||||
double udqUndefined() const;
|
||||
const UnitSystem& units() const;
|
||||
const std::string& name() const;
|
||||
GroupType type() const;
|
||||
int getGroupNetVFPTable() const;
|
||||
const IOrderSet<std::string>& iwells() const;
|
||||
const IOrderSet<std::string>& igroups() const;
|
||||
|
||||
bool updateNetVFPTable(int vfp_arg);
|
||||
bool update_gefac(double gefac, bool transfer_gefac);
|
||||
|
||||
// [[deprecated("use Group::control_group() or Group::flow_group()")]]
|
||||
const std::string& parent() const;
|
||||
std::optional<std::string> control_group() const;
|
||||
std::optional<std::string> flow_group() const;
|
||||
|
||||
bool updateParent(const std::string& parent);
|
||||
bool updateInjection(const GroupInjectionProperties& injection);
|
||||
bool updateProduction(const GroupProductionProperties& production);
|
||||
@@ -206,8 +228,6 @@ struct ProductionControls {
|
||||
void setInjectionGroup();
|
||||
double getGroupEfficiencyFactor() const;
|
||||
bool getTransferGroupEfficiencyFactor() const;
|
||||
bool isAvailableForGroupControl() const;
|
||||
void setAvailableForGroupControl(const bool available);
|
||||
|
||||
std::size_t numWells() const;
|
||||
bool addGroup(const std::string& group_name);
|
||||
@@ -231,11 +251,33 @@ struct ProductionControls {
|
||||
Phase injection_phase() const;
|
||||
bool has_control(ProductionCMode control) const;
|
||||
bool has_control(InjectionCMode control) const;
|
||||
bool productionGroupControlAvailable() const;
|
||||
bool injectionGroupControlAvailable(const Phase phase) const;
|
||||
|
||||
bool operator==(const Group& data) const;
|
||||
const Phase& topup_phase() const;
|
||||
bool has_topup_phase() const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_name);
|
||||
serializer(m_insert_index);
|
||||
serializer(init_step);
|
||||
serializer(udq_undefined);
|
||||
unit_system.serializeOp(serializer);
|
||||
serializer(group_type);
|
||||
serializer(gefac);
|
||||
serializer(transfer_gefac);
|
||||
serializer(vfp_table);
|
||||
serializer(parent_group);
|
||||
m_wells.serializeOp(serializer);
|
||||
m_groups.serializeOp(serializer);
|
||||
serializer.map(injection_properties);
|
||||
production_properties.serializeOp(serializer);
|
||||
serializer(m_topup_phase);
|
||||
}
|
||||
|
||||
private:
|
||||
bool hasType(GroupType gtype) const;
|
||||
void addType(GroupType new_gtype);
|
||||
@@ -248,7 +290,6 @@ private:
|
||||
GroupType group_type;
|
||||
double gefac;
|
||||
bool transfer_gefac;
|
||||
bool available_for_group_control;
|
||||
int vfp_table;
|
||||
|
||||
std::string parent_group;
|
||||
|
||||
@@ -27,11 +27,35 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/Group.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRateModel.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Schedule;
|
||||
class GuideRate {
|
||||
|
||||
public:
|
||||
// used for potentials and well rates
|
||||
struct RateVector {
|
||||
RateVector () = default;
|
||||
RateVector (double orat, double grat, double wrat) :
|
||||
oil_rat(orat),
|
||||
gas_rat(grat),
|
||||
wat_rat(wrat)
|
||||
{}
|
||||
|
||||
|
||||
double eval(Group::GuideRateTarget target) const;
|
||||
double eval(Well::GuideRateTarget target) const;
|
||||
double eval(GuideRateModel::Target target) const;
|
||||
|
||||
|
||||
double oil_rat;
|
||||
double gas_rat;
|
||||
double wat_rat;
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
struct GuideRateValue {
|
||||
@@ -56,31 +80,14 @@ struct GuideRateValue {
|
||||
GuideRateModel::Target target;
|
||||
};
|
||||
|
||||
struct Potential {
|
||||
Potential() = default;
|
||||
Potential(double op, double gp, double wp) :
|
||||
oil_pot(op),
|
||||
gas_pot(gp),
|
||||
wat_pot(wp)
|
||||
{}
|
||||
|
||||
|
||||
double eval(Group::GuideRateTarget target) const;
|
||||
double eval(Well::GuideRateTarget target) const;
|
||||
double eval(GuideRateModel::Target target) const;
|
||||
|
||||
|
||||
double oil_pot;
|
||||
double gas_pot;
|
||||
double wat_pot;
|
||||
};
|
||||
|
||||
public:
|
||||
GuideRate(const Schedule& schedule);
|
||||
void compute(const std::string& wgname, size_t report_step, double sim_time, double oil_pot, double gas_pot, double wat_pot);
|
||||
double get(const std::string& well, Well::GuideRateTarget target) const;
|
||||
double get(const std::string& group, Group::GuideRateTarget target) const;
|
||||
double get(const std::string& name, GuideRateModel::Target model_target) const;
|
||||
double get(const std::string& well, Well::GuideRateTarget target, const RateVector& rates) const;
|
||||
double get(const std::string& group, Group::GuideRateTarget target, const RateVector& rates) const;
|
||||
double get(const std::string& name, GuideRateModel::Target model_target, const RateVector& rates) const;
|
||||
bool has(const std::string& name) const;
|
||||
|
||||
private:
|
||||
void well_compute(const std::string& wgname, size_t report_step, double sim_time, double oil_pot, double gas_pot, double wat_pot);
|
||||
@@ -89,8 +96,8 @@ private:
|
||||
double eval_group_pot() const;
|
||||
double eval_group_resvinj() const;
|
||||
|
||||
std::unordered_map<std::string,GuideRateValue> values;
|
||||
std::unordered_map<std::string,Potential> potentials;
|
||||
std::unordered_map<std::string, GuideRateValue> values;
|
||||
std::unordered_map<std::string, RateVector > potentials;
|
||||
const Schedule& schedule;
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,14 @@ public:
|
||||
target == data.target &&
|
||||
scaling_factor == data.scaling_factor;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(guide_rate);
|
||||
serializer(target);
|
||||
serializer(scaling_factor);
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupTarget {
|
||||
@@ -54,12 +62,16 @@ struct GroupTarget {
|
||||
return guide_rate == data.guide_rate &&
|
||||
target == data.target;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(guide_rate);
|
||||
serializer(target);
|
||||
}
|
||||
};
|
||||
|
||||
GuideRateConfig() = default;
|
||||
GuideRateConfig(std::shared_ptr<GuideRateModel> model,
|
||||
const std::unordered_map<std::string,WellTarget>& well,
|
||||
const std::unordered_map<std::string,GroupTarget>& group);
|
||||
static GuideRateConfig serializeObject();
|
||||
|
||||
const GuideRateModel& model() const;
|
||||
bool has_model() const;
|
||||
@@ -71,12 +83,16 @@ struct GroupTarget {
|
||||
bool has_well(const std::string& well) const;
|
||||
bool has_group(const std::string& group) const;
|
||||
|
||||
std::shared_ptr<GuideRateModel> getModel() const;
|
||||
const std::unordered_map<std::string, WellTarget>& getWells() const;
|
||||
const std::unordered_map<std::string, GroupTarget>& getGroups() const;
|
||||
|
||||
bool operator==(const GuideRateConfig& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_model);
|
||||
serializer.map(wells);
|
||||
serializer.map(groups);
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<GuideRateModel> m_model;
|
||||
std::unordered_map<std::string, WellTarget> wells;
|
||||
|
||||
@@ -52,17 +52,10 @@ public:
|
||||
bool allow_increase_arg,
|
||||
double damping_factor_arg,
|
||||
bool use_free_gas_arg);
|
||||
|
||||
GuideRateModel(double time_interval_arg,
|
||||
Target target_arg,
|
||||
const std::array<double,6>& coefs_arg,
|
||||
bool allow_increase_arg,
|
||||
double damping_factor_arg,
|
||||
bool use_free_gas_arg,
|
||||
bool use_default_model_arg,
|
||||
const std::array<UDAValue,3>& udaCoefs_arg);
|
||||
|
||||
GuideRateModel() = default;
|
||||
|
||||
static GuideRateModel serializeObject();
|
||||
|
||||
bool updateLINCOM(const UDAValue& alpha, const UDAValue& beta, const UDAValue& gamma);
|
||||
double eval(double oil_pot, double gas_pot, double wat_pot) const;
|
||||
double update_delay() const;
|
||||
@@ -82,11 +75,26 @@ public:
|
||||
static Target convert_target(Well::GuideRateTarget well_target);
|
||||
static double pot(Target target, double oil_pot, double gas_pot, double wat_pot);
|
||||
|
||||
double timeInterval() const;
|
||||
std::array<double, 6> coefs() const;
|
||||
bool free_gas() const;
|
||||
bool defaultModel() const;
|
||||
std::array<UDAValue,3> udaCoefs() const;
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(time_interval);
|
||||
serializer(m_target),
|
||||
serializer(A);
|
||||
serializer(B);
|
||||
serializer(C);
|
||||
serializer(D);
|
||||
serializer(E);
|
||||
serializer(F);
|
||||
serializer(allow_increase_);
|
||||
serializer(damping_factor_);
|
||||
serializer(use_free_gas);
|
||||
serializer(default_model);
|
||||
alpha.serializeOp(serializer);
|
||||
beta.serializeOp(serializer);
|
||||
gamma.serializeOp(serializer);
|
||||
}
|
||||
|
||||
private:
|
||||
double pot(double oil_pot, double gas_pot, double wat_pot) const;
|
||||
/*
|
||||
|
||||
@@ -51,25 +51,10 @@ namespace Opm {
|
||||
Segment(const Segment& src, double new_volume);
|
||||
Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in,
|
||||
double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in, SegmentType segment_type_in);
|
||||
|
||||
|
||||
Segment(int segmentNumber,
|
||||
int branchNumber,
|
||||
int outlegSegment,
|
||||
const std::vector<int>& inletSegments,
|
||||
double totalLength,
|
||||
double depth,
|
||||
double internalDiameter,
|
||||
double roughness,
|
||||
double crossArea,
|
||||
double volume,
|
||||
bool dataReady,
|
||||
SegmentType segmentType,
|
||||
std::shared_ptr<SpiralICD> spiralICD,
|
||||
std::shared_ptr<Valve> valv);
|
||||
|
||||
Segment(const RestartIO::RstSegment& rst_segment);
|
||||
|
||||
static Segment serializeObject();
|
||||
|
||||
int segmentNumber() const;
|
||||
int branchNumber() const;
|
||||
int outletSegment() const;
|
||||
@@ -94,12 +79,31 @@ namespace Opm {
|
||||
bool operator!=( const Segment& ) const;
|
||||
|
||||
const std::shared_ptr<SpiralICD>& spiralICD() const;
|
||||
const std::shared_ptr<Valve>& getValve() const;
|
||||
const Valve* valve() const;
|
||||
|
||||
void updateSpiralICD(const SpiralICD& spiral_icd);
|
||||
void updateValve(const Valve& valve, const double segment_length);
|
||||
void addInletSegment(const int segment_number);
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_segment_number);
|
||||
serializer(m_branch);
|
||||
serializer(m_outlet_segment);
|
||||
serializer(m_inlet_segments);
|
||||
serializer(m_total_length);
|
||||
serializer(m_depth);
|
||||
serializer(m_internal_diameter);
|
||||
serializer(m_roughness);
|
||||
serializer(m_cross_area);
|
||||
serializer(m_volume);
|
||||
serializer(m_data_ready);
|
||||
serializer(m_segment_type);
|
||||
serializer(m_spiral_icd);
|
||||
serializer(m_valve);
|
||||
}
|
||||
|
||||
private:
|
||||
// segment number
|
||||
// it should work as a ID.
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
|
||||
|
||||
@@ -49,6 +50,8 @@ namespace Opm {
|
||||
ICDStatus status,
|
||||
double scalingFactor);
|
||||
|
||||
static SpiralICD serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, sicd1>, <seg2, sicd2> ...]
|
||||
@@ -72,6 +75,22 @@ namespace Opm {
|
||||
int ecl_status() const;
|
||||
bool operator==(const SpiralICD& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_strength);
|
||||
serializer(m_length);
|
||||
serializer(m_density_calibration);
|
||||
serializer(m_viscosity_calibration);
|
||||
serializer(m_critical_value);
|
||||
serializer(m_width_transition_region);
|
||||
serializer(m_max_viscosity_ratio);
|
||||
serializer(m_method_flow_scaling);
|
||||
serializer(m_max_absolute_rate);
|
||||
serializer(m_status);
|
||||
serializer(m_scaling_factor);
|
||||
}
|
||||
|
||||
private:
|
||||
double m_strength;
|
||||
double m_length;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/icd.hpp>
|
||||
|
||||
@@ -47,6 +48,8 @@ namespace Opm {
|
||||
double pipeCrossA,
|
||||
ICDStatus stat);
|
||||
|
||||
static Valve serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, valv1>, <seg2, valv2> ...]
|
||||
@@ -76,6 +79,19 @@ namespace Opm {
|
||||
|
||||
bool operator==(const Valve& data) const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_con_flow_coeff);
|
||||
serializer(m_con_cross_area);
|
||||
serializer(m_con_max_cross_area);
|
||||
serializer(m_pipe_additional_length);
|
||||
serializer(m_pipe_diameter);
|
||||
serializer(m_pipe_roughness);
|
||||
serializer(m_pipe_cross_area);
|
||||
serializer(m_status);
|
||||
}
|
||||
|
||||
private:
|
||||
double m_con_flow_coeff;
|
||||
double m_con_cross_area;
|
||||
|
||||
@@ -62,9 +62,11 @@ namespace Opm {
|
||||
|
||||
|
||||
WellSegments() = default;
|
||||
WellSegments(const DeckKeyword& keyword);
|
||||
WellSegments(CompPressureDrop compDrop,
|
||||
const std::vector<Segment>& segments);
|
||||
explicit WellSegments(const DeckKeyword& keyword);
|
||||
|
||||
static WellSegments serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
double depthTopSegment() const;
|
||||
@@ -87,12 +89,23 @@ namespace Opm {
|
||||
bool operator!=( const WellSegments& ) const;
|
||||
|
||||
double segmentLength(const int segment_number) const;
|
||||
double segmentDepthChange(const int segment_number) const;
|
||||
std::vector<Segment> branchSegments(int branch) const;
|
||||
|
||||
// it returns true if there is no error encountered during the update
|
||||
bool updateWSEGSICD(const std::vector<std::pair<int, SpiralICD> >& sicd_pairs);
|
||||
const std::vector<Segment>& segments() const;
|
||||
|
||||
bool updateWSEGVALV(const std::vector<std::pair<int, Valve> >& valve_pairs);
|
||||
const std::vector<Segment>::const_iterator begin() const;
|
||||
const std::vector<Segment>::const_iterator end() const;
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(m_comp_pressure_drop);
|
||||
serializer.vector(m_segments);
|
||||
serializer(segment_number_to_index);
|
||||
}
|
||||
|
||||
private:
|
||||
void processABS();
|
||||
@@ -100,6 +113,7 @@ namespace Opm {
|
||||
void process(LengthDepth length_depth, double depth_top, double length_top);
|
||||
void addSegment(const Segment& new_segment);
|
||||
void loadWELSEGS( const DeckKeyword& welsegsKeyword);
|
||||
const Segment& topSegment() const;
|
||||
|
||||
// components of the pressure drop to be included
|
||||
CompPressureDrop m_comp_pressure_drop;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user