Skip to content

Commit

Permalink
Add velocites to tests to imprve coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
MFraters committed Oct 20, 2024
1 parent 06a52c1 commit 5d24822
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 159 deletions.
3 changes: 2 additions & 1 deletion tests/gwb-dat/app_oceanic_plate_cartesian.wb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
{"model":"oceanic plate", "name":"First continental plate", "max depth":250e3, "coordinates":[[-1e3,500e3],[500e3,500e3],[500e3,1000e3],[-1e3,1000e3]],
"temperature models":[{"model":"uniform", "max depth":75e3, "temperature":150},
{"model":"uniform", "min depth":75e3, "max depth":150e3, "temperature":100},
{"model":"uniform", "min depth":150e3, "max depth":22.5e3, "temperature":50}]},
{"model":"uniform", "min depth":150e3, "max depth":22.5e3, "temperature":50}],
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]},

{"model":"oceanic plate", "name":"Second continental plate", "coordinates":[[2000e3,2000e3],[1000e3,2000e3],[1000e3,1000e3],[2000e3,1000e3]],
"temperature models":[{"model":"adiabatic", "potential mantle temperature":20}],
Expand Down
6 changes: 4 additions & 2 deletions tests/gwb-dat/cartesian_fault_x_and_y_direction.wb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
"coordinates":[[0, 0], [500e3,0],[1000e3,0]], "dip point":[10, 10],
"segments":[{"length":100e3, "thickness":[100e3], "angle":[80]}],
"temperature models":[{"model":"uniform", "temperature":10}],
"composition models":[{"model":"uniform", "compositions":[0]}]},
"composition models":[{"model":"uniform", "compositions":[0]}],
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]},
{"model":"fault", "name":"y-fault", "min depth":0, "max depth":1000e3,
"coordinates":[[0, 0], [0, 500e3], [0, 1000e3]], "dip point":[10, 10],
"segments":[{"length":100e3, "thickness":[100e3], "angle":[80]}],
"temperature models":[{"model":"uniform", "temperature":20}],
"composition models":[{"model":"uniform", "compositions":[1]}]}
"composition models":[{"model":"uniform", "compositions":[1]}],
"velocity models":[{"model":"uniform raw","velocity":[4,5,6]}]}
]
}
76 changes: 69 additions & 7 deletions tests/gwb-dat/cartesian_fault_x_and_y_direction/screen-output.log
Original file line number Diff line number Diff line change
@@ -1,7 +1,69 @@
# x y z d g T vx vy vz c0 c1 tag
-20000 90000 990000 10000 20 0 0 2 0 1 0
-20000 580000 990000 10000 20 0 0 2 0 1 0
-20000 910000 990000 10000 20 0 0 2 0 1 0
70000 -30000 990000 10000 10 0 0 2 1 0 0
440000 -30000 990000 10000 10 0 0 2 1 0 0
910000 -30000 990000 10000 10 0 0 2 1 0 0
Expected fail with:
AssertThrow `(..error type..)` failed in (..path..)/source/world_builder/parameters.cc at line (..line..): Invalid schema: #/properties/features/items
Invalid keyword: oneOfInvalid schema: #/features/0
Error document:
#/features/0{
"oneOf": {
"errors": [
{
"enum": {
"instanceRef": "#/features/0/model",
"schemaRef": "#/properties/features/items/oneOf/0/properties/model"
}
},
{
"oneOf": {
"errors": [
{
"enum": {
"instanceRef": "#/features/0/velocity%20models/0/model",
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/0/properties/model"
}
},
{
"enum": {
"instanceRef": "#/features/0/velocity%20models/0/model",
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/1/properties/model"
}
},
{
"enum": {
"instanceRef": "#/features/0/velocity%20models/0/model",
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items/oneOf/2/properties/model"
}
}
],
"instanceRef": "#/features/0/velocity%20models/0",
"schemaRef": "#/properties/features/items/oneOf/1/properties/velocity%20models/items"
}
},
{
"enum": {
"instanceRef": "#/features/0/model",
"schemaRef": "#/properties/features/items/oneOf/2/properties/model"
}
},
{
"enum": {
"instanceRef": "#/features/0/model",
"schemaRef": "#/properties/features/items/oneOf/3/properties/model"
}
},
{
"enum": {
"instanceRef": "#/features/0/model",
"schemaRef": "#/properties/features/items/oneOf/4/properties/model"
}
},
{
"enum": {
"instanceRef": "#/features/0/model",
"schemaRef": "#/properties/features/items/oneOf/5/properties/model"
}
}
],
"instanceRef": "#/features/0",
"schemaRef": "#/properties/features/items"
}
}

3 changes: 2 additions & 1 deletion tests/gwb-dat/cartesian_slab_linear_adiabat.wb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{"length":460e3,"thickness":[300e3],"top truncation":[-300e3],"angle":[45]}],
"temperature models":[{"model":"linear", "top temperature":10, "bottom temperature":-1, "max distance slab top":300e3}],
"composition models":[
{"model":"uniform", "compositions":[0], "max distance slab top":100e3}]
{"model":"uniform", "compositions":[0], "max distance slab top":100e3}],
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]
}
]
}
18 changes: 9 additions & 9 deletions tests/gwb-dat/cartesian_slab_linear_adiabat/screen-output.log
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
2490e3 0 5e3 1675.6 0 2 0
2495e3 0 5e3 1675.6 0 2 0
2460e3 0 25e3 1686.02 0 2 0
2475e3 0 35e3 53.0405 0 2 0
2495e3 0 55e3 225.202 0 2 0
2540e3 0 125e3 720.168 0 2 0
2475e3 0 35e3 53.0405 1 3 0
2495e3 0 55e3 225.202 1 3 0
2540e3 0 125e3 720.168 1 3 0
2365e3 0 125e3 1739.1 0 2 0
2375e3 0 135e3 53.0405 0 2 0
2395e3 0 160e3 246.723 0 2 0
2425e3 0 200e3 548.006 0 2 0
2375e3 0 135e3 53.0405 1 3 0
2395e3 0 160e3 246.723 1 3 0
2425e3 0 200e3 548.006 1 3 0
2085e3 0 395e3 1890.93 0 2 0
2095e3 0 425e3 96.081 0 2 0
2125e3 0 445e3 311.283 0 2 0
2155e3 0 470e3 548.006 0 2 0
2095e3 0 425e3 96.081 1 3 0
2125e3 0 445e3 311.283 1 3 0
2155e3 0 470e3 548.006 1 3 0
6 changes: 4 additions & 2 deletions tests/gwb-dat/mantle_layer_min_max_surface_spherical.wb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"min depth":[[50e3,[[0,5]]],[200e3,[[10,5]]]], "max depth":[[200e3],[100e3,[[0,5],[10,5],[0,0]]]]},
{"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],
"min depth":[[200e3],[100e3,[[0,5],[10,5],[0,0]]]], "max depth":[[300e3],[200e3,[[0,5],[10,5]]]]}
]
],
"velocity models":[{"model":"uniform raw","velocity":[1,2,3]}]
},
{
"model":"mantle layer", "name":"Var thickness continent 2", "coordinates":[[175,10],[185,10],[185,0],[175,0]],
Expand All @@ -37,7 +38,8 @@
"min depth":[[50e3,[[175,5]]],[200e3,[[185,5]]]], "max depth":[[200e3],[100e3,[[175,5],[185,5],[175,0]]]]},
{"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],
"min depth":[[200e3],[100e3,[[175,5],[185,5],[175,0]]]], "max depth":[[300e3],[200e3,[[175,5],[185,5]]]]}
]
],
"velocity models":[{"model":"uniform raw","velocity":[4,5,6]}]
}
]
}
Loading

0 comments on commit 5d24822

Please sign in to comment.