aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/timestepper.py
diff options
context:
space:
mode:
authorGravatar atmyers <atmyers2@gmail.com> 2017-03-23 17:18:28 -0700
committerGravatar atmyers <atmyers2@gmail.com> 2017-03-23 17:18:28 -0700
commitf0e6826e751d61ce2df4a84dc61b3e0bc0248391 (patch)
tree9766fef298cb36db310fea3447f0c491584586b7 /Python/pywarpx/timestepper.py
parent96160b4f3e16a3741e99139582687539776b1331 (diff)
downloadWarpX-f0e6826e751d61ce2df4a84dc61b3e0bc0248391.tar.gz
WarpX-f0e6826e751d61ce2df4a84dc61b3e0bc0248391.tar.zst
WarpX-f0e6826e751d61ce2df4a84dc61b3e0bc0248391.zip
use the Python 3 compatible version of print()
Diffstat (limited to '')
-rw-r--r--Python/pywarpx/timestepper.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/Python/pywarpx/timestepper.py b/Python/pywarpx/timestepper.py
index 1e3519dcc..ce0ed8c24 100644
--- a/Python/pywarpx/timestepper.py
+++ b/Python/pywarpx/timestepper.py
@@ -16,7 +16,7 @@ class TimeStepper(object):
self.istep = libwarpx.warpx_getistep(0)
#if mpi.rank == 0:
- print "\nSTEP %d starts ..."%(self.istep + 1)
+ print("\nSTEP %d starts ..."%(self.istep + 1))
#if (ParallelDescriptor::NProcs() > 1)
# if (okToRegrid(step)) RegridBaseLevel();
@@ -53,7 +53,7 @@ class TimeStepper(object):
libwarpx.warpx_MoveWindow();
#if mpi.rank == 0:
- print "STEP %d ends. TIME = %e DT = %e"%(self.istep, self.cur_time, dt)
+ print("STEP %d ends. TIME = %e DT = %e"%(self.istep, self.cur_time, dt))
# --- Sync up time
for i in range(libwarpx.warpx_finestLevel()+1):
@@ -105,7 +105,7 @@ class TimeStepperFromPICSAR(object):
for i in range(n):
if(me == 0):
if top.it%freq_print == 0:
- print 'it = %g time = %g'%(top.it, top.time)
+ print('it = %g time = %g'%(top.it, top.time))
l_first = (lallspecl or (i == 0))
l_last = (lallspecl or (i == n-1))
@@ -242,7 +242,7 @@ class TimeStepperFromPICSAR(object):
# --- The following methods use the standard Warp routines
def fetcheb(self, js, pg=None):
- if self.l_verbose:print me, 'enter fetcheb'
+ if self.l_verbose:print(me, 'enter fetcheb')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -263,7 +263,7 @@ class TimeStepperFromPICSAR(object):
w3d.pgroupfsapi = None
def push_velocity_full(self, js, pg=None):
- if self.l_verbose:print me, 'enter push_velocity_full'
+ if self.l_verbose:print(me, 'enter push_velocity_full')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -293,10 +293,10 @@ class TimeStepperFromPICSAR(object):
# --- update gamma
self.set_gamma(js, pg)
- if self.l_verbose:print me, 'exit push_velocity_first_part'
+ if self.l_verbose:print(me, 'exit push_velocity_first_part')
def push_velocity_first_part(self, js, pg=None):
- if self.l_verbose:print me, 'enter push_velocity_first_part'
+ if self.l_verbose:print(me, 'enter push_velocity_first_part')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -320,10 +320,10 @@ class TimeStepperFromPICSAR(object):
pg.bx[il:iu], pg.by[il:iu], pg.bz[il:iu],
pg.sq[js], pg.sm[js], 0.5*top.dt, top.ibpush)
- if self.l_verbose:print me, 'exit push_velocity_first_part'
+ if self.l_verbose:print(me, 'exit push_velocity_first_part')
def push_velocity_second_part(self, js, pg=None):
- if self.l_verbose:print me, 'enter push_velocity_second_part'
+ if self.l_verbose:print(me, 'enter push_velocity_second_part')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -347,10 +347,10 @@ class TimeStepperFromPICSAR(object):
# --- update gamma
self.set_gamma(js, pg)
- if self.l_verbose:print me, 'exit push_velocity_second_part'
+ if self.l_verbose:print(me, 'exit push_velocity_second_part')
def set_gamma(self, js, pg=None):
- if self.l_verbose:print me, 'enter set_gamma'
+ if self.l_verbose:print(me, 'enter set_gamma')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -360,10 +360,10 @@ class TimeStepperFromPICSAR(object):
# --- update gamma
warp.gammaadv(np, pg.gaminv[il:iu], pg.uxp[il:iu], pg.uyp[il:iu], pg.uzp[il:iu], top.gamadv, top.lrelativ)
- if self.l_verbose:print me, 'exit set_gamma'
+ if self.l_verbose:print(me, 'exit set_gamma')
def push_positions(self, js, pg=None):
- if self.l_verbose:print me, 'enter push_positions'
+ if self.l_verbose:print(me, 'enter push_positions')
if pg is None:
pg = top.pgroup
np = pg.nps[js]
@@ -374,7 +374,7 @@ class TimeStepperFromPICSAR(object):
pg.uxp[il:iu], pg.uyp[il:iu], pg.uzp[il:iu],
pg.gaminv[il:iu], top.dt)
- if self.l_verbose:print me, 'exit push_positions'
+ if self.l_verbose:print(me, 'exit push_positions')