IMPACT T
Data Types | Functions/Subroutines
beambunchclass Module Reference

This class defines the charged particle beam bunch information in the accelerator. More...

Data Types

type  beambunch
 

Functions/Subroutines

subroutine construct_beambunch (this, incurr, inkin, inmass, incharge
 Initialize Beambunch class. More...
 
subroutine setnpt_beambunch (this, innpt)
 Set local # of particles. More...
 
subroutine getnpt_beambunch (this, outnpt)
 Get local # of particles. More...
 
subroutine drifthalf_beambunch (this, t, tau, betazini)
 Drift half step in positions. Here, x, y, z are normalized by C * Dt tau - normalized step size (by Dt). Only particle with z > 0 is drifted. More...
 
subroutine driftemission_beambunch (this, t, tau, betazini)
 Particle emission For particle with z < 0, they are just shifted long z This is used to simulate the process of emission from photocathod. More...
 
subroutine drifthalforg_beambunch (this, t, tau)
 Drift half step in positions. Here, x, y, z are normalized by C * Dt tau - normalized step size (by Dt). More...
 
subroutine driftz_beambunch (this, dz)
 
subroutine kick1t_beambunch (this, beamelem, zbeamelem, idrfile, nbea
 
subroutine scatter2t_beambunch (innp, innx, inny, innz, rays, exg, eyg, ezg, ptsgeom, npx, npy, myidx, myidy, tg, gammaz, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, ibinit, ibend)
 
subroutine scatter20t_beambunch (innp, rays, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, ibinit, ibend, fldmap, flagerr)
 
subroutine kick2t_beambunch (innp, innx, inny, innz, rays, exg, eyg, ezg, bxg, byg, bzg, ptsgeom, npx, npy, myidx, myidy, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, ibinit, ibend, fldmap, flagerr)
 
subroutine lost_beambunch (this, xrad, yrad, zleng, zcent, nplc, nptot)
 
subroutine lostxy_beambunch (this, xradmin, xradmax, yradmin, yradmax
 
subroutine kickpt2pt_beambunch (nptlc, rays, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, ibinit, ibend, fldmap, totchrg, r0, npttot, nptrue)
 
subroutine kickpt2ptimg_beambunch (nptlc, rays, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, ibinit, ibend, fldmap, totchrg, r0, npttot, nptrue)
 
subroutine rottot_beambunch (this, ptref, ptrange, poscent)
 
subroutine rotbackt_beambunch (this, ptref)
 
subroutine conventr_beambunch (this, zorgin, gamin)
 
subroutine convexit_beambunch (this, zorgin)
 
subroutine convexitold_beambunch (this)
 
subroutine driftbackhalf_beambunch (this, t, tau)
 
subroutine drifthalfbd_beambunch (this, t, tau)
 
subroutine kick2tbd_beambunch (innp, innx, inny, innz, rays, exg, eyg, ezg, bxg, byg, bzg, ptsgeom, npx, npy, myidx, myidy, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, idbd, fldmap, refpt)
 
subroutine kick2tbd0_beambunch (innp, rays, tg, chge, mass, dt, beamelem, zbeamelem, idrfile, nbeamln, idbd, fldmap, refpt)
 
subroutine destruct_beambunch (this)
 

Detailed Description

This class defines the charged particle beam bunch information in the accelerator.

Author
Ji Qiang

Data Type Documentation

◆ beambunchclass::beambunch

type beambunchclass::beambunch
Data Fields
double precision charge charge
double precision current beam current
double precision mass part. mass
integer npt num of total global macroparticles
integer nptlocal num of total local particles
double precision, dimension(:,:), pointer pts1 particles type one
double precision, dimension(6) refptcl reference particle

Function/Subroutine Documentation

◆ construct_beambunch()

subroutine beambunchclass::construct_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(in)  incurr,
double precision, intent(in)  inkin,
double precision, intent(in)  inmass,
double precision, intent(in)  incharge 
)

Initialize Beambunch class.

Author
Ji Qiang
Parameters
[in]incurr,inkin,inmass,incharge,innp,phasini
Here is the caller graph for this function:

◆ conventr_beambunch()

subroutine beambunchclass::conventr_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(in)  zorgin,
double precision, intent(in)  gamin 
)
Here is the caller graph for this function:

◆ convexit_beambunch()

subroutine beambunchclass::convexit_beambunch ( type (beambunch), intent(inout)  this,
real*8  zorgin 
)
Here is the caller graph for this function:

◆ convexitold_beambunch()

subroutine beambunchclass::convexitold_beambunch ( type (beambunch), intent(inout)  this)

◆ destruct_beambunch()

subroutine beambunchclass::destruct_beambunch ( type (beambunch), intent(out)  this)
Here is the caller graph for this function:

◆ driftbackhalf_beambunch()

subroutine beambunchclass::driftbackhalf_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(inout)  t,
double precision, intent(in)  tau 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ driftemission_beambunch()

subroutine beambunchclass::driftemission_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(inout)  t,
double precision, intent(in)  tau,
double precision, intent(in)  betazini 
)

Particle emission For particle with z < 0, they are just shifted long z This is used to simulate the process of emission from photocathod.

Author
Ji Qiang
Parameters
[in,out]t
[in]tau,betazini
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drifthalf_beambunch()

subroutine beambunchclass::drifthalf_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(inout)  t,
double precision, intent(in)  tau,
double precision, intent(in)  betazini 
)

Drift half step in positions. Here, x, y, z are normalized by C * Dt tau - normalized step size (by Dt). Only particle with z > 0 is drifted.

Author
Ji Qiang
Parameters
[in]tau,betazini
[in,out]t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drifthalfbd_beambunch()

subroutine beambunchclass::drifthalfbd_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(inout)  t,
double precision, intent(in)  tau 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drifthalforg_beambunch()

subroutine beambunchclass::drifthalforg_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(inout)  t,
double precision, intent(in)  tau 
)

Drift half step in positions. Here, x, y, z are normalized by C * Dt tau - normalized step size (by Dt).

Author
Ji Qiang
Parameters
[in,out]t
[in]tau
Here is the call graph for this function:
Here is the caller graph for this function:

◆ driftz_beambunch()

subroutine beambunchclass::driftz_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(in)  dz 
)

◆ getnpt_beambunch()

subroutine beambunchclass::getnpt_beambunch ( type (beambunch), intent(in)  this,
integer, intent(out)  outnpt 
)

Get local # of particles.

Author
Ji Qiang
Parameters
[out]outnpt
Here is the caller graph for this function:

◆ kick1t_beambunch()

subroutine beambunchclass::kick1t_beambunch ( type (beambunch), intent(inout)  this,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
  nbea 
)
Here is the call graph for this function:

◆ kick2t_beambunch()

subroutine beambunchclass::kick2t_beambunch ( integer, intent(in)  innp,
integer, intent(in)  innx,
integer, intent(in)  inny,
integer, intent(in)  innz,
double precision, dimension(6,innp), intent(inout)  rays,
double precision, dimension(innx,inny,innz), intent(in)  exg,
  eyg,
  ezg,
double precision, dimension(innx,inny,innz), intent(in)  bxg,
  byg,
  bzg,
type (compdom)  ptsgeom,
integer, intent(in)  npx,
integer, intent(in)  npy,
integer, intent(in)  myidx,
integer, intent(in)  myidy,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer  ibinit,
integer  ibend,
type (fielddata), dimension(:), intent(in)  fldmap,
integer, intent(in)  flagerr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kick2tbd0_beambunch()

subroutine beambunchclass::kick2tbd0_beambunch ( integer, intent(in)  innp,
double precision, dimension(6,innp), intent(inout)  rays,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer, intent(in)  idbd,
type (fielddata), dimension(:), intent(in)  fldmap,
double precision, dimension(6)  refpt 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kick2tbd_beambunch()

subroutine beambunchclass::kick2tbd_beambunch ( integer, intent(in)  innp,
integer, intent(in)  innx,
integer, intent(in)  inny,
integer, intent(in)  innz,
double precision, dimension(6,innp), intent(inout)  rays,
double precision, dimension(innx,inny,innz), intent(in)  exg,
  eyg,
  ezg,
double precision, dimension(innx,inny,innz), intent(in)  bxg,
  byg,
  bzg,
type (compdom)  ptsgeom,
integer, intent(in)  npx,
integer, intent(in)  npy,
integer, intent(in)  myidx,
integer, intent(in)  myidy,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer, intent(in)  idbd,
type (fielddata), dimension(:), intent(in)  fldmap,
double precision, dimension(6)  refpt 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kickpt2pt_beambunch()

subroutine beambunchclass::kickpt2pt_beambunch ( integer, intent(in)  nptlc,
double precision, dimension(6,nptlc), intent(inout)  rays,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer, intent(in)  ibinit,
integer, intent(in)  ibend,
type (fielddata), dimension(:), intent(in)  fldmap,
double precision, intent(in)  totchrg,
double precision, intent(in)  r0,
integer, intent(in)  npttot,
integer, intent(in)  nptrue 
)
Here is the call graph for this function:

◆ kickpt2ptimg_beambunch()

subroutine beambunchclass::kickpt2ptimg_beambunch ( integer, intent(in)  nptlc,
double precision, dimension(6,nptlc), intent(inout)  rays,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer, intent(in)  ibinit,
integer, intent(in)  ibend,
type (fielddata), dimension(:), intent(in)  fldmap,
double precision, intent(in)  totchrg,
double precision, intent(in)  r0,
integer, intent(in)  npttot,
integer, intent(in)  nptrue 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lost_beambunch()

subroutine beambunchclass::lost_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(in)  xrad,
double precision, intent(in)  yrad,
double precision, intent(in)  zleng,
double precision, intent(in)  zcent,
integer, intent(out)  nplc,
integer, intent(out)  nptot 
)
Here is the caller graph for this function:

◆ lostxy_beambunch()

subroutine beambunchclass::lostxy_beambunch ( type (beambunch), intent(inout)  this,
double precision, intent(in)  xradmin,
double precision, intent(in)  xradmax,
double precision, intent(in)  yradmin,
double precision, intent(in)  yradmax 
)
Here is the caller graph for this function:

◆ rotbackt_beambunch()

subroutine beambunchclass::rotbackt_beambunch ( type (beambunch), intent(inout)  this,
double precision, dimension(6)  ptref 
)
Here is the caller graph for this function:

◆ rottot_beambunch()

subroutine beambunchclass::rottot_beambunch ( type (beambunch), intent(inout)  this,
double precision, dimension(6)  ptref,
double precision, dimension(6), intent(out)  ptrange,
double precision  poscent 
)
Here is the caller graph for this function:

◆ scatter20t_beambunch()

subroutine beambunchclass::scatter20t_beambunch ( integer, intent(in)  innp,
double precision, dimension(6,innp), intent(inout)  rays,
double precision, intent(in)  tg,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
integer, intent(in)  nbeamln,
integer, intent(in)  ibinit,
integer, intent(in)  ibend,
type (fielddata), dimension(:), intent(in)  fldmap,
integer, intent(in)  flagerr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scatter2t_beambunch()

subroutine beambunchclass::scatter2t_beambunch ( integer, intent(in)  innp,
integer, intent(in)  innx,
integer, intent(in)  inny,
integer, intent(in)  innz,
double precision, dimension(6,innp), intent(inout)  rays,
double precision, dimension(innx,inny,innz), intent(in)  exg,
  eyg,
  ezg,
type (compdom)  ptsgeom,
integer, intent(in)  npx,
integer, intent(in)  npy,
integer, intent(in)  myidx,
integer, intent(in)  myidy,
double precision, intent(in)  tg,
double precision, intent(in)  gammaz,
double precision, intent(in)  chge,
double precision, intent(in)  mass,
double precision, intent(in)  dt,
type (beamlineelem), dimension(:), intent(in)  beamelem,
double precision, dimension(:,:), intent(in)  zbeamelem,
integer, dimension(:,:), intent(in)  idrfile,
  nbeamln,
integer  ibinit,
integer  ibend 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setnpt_beambunch()

subroutine beambunchclass::setnpt_beambunch ( type (beambunch), intent(inout)  this,
integer, intent(in)  innpt 
)

Set local # of particles.

Author
Ji Qiang
Parameters
[in]innpt
Here is the caller graph for this function: