Skip to content

Commit

Permalink
more updates to CI tests and checksum benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
roelof-groenewald committed Dec 4, 2023
1 parent 289ce08 commit f7506f4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
3 changes: 1 addition & 2 deletions Examples/Tests/ohm_solver_EM_modes/PICMI_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion Examples/Tests/ohm_solver_EM_modes/PICMI_inputs_rz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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))

Expand Down
8 changes: 4 additions & 4 deletions Examples/Tests/ohm_solver_ion_beam_instability/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit f7506f4

Please sign in to comment.