Add additional Snapshot tests (2D slices of 3D model)

这个提交包含在:
nmannall
2024-08-06 13:44:37 +01:00
父节点 d4276e44f9
当前提交 9a4d576284
共有 22 个文件被更改,包括 86 次插入8 次删除

查看文件

@@ -0,0 +1,20 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#waveform: gaussiandot 1 1e9 myWave
#hertzian_dipole: z 0.050 0.050 0.050 myWave
#snapshot: 0.005 0 0 0.006 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot_x_05.h5
#snapshot: 0.035 0 0 0.036 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot_x_35.h5
#snapshot: 0.065 0 0 0.066 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot_x_65.h5
#snapshot: 0.095 0 0 0.096 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot_x_95.h5
#snapshot: 0 0.015 0 0.100 0.016 0.100 0.01 0.01 0.01 2e-9 snapshot_y_15.h5
#snapshot: 0 0.045 0 0.100 0.046 0.100 0.01 0.01 0.01 2e-9 snapshot_y_45.h5
#snapshot: 0 0.075 0 0.100 0.076 0.100 0.01 0.01 0.01 2e-9 snapshot_y_75.h5
#snapshot: 0 0 0.025 0.100 0.100 0.026 0.01 0.01 0.01 2e-9 snapshot_z_25.h5
#snapshot: 0 0 0.055 0.100 0.100 0.056 0.01 0.01 0.01 2e-9 snapshot_z_55.h5
#snapshot: 0 0 0.055 0.100 0.100 0.086 0.01 0.01 0.01 2e-9 snapshot_z_85.h5

查看文件

@@ -6,4 +6,7 @@
#waveform: gaussiandot 1 1e9 myWave
#hertzian_dipole: z 0.050 0.050 0.050 myWave
#snapshot: 0 0 0 0.100 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot.h5
#snapshot: 0 0 0 0.100 0.100 0.100 0.01 0.01 0.01 1 snapshot_0.h5
#snapshot: 0 0 0 0.100 0.100 0.100 0.01 0.01 0.01 1e-9 snapshot_1.h5
#snapshot: 0 0 0 0.100 0.100 0.100 0.01 0.01 0.01 2e-9 snapshot_2.h5
#snapshot: 0 0 0 0.100 0.100 0.100 0.01 0.01 0.01 3e-9 snapshot_3.h5

查看文件

@@ -6,4 +6,7 @@
#waveform: gaussiandot 1 1e9 myWave
#hertzian_dipole: z 0.050 0.050 0 myWave
#snapshot: 0 0 0 0.100 0.100 0.001 0.01 0.01 0.01 2e-9 snapshot.h5
#snapshot: 0 0 0 0.100 0.100 0.001 0.01 0.01 0.01 1 snapshot_0.h5
#snapshot: 0 0 0 0.100 0.100 0.001 0.01 0.01 0.01 1e-9 snapshot_1.h5
#snapshot: 0 0 0 0.100 0.100 0.001 0.01 0.01 0.01 2e-9 snapshot_2.h5
#snapshot: 0 0 0 0.100 0.100 0.001 0.01 0.01 0.01 3e-9 snapshot_3.h5

查看文件

@@ -10,7 +10,7 @@ class Test2DSnapshot(GprMaxRegressionTest):
sourcesdir = "src/snapshot_tests"
model = parameter(["whole_domain_2d"])
has_receiver_output = False
snapshots = ["snapshot.h5"]
snapshots = ["snapshot_0.h5", "snapshot_1.h5", "snapshot_2.h5", "snapshot_3.h5"]
@rfm.simple_test
@@ -19,7 +19,27 @@ class TestSnapshot(GprMaxRegressionTest):
sourcesdir = "src/snapshot_tests"
model = parameter(["whole_domain"])
has_receiver_output = False
snapshots = ["snapshot.h5"]
snapshots = ["snapshot_0.h5", "snapshot_1.h5", "snapshot_2.h5", "snapshot_3.h5"]
@rfm.simple_test
class Test2DSliceSnapshot(GprMaxRegressionTest):
tags = {"test", "serial", "2d", "waveform", "hertzian_dipole", "snapshot"}
sourcesdir = "src/snapshot_tests"
model = parameter(["2d_slices"])
has_receiver_output = False
snapshots = [
"snapshot_x_05.h5",
"snapshot_x_35.h5",
"snapshot_x_65.h5",
# "snapshot_x_95.h5", # Fails due to out-of-bounds error
"snapshot_y_15.h5",
"snapshot_y_45.h5",
"snapshot_y_75.h5",
"snapshot_z_25.h5",
"snapshot_z_55.h5",
"snapshot_z_85.h5",
]
"""Test MPI Functionality
@@ -37,6 +57,38 @@ class Test2DSnapshotMpi(GprMaxMPIRegressionTest):
@rfm.simple_test
class TestSnapshotMpi(GprMaxMPIRegressionTest):
tags = {"test", "mpi", "2d", "waveform", "hertzian_dipole", "snapshot"}
mpi_layout = parameter([[2, 2, 2], [3, 3, 3], [4, 4, 4]])
mpi_layout = parameter(
[
[2, 1, 1],
[1, 2, 1],
[1, 1, 2],
[3, 1, 1],
[1, 3, 1],
[1, 1, 3],
[2, 2, 2],
[3, 3, 3],
[4, 4, 4],
]
)
serial_dependency = TestSnapshot
model = serial_dependency.model
@rfm.simple_test
class Test2DSliceSnapshotMpi(GprMaxMPIRegressionTest):
tags = {"test", "mpi", "2d", "waveform", "hertzian_dipole", "snapshot"}
mpi_layout = parameter(
[
[2, 1, 1],
[1, 2, 1],
[1, 1, 2],
[3, 1, 1],
[1, 3, 1],
[1, 1, 3],
[2, 2, 2],
[3, 3, 3],
[4, 4, 4],
]
)
serial_dependency = Test2DSliceSnapshot
model = serial_dependency.model