@@ -43,7 +43,7 @@ def test_p0_source(self, grid_2d):
4343 result = kspaceFirstOrder (
4444 grid_2d , kWaveMedium (sound_speed = 1500 ), _p0_source ((64 , 64 )), kSensor (mask = np .ones ((64 , 64 ), dtype = bool )), backend = "python"
4545 )
46- assert result ["p" ].shape == (10 , 64 , 64 )
46+ assert result ["p" ].shape == (64 * 64 , 10 )
4747 assert np .max (np .abs (result ["p" ])) > 0
4848
4949 def test_heterogeneous_medium (self , grid_2d ):
@@ -56,7 +56,7 @@ def test_heterogeneous_medium(self, grid_2d):
5656 kSensor (mask = np .ones ((64 , 64 ), dtype = bool )),
5757 backend = "python" ,
5858 )
59- assert result ["p" ].shape == (10 , 64 , 64 )
59+ assert result ["p" ].shape == (64 * 64 , 10 )
6060
6161 def test_absorption (self , grid_2d ):
6262 result = kspaceFirstOrder (
@@ -66,7 +66,7 @@ def test_absorption(self, grid_2d):
6666 kSensor (mask = np .ones ((64 , 64 ), dtype = bool )),
6767 backend = "python" ,
6868 )
69- assert result ["p" ].shape == (10 , 64 , 64 )
69+ assert result ["p" ].shape == (64 * 64 , 10 )
7070
7171 def test_pml_auto (self ):
7272 kgrid = kWaveGrid (Vector ([128 , 128 ]), Vector ([0.1e-3 , 0.1e-3 ]))
@@ -84,7 +84,7 @@ def test_record_aggregates(self, grid_2d):
8484 sensor = kSensor (mask = np .ones ((64 , 64 ), dtype = bool ))
8585 sensor .record = ["p" , "p_max" , "p_rms" ]
8686 result = kspaceFirstOrder (grid_2d , kWaveMedium (sound_speed = 1500 ), _p0_source ((64 , 64 )), sensor , backend = "python" )
87- assert result ["p_max" ].shape == (64 , 64 )
87+ assert result ["p_max" ].shape == (64 * 64 , )
8888 assert "p_rms" in result
8989
9090
@@ -119,7 +119,7 @@ def test_nonlinearity_bona(self, grid_2d):
119119 kSensor (mask = np .ones ((64 , 64 ), dtype = bool )),
120120 backend = "python" ,
121121 )
122- assert result ["p" ].shape == (10 , 64 , 64 )
122+ assert result ["p" ].shape == (64 * 64 , 10 )
123123
124124 def test_stokes_absorption (self , grid_2d ):
125125 result = kspaceFirstOrder (
@@ -129,7 +129,7 @@ def test_stokes_absorption(self, grid_2d):
129129 kSensor (mask = np .ones ((64 , 64 ), dtype = bool )),
130130 backend = "python" ,
131131 )
132- assert result ["p" ].shape == (10 , 64 , 64 )
132+ assert result ["p" ].shape == (64 * 64 , 10 )
133133
134134 def test_dirichlet_pressure_source (self , grid_1d ):
135135 source = kSource ()
@@ -146,16 +146,16 @@ def test_velocity_recording(self, grid_2d):
146146 sensor = kSensor (mask = np .ones ((64 , 64 ), dtype = bool ))
147147 sensor .record = ["p" , "ux" , "uy" , "ux_max" , "uy_rms" , "ux_final" , "p_final" ]
148148 result = kspaceFirstOrder (grid_2d , kWaveMedium (sound_speed = 1500 ), _p0_source ((64 , 64 )), sensor , backend = "python" )
149- assert result ["ux" ].shape == (10 , 64 , 64 )
150- assert result ["ux_max" ].shape == (64 , 64 )
149+ assert result ["ux" ].shape == (64 * 64 , 10 )
150+ assert result ["ux_max" ].shape == (64 * 64 , )
151151 assert "ux_final" in result and "p_final" in result
152152
153153 def test_intensity_recording (self , grid_2d ):
154154 sensor = kSensor (mask = np .ones ((64 , 64 ), dtype = bool ))
155155 sensor .record = ["p" , "ux" , "uy" , "Ix" , "Iy" , "Ix_avg" , "Iy_avg" ]
156156 result = kspaceFirstOrder (grid_2d , kWaveMedium (sound_speed = 1500 ), _p0_source ((64 , 64 )), sensor , backend = "python" )
157- assert result ["Ix" ].shape == (10 , 64 , 64 )
158- assert result ["Ix_avg" ].shape == (64 , 64 )
157+ assert result ["Ix" ].shape == (64 * 64 , 10 )
158+ assert result ["Ix_avg" ].shape == (64 * 64 , )
159159
160160 def test_record_start_index (self , grid_1d ):
161161 source = kSource ()
@@ -172,7 +172,7 @@ def test_sensor_none_records_everywhere(self, grid_1d):
172172 source .p0 = np .zeros (64 )
173173 source .p0 [32 ] = 1.0
174174 result = kspaceFirstOrder (grid_1d , kWaveMedium (sound_speed = 1500 ), source , None , backend = "python" , pml_inside = True )
175- assert result ["p" ].shape == (20 , 64 )
175+ assert result ["p" ].shape == (64 , 20 )
176176
177177
178178class TestCppSaveOnly :
0 commit comments