Skip to content

Commit

Permalink
more updates to CI tests and checksum benchmarks; remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
roelof-groenewald committed Dec 4, 2023
1 parent f7506f4 commit 863f44a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Examples/Tests/ohm_solver_EM_modes/analysis_rz.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def process(it):
amps = np.abs(F_kw[2, 1, len(kz)//2-2:len(kz)//2+2])
print("Amplitude sample: ", amps)
assert np.allclose(
amps, np.array([61.41633903, 19.39353485, 101.08693342, 11.09248295])
amps, np.array([61.51010339, 19.74815797, 101.01929988, 10.89769995])
)

if sim.test:
Expand Down
6 changes: 3 additions & 3 deletions Examples/Tests/ohm_solver_ion_beam_instability/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@
# compared to the theoretical ones to determine if the physics test passes.
# 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 < 0.8
assert m5_rms_error < 1.4
assert m6_rms_error < 0.8
assert np.isclose(m4_rms_error, 1.515, atol=0.01)
assert np.isclose(m5_rms_error, 0.718, atol=0.01)
assert np.isclose(m6_rms_error, 0.357, atol=0.01)

# checksum check
import os
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"lev=0": {
"Bx": 0.0846232979356012,
"By": 0.0748927888009307,
"Bx": 0.08460920626188952,
"By": 0.07485331147996604,
"Bz": 256.0,
"Ex": 1960.2420822749025,
"Ey": 2368.794327568534,
"Ez": 4873.496044339846
"Ex": 1954.3267519602405,
"Ey": 2363.4281756166347,
"Ez": 4873.508158589938
},
"ions": {
"particle_momentum_x": 1.615113301362171e-19,
"particle_momentum_y": 1.6152332353795267e-19,
"particle_momentum_z": 1.6134581585733078e-19,
"particle_position_x": 3678.484650863704,
"particle_momentum_x": 1.6151135948675135e-19,
"particle_momentum_y": 1.6152336151551518e-19,
"particle_momentum_z": 1.6134581268392543e-19,
"particle_position_x": 3678.484650899751,
"particle_weight": 4.220251350277737e+21
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"lev=0": {},
"ions": {
"particle_momentum_x": 5.043873837579827e-17,
"particle_momentum_y": 5.04445113937769e-17,
"particle_momentum_z": 5.051930416996439e-17,
"particle_position_x": 143164.4268324243,
"particle_position_y": 143166.5184643828,
"particle_theta": 2573261.7450408577,
"particle_momentum_x": 5.043858996017125e-17,
"particle_momentum_y": 5.0444743275098145e-17,
"particle_momentum_z": 5.05192925609973e-17,
"particle_position_x": 143164.42694236583,
"particle_position_y": 143166.51848290052,
"particle_theta": 2573261.754119082,
"particle_weight": 8.12868064536689e+18
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"lev=0": {
"Bx": 27.864884714606287,
"By": 27.512065552904964,
"Bx": 5.334151697582419,
"By": 5.304303632258862,
"Bz": 256.0,
"Ex": 1814830.0899118558,
"Ey": 1807490.954696831,
"Ez": 481172.9611816857,
"jx": 686892027617.7311,
"jy": 688159642665.3784,
"jz": 100142185494.34584
"Ex": 402369.6682213072,
"Ey": 398930.6880468441,
"Ez": 22813.908607048776,
"jx": 152516944704.4641,
"jy": 154134670950.55667,
"jz": 31828054802.990257
},
"beam_ions": {
"particle_momentum_x": 4.457531098465277e-18,
"particle_momentum_y": 4.473403768918693e-18,
"particle_momentum_z": 1.0898804348671991e-17,
"particle_position_x": 4771.045393185418,
"particle_momentum_x": 1.2677390613057533e-18,
"particle_momentum_y": 1.2742687194492975e-18,
"particle_momentum_z": 1.3910821615724517e-17,
"particle_position_x": 4598.14909517292,
"particle_weight": 2.1101256751388695e+20
},
"ions": {
"particle_momentum_x": 1.7363382576743058e-18,
"particle_momentum_y": 1.7349619341342414e-18,
"particle_momentum_z": 1.6420833334404384e-18,
"particle_position_x": 9199.410918598116,
"particle_momentum_x": 1.6197180437411583e-18,
"particle_momentum_y": 1.6195304119412495e-18,
"particle_momentum_z": 1.6731897345410398e-18,
"particle_position_x": 9193.260490317181,
"particle_weight": 1.0550628375694317e+22
}
}
12 changes: 0 additions & 12 deletions Source/FieldSolver/WarpXPushFieldsHybridPIC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ void WarpX::HybridPICEvolveFields ()
// momentum equation
for (int sub_step = 0; sub_step < sub_steps; sub_step++)
{
// m_hybrid_pic_model->BfieldPush(
// Bfield_fp, Efield_fp, current_fp_temp, rho_fp_temp, m_edge_lengths,
// 0.5_rt/sub_steps*dt[0], DtType::FirstHalf,
// guard_cells.ng_FieldSolver, WarpX::sync_nodal_points
// );

m_hybrid_pic_model->BfieldEvolveRK(
Bfield_fp, Efield_fp, current_fp_temp, rho_fp_temp,
m_edge_lengths, 0.5_rt/sub_steps*dt[0],
Expand All @@ -129,12 +123,6 @@ void WarpX::HybridPICEvolveFields ()
// Now push the B field from t=n+1/2 to t=n+1 using the n+1/2 quantities
for (int sub_step = 0; sub_step < sub_steps; sub_step++)
{
// m_hybrid_pic_model->BfieldPush(
// Bfield_fp, Efield_fp, current_fp, rho_fp_temp, m_edge_lengths,
// 0.5_rt/sub_steps*dt[0], DtType::SecondHalf,
// guard_cells.ng_FieldSolver, WarpX::sync_nodal_points
// );

m_hybrid_pic_model->BfieldEvolveRK(
Bfield_fp, Efield_fp, current_fp, rho_fp_temp,
m_edge_lengths, 0.5_rt/sub_steps*dt[0],
Expand Down

0 comments on commit 863f44a

Please sign in to comment.