aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2022-10-08 08:19:06 -0700
committerGravatar GitHub <noreply@github.com> 2022-10-08 08:19:06 -0700
commitacb7f1d78b9ef2644dd8cd08a7eca04e17df06fa (patch)
treecd9de7d1e0b8f4edfbef19faf3dba55cc5c52482
parent69236a8149488ad68fc7ff9eb84419838bcd7782 (diff)
downloadWarpX-acb7f1d78b9ef2644dd8cd08a7eca04e17df06fa.tar.gz
WarpX-acb7f1d78b9ef2644dd8cd08a7eca04e17df06fa.tar.zst
WarpX-acb7f1d78b9ef2644dd8cd08a7eca04e17df06fa.zip
Updated 1D CI tests with particles because of update of yt (#3458)
* Updated 1D CI tests with particles * Updated required version of yt to 4.1.0 * Fixed CI analysis of collisionXYZ Fixed the fetching of the particle data
-rwxr-xr-xExamples/Tests/collision/analysis_collision_3d.py7
-rw-r--r--Regression/Checksum/benchmarks_json/Langmuir_multi_1d.json14
-rw-r--r--Regression/Checksum/benchmarks_json/LaserAcceleration_1d.json14
-rw-r--r--Regression/Checksum/benchmarks_json/Python_LaserAcceleration_1d.json10
-rw-r--r--Regression/Checksum/benchmarks_json/Python_PlasmaAcceleration1d.json6
-rw-r--r--setup.py2
6 files changed, 27 insertions, 26 deletions
diff --git a/Examples/Tests/collision/analysis_collision_3d.py b/Examples/Tests/collision/analysis_collision_3d.py
index 3e4bda2f8..ee0c81d8f 100755
--- a/Examples/Tests/collision/analysis_collision_3d.py
+++ b/Examples/Tests/collision/analysis_collision_3d.py
@@ -70,12 +70,13 @@ for fn in fn_list:
# load file
ds = yt.load( fn )
ad = ds.all_data()
- px = ad['particle_momentum_x'].to_ndarray()
+ pxe = ad['electron', 'particle_momentum_x'].to_ndarray()
+ pxi = ad['ion', 'particle_momentum_x'].to_ndarray()
# get time index j
j = int(fn[-5:])
# compute error
- vxe = numpy.mean(px[ 0:ne])/me/c
- vxi = numpy.mean(px[ne:np])/mi/c
+ vxe = numpy.mean(pxe)/me/c
+ vxi = numpy.mean(pxi)/mi/c
vxd = vxe - vxi
fit = a*math.exp(b*j)
error = error + abs(fit-vxd)
diff --git a/Regression/Checksum/benchmarks_json/Langmuir_multi_1d.json b/Regression/Checksum/benchmarks_json/Langmuir_multi_1d.json
index 0114f75c7..7586cca0a 100644
--- a/Regression/Checksum/benchmarks_json/Langmuir_multi_1d.json
+++ b/Regression/Checksum/benchmarks_json/Langmuir_multi_1d.json
@@ -2,9 +2,9 @@
"electrons": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
- "particle_momentum_z": 0.0,
- "particle_position_x": 0.0,
- "particle_weight": 0.0
+ "particle_momentum_z": 1.183644630083563e-22,
+ "particle_position_x": 2.560000000000000e-03,
+ "particle_weight": 8.000000000000000e+19
},
"lev=0": {
"Bx": 0.0,
@@ -20,8 +20,8 @@
"positrons": {
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
- "particle_momentum_z": 0.0,
- "particle_position_x": 0.0,
- "particle_weight": 0.0
+ "particle_momentum_z": 1.183644630083563e-22,
+ "particle_position_x": 2.560000000000001e-03,
+ "particle_weight": 8.000000000000000e+19
}
-} \ No newline at end of file
+}
diff --git a/Regression/Checksum/benchmarks_json/LaserAcceleration_1d.json b/Regression/Checksum/benchmarks_json/LaserAcceleration_1d.json
index 243eaba41..83c305438 100644
--- a/Regression/Checksum/benchmarks_json/LaserAcceleration_1d.json
+++ b/Regression/Checksum/benchmarks_json/LaserAcceleration_1d.json
@@ -1,12 +1,12 @@
{
"electrons": {
"particle_momentum_x": 0.0,
- "particle_momentum_y": 0.0,
- "particle_momentum_z": 0.0,
- "particle_orig_z": 0.0,
- "particle_position_x": 0.0,
- "particle_regionofinterest": 0.0,
- "particle_weight": 0.0
+ "particle_momentum_y": 1.2426858089556802e-20,
+ "particle_momentum_z": 1.4187765007430268e-21,
+ "particle_orig_z": 0.022432812500000038,
+ "particle_position_x": 0.02243266637270741,
+ "particle_regionofinterest": 40.0,
+ "particle_weight": 5.20625e+18
},
"lev=0": {
"Bx": 178016.7504669478,
@@ -20,4 +20,4 @@
"jz": 1108530282155.6707,
"rho": 3127749.1976868743
}
-} \ No newline at end of file
+}
diff --git a/Regression/Checksum/benchmarks_json/Python_LaserAcceleration_1d.json b/Regression/Checksum/benchmarks_json/Python_LaserAcceleration_1d.json
index c0ac0141c..56eb71559 100644
--- a/Regression/Checksum/benchmarks_json/Python_LaserAcceleration_1d.json
+++ b/Regression/Checksum/benchmarks_json/Python_LaserAcceleration_1d.json
@@ -1,10 +1,10 @@
{
"electrons": {
"particle_momentum_x": 0.0,
- "particle_momentum_y": 0.0,
- "particle_momentum_z": 0.0,
- "particle_position_x": 0.0,
- "particle_weight": 0.0
+ "particle_momentum_y": 1.2426858089556802e-20,
+ "particle_momentum_z": 1.4187765007430268e-21,
+ "particle_position_x": 0.02243266637270741,
+ "particle_weight": 5.20625e+18
},
"lev=0": {
"Bx": 178016.7504669478,
@@ -18,4 +18,4 @@
"jz": 1108530282155.6707,
"rho": 3127749.1976868743
}
-} \ No newline at end of file
+}
diff --git a/Regression/Checksum/benchmarks_json/Python_PlasmaAcceleration1d.json b/Regression/Checksum/benchmarks_json/Python_PlasmaAcceleration1d.json
index f0cd35716..1dc134fd2 100644
--- a/Regression/Checksum/benchmarks_json/Python_PlasmaAcceleration1d.json
+++ b/Regression/Checksum/benchmarks_json/Python_PlasmaAcceleration1d.json
@@ -12,7 +12,7 @@
"particle_momentum_x": 0.0,
"particle_momentum_y": 0.0,
"particle_momentum_z": 0.0,
- "particle_position_x": 0.0,
- "particle_weight": 0.0
+ "particle_position_x": 3.9920000000000724,
+ "particle_weight": 4.0000000000000456e+18
}
-} \ No newline at end of file
+}
diff --git a/setup.py b/setup.py
index 695e7328d..1dec15a38 100644
--- a/setup.py
+++ b/setup.py
@@ -307,7 +307,7 @@ setup(
# ]
#},
extras_require={
- 'all': ['openPMD-api~=0.14.2', 'openPMD-viewer~=1.1', 'yt>=4.0.1', 'matplotlib'],
+ 'all': ['openPMD-api~=0.14.2', 'openPMD-viewer~=1.1', 'yt>=4.1.0', 'matplotlib'],
},
# cmdclass={'test': PyTest},
# platforms='any',