From f7506f4aa397d8b6cdf6f5cff67ff088d629a0f8 Mon Sep 17 00:00:00 2001 From: roelof-groenewald Date: Sun, 3 Dec 2023 18:23:25 -0800 Subject: [PATCH] more updates to CI tests and checksum benchmarks --- .../Tests/ohm_solver_EM_modes/PICMI_inputs.py | 3 +-- .../ohm_solver_EM_modes/PICMI_inputs_rz.py | 2 +- .../PICMI_inputs.py | 7 +++--- .../analysis.py | 8 +++---- ...hon_ohms_law_solver_landau_damping_2d.json | 22 +++++++++---------- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs.py b/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs.py index 9363bcebd18..4f3cd731323 100644 --- a/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs.py +++ b/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs.py @@ -58,7 +58,7 @@ class EMModes(object): # Plasma resistivity - used to dampen the mode excitation eta = [[1e-7, 1e-7], [1e-7, 1e-5], [1e-7, 1e-4]] # Number of substeps used to update B - substeps = [[250, 500], [250, 750], [250, 1000]] + substeps = 20 def __init__(self, test, dim, B_dir, verbose): """Get input parameters for the specific case desired.""" @@ -149,7 +149,6 @@ def get_simulation_parameters(self): self.NPPC = self.NPPC[self.dim-1] self.eta = self.eta[self.dim-1][idx] - self.substeps = self.substeps[self.dim-1][idx] def get_plasma_quantities(self): """Calculate various plasma parameters based on the simulation input.""" diff --git a/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs_rz.py b/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs_rz.py index 21d8cafe750..81ba65e5b28 100644 --- a/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs_rz.py +++ b/Examples/Tests/ohm_solver_EM_modes/PICMI_inputs_rz.py @@ -53,7 +53,7 @@ class CylindricalNormalModes(object): # Plasma resistivity - used to dampen the mode excitation eta = 5e-4 # Number of substeps used to update B - substeps = 250 + substeps = 20 def __init__(self, test, verbose): """Get input parameters for the specific case desired.""" diff --git a/Examples/Tests/ohm_solver_ion_beam_instability/PICMI_inputs.py b/Examples/Tests/ohm_solver_ion_beam_instability/PICMI_inputs.py index b15cb4d97c8..bae83f978ee 100644 --- a/Examples/Tests/ohm_solver_ion_beam_instability/PICMI_inputs.py +++ b/Examples/Tests/ohm_solver_ion_beam_instability/PICMI_inputs.py @@ -54,7 +54,7 @@ class HybridPICBeamInstability(object): # Plasma resistivity - used to dampen the mode excitation eta = 1e-7 # Number of substeps used to update B - substeps = 20 + substeps = 10 # Beam parameters n_beam = [0.02, 0.1] @@ -95,10 +95,9 @@ def __init__(self, test, dim, resonant, verbose): diag_period = 1 / 4.0 # Output interval (ion cyclotron periods) self.diag_steps = int(diag_period / self.DT) - # if this is a test case run for only 25 cyclotron periods and use - # fewer substeps to speed up the simulation + # if this is a test case run for only 25 cyclotron periods if self.test: - self.LT = 30.0 + self.LT = 25.0 self.total_steps = int(np.ceil(self.LT / self.DT)) diff --git a/Examples/Tests/ohm_solver_ion_beam_instability/analysis.py b/Examples/Tests/ohm_solver_ion_beam_instability/analysis.py index 84ecc7b4dca..d51699553fc 100755 --- a/Examples/Tests/ohm_solver_ion_beam_instability/analysis.py +++ b/Examples/Tests/ohm_solver_ion_beam_instability/analysis.py @@ -190,11 +190,11 @@ # assert's fail, the full benchmark should be rerun (same as the test but # without the `--test` argument) and the growth rates (up to saturation) # compared to the theoretical ones to determine if the physics test passes. - # At creation, the full test (3d) had the following errors when ran on 1 V100: + # At creation, the full test (3d) had the following errors (ran on 1 V100): # m4_rms_error = 3.329; m5_rms_error = 1.052; m6_rms_error = 2.583 - assert m4_rms_error < 1.5 - assert m5_rms_error < 0.4 - assert m6_rms_error < 1.25 + assert m4_rms_error < 0.8 + assert m5_rms_error < 1.4 + assert m6_rms_error < 0.8 # checksum check import os diff --git a/Regression/Checksum/benchmarks_json/Python_ohms_law_solver_landau_damping_2d.json b/Regression/Checksum/benchmarks_json/Python_ohms_law_solver_landau_damping_2d.json index cba7b160836..e61206d19e3 100644 --- a/Regression/Checksum/benchmarks_json/Python_ohms_law_solver_landau_damping_2d.json +++ b/Regression/Checksum/benchmarks_json/Python_ohms_law_solver_landau_damping_2d.json @@ -1,21 +1,21 @@ { "lev=0": { "Bx": 0.0, - "By": 9.85331786235039e-06, + "By": 7.079679609748623e-06, "Bz": 0.0, - "Ex": 2477786.0791638982, + "Ex": 2726044.0536666242, "Ey": 0.0, - "Ez": 4017759.2140356353, - "jx": 170946239.13826403, - "jy": 163716416.89360982, - "jz": 848613192.8323679 + "Ez": 4060168.6414095857, + "jx": 177543428.8941278, + "jy": 187432087.03814715, + "jz": 594259755.4658135 }, "ions": { - "particle_momentum_x": 9.137211831335653e-17, - "particle_momentum_y": 9.137639968843743e-17, - "particle_momentum_z": 9.135355423932005e-17, - "particle_position_x": 1197.4950421919652, - "particle_position_y": 153274.8576288179, + "particle_momentum_x": 9.141594694084731e-17, + "particle_momentum_y": 9.135546407258978e-17, + "particle_momentum_z": 9.137866220861254e-17, + "particle_position_x": 1197.3344862524336, + "particle_position_y": 153269.17690371818, "particle_weight": 8.032598963696067e+16 } }