Skip to content

Commit 5d24822

Browse files
committed
Add velocites to tests to imprve coverage.
1 parent 06a52c1 commit 5d24822

File tree

9 files changed

+228
-159
lines changed

9 files changed

+228
-159
lines changed

tests/gwb-dat/app_oceanic_plate_cartesian.wb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
{"model":"oceanic plate", "name":"First continental plate", "max depth":250e3, "coordinates":[[-1e3,500e3],[500e3,500e3],[500e3,1000e3],[-1e3,1000e3]],
99
"temperature models":[{"model":"uniform", "max depth":75e3, "temperature":150},
1010
{"model":"uniform", "min depth":75e3, "max depth":150e3, "temperature":100},
11-
{"model":"uniform", "min depth":150e3, "max depth":22.5e3, "temperature":50}]},
11+
{"model":"uniform", "min depth":150e3, "max depth":22.5e3, "temperature":50}],
12+
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]},
1213

1314
{"model":"oceanic plate", "name":"Second continental plate", "coordinates":[[2000e3,2000e3],[1000e3,2000e3],[1000e3,1000e3],[2000e3,1000e3]],
1415
"temperature models":[{"model":"adiabatic", "potential mantle temperature":20}],

tests/gwb-dat/cartesian_fault_x_and_y_direction.wb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
"coordinates":[[0, 0], [500e3,0],[1000e3,0]], "dip point":[10, 10],
88
"segments":[{"length":100e3, "thickness":[100e3], "angle":[80]}],
99
"temperature models":[{"model":"uniform", "temperature":10}],
10-
"composition models":[{"model":"uniform", "compositions":[0]}]},
10+
"composition models":[{"model":"uniform", "compositions":[0]}],
11+
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]},
1112
{"model":"fault", "name":"y-fault", "min depth":0, "max depth":1000e3,
1213
"coordinates":[[0, 0], [0, 500e3], [0, 1000e3]], "dip point":[10, 10],
1314
"segments":[{"length":100e3, "thickness":[100e3], "angle":[80]}],
1415
"temperature models":[{"model":"uniform", "temperature":20}],
15-
"composition models":[{"model":"uniform", "compositions":[1]}]}
16+
"composition models":[{"model":"uniform", "compositions":[1]}],
17+
"velocity models":[{"model":"uniform raw","velocity":[4,5,6]}]}
1618
]
1719
}
Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,69 @@
1-
# x y z d g T vx vy vz c0 c1 tag
2-
-20000 90000 990000 10000 20 0 0 2 0 1 0
3-
-20000 580000 990000 10000 20 0 0 2 0 1 0
4-
-20000 910000 990000 10000 20 0 0 2 0 1 0
5-
70000 -30000 990000 10000 10 0 0 2 1 0 0
6-
440000 -30000 990000 10000 10 0 0 2 1 0 0
7-
910000 -30000 990000 10000 10 0 0 2 1 0 0
1+
Expected fail with:
2+
AssertThrow `(..error type..)` failed in (..path..)/source/world_builder/parameters.cc at line (..line..): Invalid schema: #/properties/features/items
3+
Invalid keyword: oneOfInvalid schema: #/features/0
4+
Error document:
5+
#/features/0{
6+
"oneOf": {
7+
"errors": [
8+
{
9+
"enum": {
10+
"instanceRef": "#/features/0/model",
11+
"schemaRef": "#/properties/features/items/oneOf/0/properties/model"
12+
}
13+
},
14+
{
15+
"oneOf": {
16+
"errors": [
17+
{
18+
"enum": {
19+
"instanceRef": "#/features/0/velocity%20models/0/model",
20+
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/0/properties/model"
21+
}
22+
},
23+
{
24+
"enum": {
25+
"instanceRef": "#/features/0/velocity%20models/0/model",
26+
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/1/properties/model"
27+
}
28+
},
29+
{
30+
"enum": {
31+
"instanceRef": "#/features/0/velocity%20models/0/model",
32+
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/2/properties/model"
33+
}
34+
}
35+
],
36+
"instanceRef": "#/features/0/velocity%20models/0",
37+
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items"
38+
}
39+
},
40+
{
41+
"enum": {
42+
"instanceRef": "#/features/0/model",
43+
"schemaRef": "#/properties/features/items/oneOf/2/properties/model"
44+
}
45+
},
46+
{
47+
"enum": {
48+
"instanceRef": "#/features/0/model",
49+
"schemaRef": "#/properties/features/items/oneOf/3/properties/model"
50+
}
51+
},
52+
{
53+
"enum": {
54+
"instanceRef": "#/features/0/model",
55+
"schemaRef": "#/properties/features/items/oneOf/4/properties/model"
56+
}
57+
},
58+
{
59+
"enum": {
60+
"instanceRef": "#/features/0/model",
61+
"schemaRef": "#/properties/features/items/oneOf/5/properties/model"
62+
}
63+
}
64+
],
65+
"instanceRef": "#/features/0",
66+
"schemaRef": "#/properties/features/items"
67+
}
68+
}
69+

tests/gwb-dat/cartesian_slab_linear_adiabat.wb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{"length":460e3,"thickness":[300e3],"top truncation":[-300e3],"angle":[45]}],
1515
"temperature models":[{"model":"linear", "top temperature":10, "bottom temperature":-1, "max distance slab top":300e3}],
1616
"composition models":[
17-
{"model":"uniform", "compositions":[0], "max distance slab top":100e3}]
17+
{"model":"uniform", "compositions":[0], "max distance slab top":100e3}],
18+
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]
1819
}
1920
]
2021
}

tests/gwb-dat/cartesian_slab_linear_adiabat/screen-output.log

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
2490e3 0 5e3 1675.6 0 2 0
33
2495e3 0 5e3 1675.6 0 2 0
44
2460e3 0 25e3 1686.02 0 2 0
5-
2475e3 0 35e3 53.0405 0 2 0
6-
2495e3 0 55e3 225.202 0 2 0
7-
2540e3 0 125e3 720.168 0 2 0
5+
2475e3 0 35e3 53.0405 1 3 0
6+
2495e3 0 55e3 225.202 1 3 0
7+
2540e3 0 125e3 720.168 1 3 0
88
2365e3 0 125e3 1739.1 0 2 0
9-
2375e3 0 135e3 53.0405 0 2 0
10-
2395e3 0 160e3 246.723 0 2 0
11-
2425e3 0 200e3 548.006 0 2 0
9+
2375e3 0 135e3 53.0405 1 3 0
10+
2395e3 0 160e3 246.723 1 3 0
11+
2425e3 0 200e3 548.006 1 3 0
1212
2085e3 0 395e3 1890.93 0 2 0
13-
2095e3 0 425e3 96.081 0 2 0
14-
2125e3 0 445e3 311.283 0 2 0
15-
2155e3 0 470e3 548.006 0 2 0
13+
2095e3 0 425e3 96.081 1 3 0
14+
2125e3 0 445e3 311.283 1 3 0
15+
2155e3 0 470e3 548.006 1 3 0

tests/gwb-dat/mantle_layer_min_max_surface_spherical.wb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"min depth":[[50e3,[[0,5]]],[200e3,[[10,5]]]], "max depth":[[200e3],[100e3,[[0,5],[10,5],[0,0]]]]},
2020
{"model":"uniform", "compositions":[0,1],"rotation matrices":[[[19,20,21],[22,23,24],[25,26,27]],[[28,29,30],[31,32,33],[34,35,36]]],"grain sizes":[-1,0.3],
2121
"min depth":[[200e3],[100e3,[[0,5],[10,5],[0,0]]]], "max depth":[[300e3],[200e3,[[0,5],[10,5]]]]}
22-
]
22+
],
23+
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]
2324
},
2425
{
2526
"model":"mantle layer", "name":"Var thickness continent 2", "coordinates":[[175,10],[185,10],[185,0],[175,0]],
@@ -37,7 +38,8 @@
3738
"min depth":[[50e3,[[175,5]]],[200e3,[[185,5]]]], "max depth":[[200e3],[100e3,[[175,5],[185,5],[175,0]]]]},
3839
{"model":"uniform", "compositions":[175,1],"rotation matrices":[[[19,20,21],[22,23,24],[25,26,27]],[[28,29,30],[31,32,33],[34,35,36]]],"grain sizes":[-1,0.3],
3940
"min depth":[[200e3],[100e3,[[175,5],[185,5],[175,0]]]], "max depth":[[300e3],[200e3,[[175,5],[185,5]]]]}
40-
]
41+
],
42+
"velocity models":[{"model":"uniform raw","velocity":[4,5,6]}]
4143
}
4244
]
4345
}

0 commit comments

Comments
 (0)