Skip to content

Commit db56325

Browse files
committed
Set old default cell sizes in runtests where it isn't passed through the cell_size argument
1 parent e42b10e commit db56325

17 files changed

Lines changed: 123 additions & 17 deletions

simpeg_drivers/plate_simulation/driver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def make_mesh(self) -> Octree:
192192
survey=self.survey,
193193
topography=self.simulation_parameters.active_cells.topography_object,
194194
plates=surfaces,
195+
name=self.params.mesh.name,
195196
)
196197

197198
mesh.parent = self._out_group
@@ -271,8 +272,6 @@ def replicate(
271272
"""
272273
Replicate a plate n times along an azimuth centered at origin.
273274
274-
Plate names will be indexed.
275-
276275
:param plate: models.parametric.Plate to be replicated.
277276
:param number: Number of plates returned.
278277
:param spacing: Spacing between plates.

simpeg_drivers/utils/meshes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def auto_mesh_parameters(
107107
{
108108
"refinement_object": topography,
109109
"levels": topography_refinement,
110-
"horizon": True,
110+
"horizon": False,
111111
},
112112
None,
113113
],

tests/run_tests/driver_airborne_fem_test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ def test_fem_name_change(tmp_path, caplog):
5050
refine_plate=True,
5151
survey=SurveyOptions(n_stations=2, n_lines=2, drape=15.0),
5252
mesh=MeshOptions(
53-
survey_refinement=[
54-
2,
55-
],
53+
survey_refinement=[2],
5654
topography_refinement=[0, 0, 1],
57-
plate_refinement=[
58-
4,
59-
],
55+
plate_refinement=[1],
6056
padding_distance=400.0,
6157
),
6258
model=ModelOptions(background=1e-3),

tests/run_tests/driver_airborne_tem_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def test_bad_waveform(tmp_path: Path):
5151
n_stations=n_grid_points, n_lines=n_grid_points, drape=10.0
5252
),
5353
mesh=MeshOptions(
54+
u_cell_size=20.0,
55+
v_cell_size=20.0,
56+
w_cell_size=20.0,
5457
survey_refinement=list(refinement),
5558
topography_refinement=[0, 0, 1],
5659
plate_refinement=[1],

tests/run_tests/driver_dc_test.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ def test_dc_3d_fwr_run(
5050
method="direct current 3d",
5151
refine_plate=True,
5252
survey=SurveyOptions(n_stations=n_electrodes, n_lines=n_lines),
53-
mesh=MeshOptions(refinement=refinement),
53+
mesh=MeshOptions(
54+
u_cell_size=20.0,
55+
v_cell_size=20.0,
56+
w_cell_size=20.0,
57+
survey_refinement=list(refinement),
58+
topography_refinement=[0, 0, 1],
59+
plate_refinement=[1],
60+
),
5461
model=ModelOptions(background=0.01, anomaly=10.0),
5562
)
5663
with get_workspace(tmp_path / "inversion_test.ui.geoh5") as geoh5:
@@ -153,7 +160,14 @@ def test_dc_single_line_fwr_run(
153160
method="direct current 3d",
154161
refine_plate=True,
155162
survey=SurveyOptions(n_stations=n_electrodes, n_lines=n_lines),
156-
mesh=MeshOptions(refinement=refinement),
163+
mesh=MeshOptions(
164+
u_cell_size=20.0,
165+
v_cell_size=20.0,
166+
w_cell_size=20.0,
167+
survey_refinement=list(refinement),
168+
topography_refinement=[0, 0, 1],
169+
plate_refinement=[1],
170+
),
157171
model=ModelOptions(background=0.01, anomaly=10.0),
158172
)
159173
with get_workspace(tmp_path / "inversion_test.ui.geoh5") as geoh5:

tests/run_tests/driver_grav_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ def test_gravity_fwr_run(
5353
geoh5=geoh5,
5454
options=SyntheticsComponentsOptions(
5555
method="gravity",
56+
refine_plate=True,
5657
survey=SurveyOptions(
5758
n_stations=n_grid_points, n_lines=n_grid_points, drape=5.0
5859
),
5960
mesh=MeshOptions(
61+
u_cell_size=20.0,
62+
v_cell_size=20.0,
63+
w_cell_size=20.0,
6064
survey_refinement=list(refinement),
6165
topography_refinement=[0, 0, 1],
6266
plate_refinement=[1],

tests/run_tests/driver_ground_tem_test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ def test_tiling_ground_tem(
6363
topography=lambda x, y: np.zeros(x.shape),
6464
name="ground_tdem_survey",
6565
),
66-
mesh=MeshOptions(refinement=refinement, padding_distance=1000.0),
66+
mesh=MeshOptions(
67+
u_cell_size=20.0,
68+
v_cell_size=20.0,
69+
w_cell_size=20.0,
70+
survey_refinement=list(refinement),
71+
topography_refinement=[0, 0, 1],
72+
plate_refinement=[1],
73+
padding_distance=1000.0,
74+
),
6775
model=ModelOptions(
6876
background=0.001,
6977
plate=PlateModel(

tests/run_tests/driver_ip_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ def test_ip_3d_fwr_run(
4949
method="induced polarization 3d",
5050
refine_plate=True,
5151
survey=SurveyOptions(n_stations=n_electrodes, n_lines=n_lines),
52-
mesh=MeshOptions(refinement=refinement),
52+
mesh=MeshOptions(
53+
u_cell_size=20.0,
54+
v_cell_size=20.0,
55+
w_cell_size=20.0,
56+
survey_refinement=refinement,
57+
topography_refinement=[0, 0, 1],
58+
plate_refinement=[1],
59+
),
5360
model=ModelOptions(background=1e-6, anomaly=1e-1),
5461
)
5562
with get_workspace(tmp_path / "inversion_test.ui.geoh5") as geoh5:

tests/run_tests/driver_joint_cross_gradient_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def test_joint_cross_gradient_fwr_run(
7070
n_stations=n_grid_points, n_lines=n_grid_points, drape=15.0, name="survey A"
7171
),
7272
mesh=MeshOptions(
73+
u_cell_size=20.0,
74+
v_cell_size=20.0,
75+
w_cell_size=20.0,
7376
survey_refinement=list(refinement),
7477
topography_refinement=[0, 0, 1],
7578
plate_refinement=[1],
@@ -92,13 +95,17 @@ def test_joint_cross_gradient_fwr_run(
9295
with geoh5.open():
9396
opts = SyntheticsComponentsOptions(
9497
method="magnetic_vector",
98+
refine_plate=True,
9599
survey=SurveyOptions(
96100
n_stations=n_grid_points,
97101
n_lines=n_grid_points,
98102
drape=15.0,
99103
name="survey B",
100104
),
101105
mesh=MeshOptions(
106+
u_cell_size=20.0,
107+
v_cell_size=20.0,
108+
w_cell_size=20.0,
102109
survey_refinement=list(refinement),
103110
topography_refinement=[0, 0, 1],
104111
plate_refinement=[1],
@@ -123,10 +130,14 @@ def test_joint_cross_gradient_fwr_run(
123130
with geoh5.open():
124131
opts = SyntheticsComponentsOptions(
125132
method="direct current 3d",
133+
refine_plate=True,
126134
survey=SurveyOptions(
127135
n_stations=n_grid_points, n_lines=n_lines, name="survey C"
128136
),
129137
mesh=MeshOptions(
138+
u_cell_size=20.0,
139+
v_cell_size=20.0,
140+
w_cell_size=20.0,
130141
survey_refinement=list(refinement),
131142
topography_refinement=[0, 0, 1],
132143
plate_refinement=[1],

tests/run_tests/driver_joint_pgi_homogeneous_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def test_homogeneous_fwr_run(
7171
name="survey A",
7272
),
7373
mesh=MeshOptions(
74+
u_cell_size=20.0,
75+
v_cell_size=20.0,
76+
w_cell_size=20.0,
7477
survey_refinement=list(refinement),
7578
topography_refinement=[0, 0, 1],
7679
plate_refinement=[1],
@@ -98,13 +101,17 @@ def test_homogeneous_fwr_run(
98101
with geoh5.open():
99102
opts = SyntheticsComponentsOptions(
100103
method="magnetic_vector",
104+
refine_plate=True,
101105
survey=SurveyOptions(
102106
n_stations=n_grid_points,
103107
n_lines=n_grid_points,
104108
drape=15.0,
105109
name="survey B",
106110
),
107111
mesh=MeshOptions(
112+
u_cell_size=20.0,
113+
v_cell_size=20.0,
114+
w_cell_size=20.0,
108115
survey_refinement=list(refinement),
109116
topography_refinement=[0, 0, 1],
110117
plate_refinement=[1],

0 commit comments

Comments
 (0)