aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py')
-rwxr-xr-xExamples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py b/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py
index d8e37140f..d71aa3fea 100755
--- a/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py
+++ b/Examples/Tests/ParticleDataPython/PICMI_inputs_prev_pos_2d.py
@@ -3,6 +3,7 @@
# --- Input file to test the saving of old particle positions
import numpy as np
+import pywarpx
from pywarpx import picmi
constants = picmi.constants
@@ -109,12 +110,10 @@ sim.step(max_steps - 1)
# exist
##########################
-from pywarpx import _libwarpx
+assert (pywarpx.get_particle_comp_index('electrons', 'prev_x') > 0)
+assert (pywarpx.get_particle_comp_index('electrons', 'prev_z') > 0)
-assert (_libwarpx.get_particle_comp_index('electrons', 'prev_x') > 0)
-assert (_libwarpx.get_particle_comp_index('electrons', 'prev_z') > 0)
-
-prev_z_vals = _libwarpx.get_particle_arrays(
+prev_z_vals = pywarpx.get_particle_arrays(
'electrons', 'prev_z', 0
)
for z_vals in prev_z_vals: