diff options
author | 2021-12-22 15:32:36 -0800 | |
---|---|---|
committer | 2021-12-22 23:32:36 +0000 | |
commit | d411310e45a370cfde872b25baa7a9f20bcf4966 (patch) | |
tree | cbb12f8fc9ba701a9d2a08701aaf46a99ea9ba31 /Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py | |
parent | f73b3cd49c430c59b6750d5e65dfd19dcf44c752 (diff) | |
download | WarpX-d411310e45a370cfde872b25baa7a9f20bcf4966.tar.gz WarpX-d411310e45a370cfde872b25baa7a9f20bcf4966.tar.zst WarpX-d411310e45a370cfde872b25baa7a9f20bcf4966.zip |
Change _libwarpx.py functions to LibWarpX class methods (#2696)
* Initial attempt at moving function into LibWarpX
* Bugfix - undefined structs in get_particle_theta
This is untested, identified by IDE/visual inspection only
* Unify newlines
* Delete libwarpx.clight (duplicated picmi.py)
See picmi.constants.c
* Change function descriptive comment to docstring
Also remove extra newline in __init__ beginning.
* Replace pywarpx/_libwarpx calls appropriately
* Fix atexit register of finalize function
* Reorder WarpX.py imports for pre-commit
* Use picmi.Simulation.extension = libwarpx alias
This will hopefully preempt user script changes if we restructure things
to allow multiple WarpX runs to be done within a single Python script.
* Fix libwarpx ref in WarpX.getProbLo/getProbHi
* Update get_particle_boundary_buffer doc reference
Diffstat (limited to 'Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py')
-rwxr-xr-x | Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py b/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py index fbb108a0e..b97905ee0 100755 --- a/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py +++ b/Examples/Tests/pass_mpi_communicator/PICMI_inputs_2d.py @@ -6,7 +6,6 @@ # --- if the correct amount of processors are initialized in AMReX. from mpi4py import MPI -import pywarpx from pywarpx import picmi constants = picmi.constants @@ -128,14 +127,14 @@ new_comm_size = new_comm.size if color == 0: # verify that communicator contains correct number of procs (1) - assert pywarpx.getNProcs() == comm_world_size - 1 - assert pywarpx.getNProcs() == new_comm_size + assert sim.extension.getNProcs() == comm_world_size - 1 + assert sim.extension.getNProcs() == new_comm_size else: # verify that amrex initialized with 1 fewer proc than comm world - assert pywarpx.getNProcs() == comm_world_size - 1 - assert pywarpx.getNProcs() == new_comm_size + assert sim.extension.getNProcs() == comm_world_size - 1 + assert sim.extension.getNProcs() == new_comm_size # verify that amrex proc ranks are offset by -1 from # world comm proc ranks - assert pywarpx.getMyProc() == rank - 1 + assert sim.extension.getMyProc() == rank - 1 |