@@ -86,19 +86,19 @@ class TestMPILossyCavity:
8686 - 6.04105997e+01 ,- 3.06532160e+01 ,- 1.17749936e+01 ,- 3.12574866e+00 ,
8787 - 7.35339521e-01 ,- 1.13085658e-01 , 7.18247535e-01 , 8.73829036e-02 ])
8888
89- gridLogs = {'use_mesh_refinement' : False , 'Nx' : 60 , 'Ny' : 60 , 'Nz' : 140 , 'dx' : 0.00866666634877522 ,
90- 'dy' : 0.00866666634877522 , 'dz' : 0.005714285799435207 ,
91- 'xmin' : - 0.25999999046325684 , 'xmax' : 0.25999999046325684 ,
92- 'ymin' : - 0.25999999046325684 , 'ymax' : 0.25999999046325684 ,
93- 'zmin' : - 0.25 , 'zmax' : 0.550000011920929 ,
89+ gridLogs = {'use_mesh_refinement' : False , 'Nx' : 60 , 'Ny' : 60 , 'Nz' : 140 , 'dx' : 0.00866666634877522 ,
90+ 'dy' : 0.00866666634877522 , 'dz' : 0.005714285799435207 ,
91+ 'xmin' : - 0.25999999046325684 , 'xmax' : 0.25999999046325684 ,
92+ 'ymin' : - 0.25999999046325684 , 'ymax' : 0.25999999046325684 ,
93+ 'zmin' : - 0.25 , 'zmax' : 0.550000011920929 ,
9494 'stl_solids' : {'cavity' : 'tests/stl/007_vacuum_cavity.stl' , 'shell' : 'tests/stl/007_lossymetal_shell.stl' },
95- 'stl_materials' : {'cavity' : 'vacuum' , 'shell' : [30 , 1.0 , 30 ]},
95+ 'stl_materials' : {'cavity' : 'vacuum' , 'shell' : [30 , 1.0 , 30 ]},
9696 'gridInitializationTime' : 0 }
97-
97+
9898 solverLogs = {'use_gpu' : False , 'use_mpi' : False , 'background' : 'pec' ,
99- 'bc_low' : ['pec' , 'pec' , 'pec' ], 'bc_high' : ['pec' , 'pec' , 'pec' ],
99+ 'bc_low' : ['pec' , 'pec' , 'pec' ], 'bc_high' : ['pec' , 'pec' , 'pec' ],
100100 'dt' : 6.970326728398966e-12 , 'solverInitializationTime' : 0 }
101-
101+
102102 wakeSolverLogs = {'ti' : 2.8516132094735135e-09 , 'q' : 1e-09 , 'sigmaz' : 0.1 , 'beta' : 1.0 ,
103103 'xsource' : 0.0 , 'ysource' : 0.0 , 'xtest' : 0.0 , 'ytest' : 0.0 , 'chargedist' : None ,
104104 'skip_cells' : 10 , 'results_folder' : 'tests/007_results/' , 'wakelength' : 10.0 , 'simulationTime' : 0 }
@@ -252,29 +252,6 @@ def test_mpi_plot1D(self):
252252 xscale = 'linear' , yscale = 'linear' ,
253253 off_screen = True , title = self .img_folder + 'Ez1d' , n = 3000 )
254254
255- @pytest .mark .skipif (not flag_plot_3D , reason = "Requires interactive plotting" )
256- def test_mpi_plot3D (self ):
257- # Plot Abs Electric field on domain
258- # disabled when mpi = True
259- global solver
260- solver .plot3D ('E' , component = 'Abs' ,
261- cmap = 'rainbow' , clim = [0 , 500 ],
262- add_stl = ['cavity' , 'shell' ], stl_opacity = 0.1 ,
263- clip_interactive = True , clip_normal = '-y' )
264-
265- @pytest .mark .skipif (not flag_plot_3D , reason = "Requires interactive plotting" )
266- def test_mpi_plot3DonSTL (self ):
267- # Plot Abs Electric field on STL solid `cavity`
268- # disabled when mpi = True
269- global solver
270- solver .plot3DonSTL ('E' , component = 'Abs' ,
271- cmap = 'rainbow' , clim = [0 , 500 ],
272- stl_with_field = 'cavity' , field_opacity = 1.0 ,
273- stl_transparent = 'shell' , stl_opacity = 0.1 , stl_colors = 'white' ,
274- clip_plane = True , clip_normal = '-y' , clip_origin = [0 ,0 ,0 ],
275- off_screen = False , zoom = 1.2 , title = self .img_folder + 'Ez3d' )
276-
277-
278255 def test_mpi_wakefield (self ):
279256 # Reset fields
280257 global solver
@@ -343,7 +320,7 @@ def test_long_impedance(self):
343320 assert np .allclose (np .real (wake .Z )[::20 ], np .real (self .Z ), rtol = 0.1 ), "Real Impedance samples failed"
344321 assert np .allclose (np .imag (wake .Z )[::20 ], np .imag (self .Z ), rtol = 0.1 ), "Imag Impedance samples failed"
345322 assert np .cumsum (np .abs (wake .Z ))[- 1 ] == pytest .approx (250910.51090497518 , 0.1 ), "Abs Impedance cumsum failed"
346-
323+
347324 def test_log_file (self ):
348325 # Helper function to compare nested dicts with float tolerance
349326 def assert_dict_allclose (d1 , d2 , rtol = 1e-6 , atol = 1e-12 , path = "" ):
@@ -379,7 +356,7 @@ def assert_dict_allclose(d1, d2, rtol=1e-6, atol=1e-12, path=""):
379356
380357 global solver
381358 # Exclude timing info from comparison as they can vary between runs
382- solver .logger .grid ["gridInitializationTime" ] = 0
359+ solver .logger .grid ["gridInitializationTime" ] = 0
383360 solver .logger .solver ["solverInitializationTime" ] = 0
384361 solver .logger .wakeSolver ["simulationTime" ] = 0
385362 self .solverLogs ['use_mpi' ] = use_mpi
0 commit comments