diff options
author | 2023-01-17 13:28:45 -0800 | |
---|---|---|
committer | 2023-01-17 21:28:45 +0000 | |
commit | f085da36d40472c42f0653f87867148ca8cc656d (patch) | |
tree | 49314d7c0f6c6d2f87b30361e2da1f1c9c71799f | |
parent | 76ef14c14ccdfc1b4ca20875c766d1b6c7725d50 (diff) | |
download | WarpX-f085da36d40472c42f0653f87867148ca8cc656d.tar.gz WarpX-f085da36d40472c42f0653f87867148ca8cc656d.tar.zst WarpX-f085da36d40472c42f0653f87867148ca8cc656d.zip |
Modify refined injection CI test for anisotropic ref ratio (#3605)
* Modify refined ijection CI to account for anisotropic ref ratio
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* change n_move based on new dt
* change variable name to be more specific
* Update Regression/WarpX-tests.ini
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
* reset benchmark for RefineInjection because now it uses anisotropic refinement ratio
* add comment to show the formula for n_move
* Reset benchmark of `RefinedInjection`
* Remove wrong benchmark file
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
-rwxr-xr-x | Examples/Physics_applications/laser_acceleration/analysis_refined_injection.py | 11 | ||||
-rw-r--r-- | Regression/Checksum/benchmarks_json/RefinedInjection.json | 62 | ||||
-rw-r--r-- | Regression/WarpX-tests.ini | 2 |
3 files changed, 38 insertions, 37 deletions
diff --git a/Examples/Physics_applications/laser_acceleration/analysis_refined_injection.py b/Examples/Physics_applications/laser_acceleration/analysis_refined_injection.py index a9527fa1f..e7d26d2cb 100755 --- a/Examples/Physics_applications/laser_acceleration/analysis_refined_injection.py +++ b/Examples/Physics_applications/laser_acceleration/analysis_refined_injection.py @@ -39,13 +39,14 @@ n_fine = 64 # num particles per stream at time 0 n_0 = 15 -# number of times moving window moves -n_move = 99 +# number of times the moving window moves, calculated as n_move = (c*t)/dz where c is speed of light, t is physical time (nsteps*dt). dz is dz on level 0 +n_move = 192 -# ref ratio -rr = 2 +# ref ratio = 2 1 +# Refined only transversly. Longitudinal spacing between particles in each stream is the same in both coarse and fine regions +rr_longitudinal = 1 -np_expected = (n_coarse + n_fine*rr)*(n_0 + n_move) +np_expected = (n_coarse + n_fine*rr_longitudinal)*(n_0 + n_move) assert( np == np_expected ) diff --git a/Regression/Checksum/benchmarks_json/RefinedInjection.json b/Regression/Checksum/benchmarks_json/RefinedInjection.json index 7a3fb4828..7e2bf1cbc 100644 --- a/Regression/Checksum/benchmarks_json/RefinedInjection.json +++ b/Regression/Checksum/benchmarks_json/RefinedInjection.json @@ -1,42 +1,42 @@ { "beam": { - "particle_momentum_x": 4.5610191313831193e-20, - "particle_momentum_y": 4.1498429191345516e-20, - "particle_momentum_z": 1.3647084767509034e-17, - "particle_position_x": 4.6527700821181575e-05, - "particle_position_y": 0.001484501913502292, + "particle_momentum_x": 4.5603891309748695e-20, + "particle_momentum_y": 4.191542084127545e-20, + "particle_momentum_z": 1.3639473020680873e-17, + "particle_position_x": 4.672031083580292e-05, + "particle_position_y": 0.00024387147640563223, "particle_weight": 12483018148921.525 }, "electrons": { - "particle_momentum_x": 1.701962385014116e-19, - "particle_momentum_y": 7.804483053552035e-19, - "particle_momentum_z": 3.6023937355618695e-19, - "particle_position_x": 0.13035674941360564, - "particle_position_y": 0.2792572644186751, - "particle_weight": 119232421875000.25 + "particle_momentum_x": 4.599605609558194e-19, + "particle_momentum_y": 5.498912551464532e-19, + "particle_momentum_z": 2.142770005689478e-19, + "particle_position_x": 0.14677470680495958, + "particle_position_y": 0.3695766840020302, + "particle_weight": 216500976562500.75 }, "lev=0": { - "Bx": 24121596.46539713, - "By": 78274.29859708338, - "Bz": 601059.1001251702, - "Ex": 22866961334698.695, - "Ey": 6508550266827824.0, - "Ez": 32117002621363.535, - "jx": 1125083620993366.5, - "jy": 2.325138134178515e+18, - "jz": 6796844511773390.0, - "rho": 152886703.9390533 + "Bx": 26338374.373111926, + "By": 160257.72166249255, + "Bz": 694868.2285977077, + "Ex": 56513906231023.23, + "Ey": 7806074074131350.0, + "Ez": 65816739650510.41, + "jx": 6873283806747787.0, + "jy": 4287548168385626.0, + "jz": 7506499988309156.0, + "rho": 278060758.9118884 }, "lev=1": { - "Bx": 53303287.79524416, - "By": 213834.37094616296, - "Bz": 1321619.3483672105, - "Ex": 47849992572011.23, - "Ey": 1.4551014574617832e+16, - "Ez": 65308101458272.28, - "jx": 43895764938937.25, - "jy": 9.274835323597818e+18, - "jz": 1.926356834571391e+16, - "rho": 67208930.86201674 + "Bx": 41971136.54331098, + "By": 347834.7278019931, + "Bz": 1093489.2683702512, + "Ex": 136247072735332.94, + "Ey": 1.2435931966910904e+16, + "Ez": 92449079327852.47, + "jx": 1.6499002410844978e+16, + "jy": 1571736982192226.2, + "jz": 2.219065825058093e+16, + "rho": 298322648.1883917 } }
\ No newline at end of file diff --git a/Regression/WarpX-tests.ini b/Regression/WarpX-tests.ini index 17c599ffa..f812ae198 100644 --- a/Regression/WarpX-tests.ini +++ b/Regression/WarpX-tests.ini @@ -1244,7 +1244,7 @@ analysisRoutine = Examples/analysis_default_regression.py [RefinedInjection] buildDir = . inputFile = Examples/Physics_applications/laser_acceleration/inputs_2d -runtime_params = warpx.refine_plasma=1 +runtime_params = warpx.refine_plasma=1 amr.ref_ratio_vect = 2 1 dim = 2 addToCompileString = cmakeSetupOpts = -DWarpX_DIMS=2 |