aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx')
-rw-r--r--Python/pywarpx/WarpInterface.py11
-rw-r--r--Python/pywarpx/WarpXPIC.py7
-rw-r--r--Python/pywarpx/timestepper.py10
3 files changed, 26 insertions, 2 deletions
diff --git a/Python/pywarpx/WarpInterface.py b/Python/pywarpx/WarpInterface.py
index 91217ef1e..46c38ffdc 100644
--- a/Python/pywarpx/WarpInterface.py
+++ b/Python/pywarpx/WarpInterface.py
@@ -4,6 +4,16 @@
#
# License: BSD-3-Clause-LBNL
+# This sets up an interface between Warp and WarpX, allowing access to WarpX data using
+# classes from Warp.
+
+# The routine warp_species will return an instance of the Species class from Warp,
+# giving nearly all of the capability of that class, including accessing the data
+# using down selection and all of the plots.
+
+# The class WarpX_EM3D inherits from Warp's EM3D class. It primarily provides
+# access to the field plotting routines.
+
import warp
from . import fields
from pywarpx import PGroup
@@ -176,4 +186,3 @@ class WarpX_EM3D(warp.EM3D):
self.nz = picmi_grid.number_of_cells[-1]
self.zgrid = 0. # --- This should be obtained from WarpX
-
diff --git a/Python/pywarpx/WarpXPIC.py b/Python/pywarpx/WarpXPIC.py
index dc66ec26a..66930d81f 100644
--- a/Python/pywarpx/WarpXPIC.py
+++ b/Python/pywarpx/WarpXPIC.py
@@ -4,6 +4,13 @@
#
# License: BSD-3-Clause-LBNL
+# The WarpXPIC class is the beginnings of an implementation of a standard interface
+# for running PIC codes. This is the run time equivalent to the PICMI standard.
+# This standard would specify the API for calling the various pieces of typical
+# time step loops, for example get_self_fields and put_Efields. Ideally, a user
+# could write a loop using the standard and, importing one of compliant codes, be
+# able to run a customized PIC simulation with that code.
+
from warp.run_modes.timestepper import PICAPI
from ._libwarpx import libwarpx
diff --git a/Python/pywarpx/timestepper.py b/Python/pywarpx/timestepper.py
index fb8151d43..180bd845e 100644
--- a/Python/pywarpx/timestepper.py
+++ b/Python/pywarpx/timestepper.py
@@ -1,13 +1,21 @@
-# Copyright 2017-2018 Andrew Myers, David Grote, Weiqun Zhang
+# Copyright 2017-2021 Andrew Myers, David Grote, Weiqun Zhang
#
#
# This file is part of WarpX.
#
# License: BSD-3-Clause-LBNL
+# This is intended to be a Python level example of how one might write a customized
+# time stepping loop. This would replace the functionality of the WarpX::Evolve routine.
+# Wrappers are available for the major pieces of a time step and they would be called
+# here in the appropriate order.
+# Note that this is intended to be an example only and may not be functional. The
+# onestep routine as written here is out of date and is not consistent with WarpX::Evolve.
+
from ._libwarpx import libwarpx
from . import callbacks
+
class TimeStepper(object):
def step(self, nsteps=1):