diff options
author | 2022-08-26 08:31:09 -0700 | |
---|---|---|
committer | 2022-08-26 08:31:09 -0700 | |
commit | 48c1a86047fb06b957474c5a92d15f104c77b039 (patch) | |
tree | 09c5b0c5d530c1b47e8117202a4f5be7343bede2 /Examples/Tests/galilean/analysis.py | |
parent | 9c78dfee26130045581e8ab8d5f0daa2a9c106d6 (diff) | |
download | WarpX-48c1a86047fb06b957474c5a92d15f104c77b039.tar.gz WarpX-48c1a86047fb06b957474c5a92d15f104c77b039.tar.zst WarpX-48c1a86047fb06b957474c5a92d15f104c77b039.zip |
Fix Bugs w/ Current Correction and Vay Deposition (#3290)
* Fix Bugs w/ Current Correction and Vay Deposition
* Vay Deposition and Current Correction Cannot be Combined Together
* Add Comment for Future Implementation of Vay Deposition w/ MR
* Add Comment for Future Implementation of Vay Deposition w/ MR
* Define SyncCurrentAndRho, Clean Up
* Vay Deposition: Remove Extra FFT of Rho
* Fix Bug in RZ Geometry (Double Filtering)
* Add 2D Galilean Test w/o Periodic Single Box
* Add RZ Galilean Test w/o Periodic Single Box
* Add 3D Galilean Test w/o Periodic Single Box
Diffstat (limited to 'Examples/Tests/galilean/analysis.py')
-rwxr-xr-x | Examples/Tests/galilean/analysis.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Examples/Tests/galilean/analysis.py b/Examples/Tests/galilean/analysis.py index 898ac1435..9fe6bab72 100755 --- a/Examples/Tests/galilean/analysis.py +++ b/Examples/Tests/galilean/analysis.py @@ -28,6 +28,7 @@ filename = sys.argv[1] # Parse some input arguments from output file 'warpx_used_inputs' current_correction = False time_averaging = False +periodic_single_box = False warpx_used_inputs = open('./warpx_used_inputs', 'r').read() if re.search('geometry.dims\s*=\s*2', warpx_used_inputs): dims = '2D' @@ -39,6 +40,8 @@ if re.search('psatd.current_correction\s*=\s*1', warpx_used_inputs): current_correction = True if re.search('psatd.do_time_averaging\s*=\s*1', warpx_used_inputs): time_averaging = True +if re.search('psatd.periodic_single_box_fft\s*=\s*1', warpx_used_inputs): + periodic_single_box = True ds = yt.load(filename) @@ -58,21 +61,31 @@ tol_charge = 1e-9 if dims == '2D': if not current_correction: energy_ref = 35657.41657683263 - if current_correction: + if current_correction and periodic_single_box: energy_ref = 35024.0275199999 + if current_correction and not periodic_single_box: + energy_ref = 35675.25563324745 + tol_energy = 2e-8 + tol_charge = 2e-4 if time_averaging: energy_ref = 26208.04843478073 tol_energy = 1e-6 elif dims == 'RZ': if not current_correction: energy_ref = 191002.6526271543 - if current_correction: + if current_correction and periodic_single_box: energy_ref = 472779.70801323955 + if current_correction and not periodic_single_box: + energy_ref = 511671.4108624746 + tol_charge = 2e-4 elif dims == '3D': if not current_correction: energy_ref = 661285.098907683 - if current_correction: + if current_correction and periodic_single_box: energy_ref = 856783.3007547935 + if current_correction and not periodic_single_box: + energy_ref = 875307.5138913819 + tol_charge = 1e-2 if time_averaging: energy_ref = 14.564631643496 tol_energy = 1e-4 |