IMPACT T
|
This class defines a 3-D field quantity in the accelerator. The field quantity can be updated at each step. More...
Data Types | |
type | fieldquant |
Functions/Subroutines | |
subroutine | construct_fieldquant (this, innx, inny, innz, geom, grid) |
Initialize field class. More... | |
subroutine | set_fieldquant (this, innx, inny, innz, geom, grid, nprx, npry) |
set field quantity. More... | |
subroutine | gradeb_fieldquant (innx, inny, innz, temppotent, ptsgeom, grid, Flagbc, gammaz, FlagImage, egxout, egyout, egzout, bgxout, bgyout, bgzout) |
find the E and B fields in the lab frame from the potential on the grid of beam frame. More... | |
subroutine | update3otnew_fieldquant (this, source, fldgeom, grid, nxlc |
update potential (solving Possion's equation) with 3D isolated boundary conditions. Here, image charge potential along z also calculated More... | |
subroutine | openbc3dnew (innx, inny, innz, rho, hx, hy, hz, nxpylc2, nypzlc2, myidz, myidy, npz, npy, commrow, commcol, comm2d, pztable, pytable, ypzstable, xpystable, inxglb, inyglb, inzglb, rhoImg, flagImage, zshift) |
Solving Poisson's equation with open BCs. More... | |
subroutine | greenf1tintnew2 (nx, ny, nz, nsizez, nsizey, nsizexy, nsizey |
green function for extended array. More... | |
subroutine | greenf1tintshift2 (nx, ny, nz, nsizez, nsizey, nsizexy, nsiz |
green function for extended array. More... | |
subroutine | wakefield_fieldquant (Nz, xwakez, ywakez, recvdensz, exwake |
longitudinal and transverse wakefield More... | |
subroutine | wakereadin_fieldquant (Nz, xwakez, ywakez, recvdensz, exwak |
longitudinal and transverse wakefield on a beam using the readin longitudinal and transverse wake functions More... | |
subroutine | csrwaketr_fieldquant (Nx, r0, ptmin, hx, blength, rhonew, rh |
new version of the csrwake calculation. this subroutine calculate the 1d csr wakefield including entrance, stead-state, and transitions effects here, hx, rho,...are in real unit. the return ezwake is V/m More... | |
subroutine | setval_fieldquant (this, i, j, k, value) |
double precision function | get_fieldquant (this, i, j, k) |
subroutine | getglb_fieldquant (this, temp) |
subroutine | getlcgrid_fieldquant (this, nxlc, nylc, nzlc) |
subroutine | psiroot (r0, xx, deltas, psi, eps, Nmax) |
find the psi in equation 12 of Stupakov and Emma's paper More... | |
subroutine | destruct_fieldquant (this) |
subroutine | csrwaketrigf_fieldquant (Nx, r0, ptmin, hx, blength, rhonew |
This subroutine calculates the 1d csr wakefield including entrance, stead-state, and transitions effects. Here, hx, rho,...are in real units. The return ezwake is in V! /m. The current version uses IGF corresponding to the four cases ! of Saldin et al. More... | |
double precision function | icsrcasea (phih, ssh, xk2) |
double precision function | icsrcaseb (ssh, xk2) |
double precision function | icsrcasec (phimh, xxbarh, ssh, xk2) |
double precision function | icsrcased (xxbarh, psimax, ssh, xk2, epstol, Nmax) |
subroutine | dwakefield_fieldquant (Nx, Ny, Nz, hx, hy, hz, chgdens, dexwak |
This routine computes the root of the function that is evaluated ! in the subroutine 'funcd'. It is based on the subroutine 'root' of Numerical Recipes 9.4, which makes use of a Newton-Raphson method with root bracketing. It has been modified to handle the two bra! cket endpoints carefully. The routine searches for a root in the inter! val [x1,x2] with a tolerance given by 'xacc', and returns this value as 'rtsafe'. The maximum number of iterations allowed is 'maxit'! . C.E.M. More... | |
subroutine | dwakeconv_fieldquant (Nz, weightz, hz, kern, lam) |
subroutine | dispeqslab_fieldquant (a, b, eps, dlx, nkx, nky, dkx, dky) |
subroutine | ampslab_fieldquant (a, b, eps, nkx, nky, dkx, dky, amp) |
subroutine | dispeqcyl_fieldquant (a, b, eps, nkx, nky, dky) |
subroutine | ampcyl_fieldquant (a, b, eps, nkx, nky, dky, amp) |
double precision function | func1 (x, c1, c2) |
double precision function | func2 (x, c1, c3) |
double precision function | amplsm_sym (a, b, eps, kx, ky) |
double precision function | amplsm_asym (a, b, eps, kx, ky) |
double precision function | amplse_sym (a, b, eps, kx, ky) |
double precision function | amplse_asym (a, b, eps, kx, ky) |
double precision function | calclfs (s, a, b, eps) |
double precision function | calcr0 (s, a, b) |
This class defines a 3-D field quantity in the accelerator. The field quantity can be updated at each step.
type fieldquantclass::fieldquant |
subroutine fieldquantclass::ampcyl_fieldquant | ( | double precision, intent(in) | a, |
double precision, intent(in) | b, | ||
double precision, intent(in) | eps, | ||
double precision, intent(in) | nkx, | ||
double precision, intent(in) | nky, | ||
double precision, dimension(:,:,:), intent(in) | dky, | ||
double precision, dimension(:,:,:), intent(out) | amp | ||
) |
double precision function fieldquantclass::amplse_asym | ( | double precision | a, |
double precision | b, | ||
double precision | eps, | ||
double precision | kx, | ||
double precision | ky | ||
) |
double precision function fieldquantclass::amplse_sym | ( | double precision | a, |
double precision | b, | ||
double precision | eps, | ||
double precision | kx, | ||
double precision | ky | ||
) |
double precision function fieldquantclass::amplsm_asym | ( | double precision | a, |
double precision | b, | ||
double precision | eps, | ||
double precision | kx, | ||
double precision | ky | ||
) |
double precision function fieldquantclass::amplsm_sym | ( | double precision | a, |
double precision | b, | ||
double precision | eps, | ||
double precision | kx, | ||
double precision | ky | ||
) |
subroutine fieldquantclass::ampslab_fieldquant | ( | double precision, intent(in) | a, |
double precision, intent(in) | b, | ||
double precision, intent(in) | eps, | ||
double precision, intent(in) | nkx, | ||
double precision, intent(in) | nky, | ||
double precision, dimension(:), intent(in) | dkx, | ||
double precision, dimension(:,:,:), intent(in) | dky, | ||
double precision, dimension(:,:,:), intent(out) | amp | ||
) |
double precision function fieldquantclass::calclfs | ( | double precision | s, |
double precision | a, | ||
double precision | b, | ||
double precision | eps | ||
) |
double precision function fieldquantclass::calcr0 | ( | double precision | s, |
double precision | a, | ||
double precision | b | ||
) |
subroutine fieldquantclass::construct_fieldquant | ( | type (fieldquant), intent(out) | this, |
integer, intent(in) | innx, | ||
integer, intent(in) | inny, | ||
integer, intent(in) | innz, | ||
type (compdom), intent(in) | geom, | ||
type (pgrid2d), intent(in) | grid | ||
) |
Initialize field class.
subroutine fieldquantclass::csrwaketr_fieldquant | ( | integer, intent(in) | Nx, |
real*8 | r0, | ||
real*8 | ptmin, | ||
real*8 | hx, | ||
real*8 | blength, | ||
real*8, dimension(nx) | rhonew, | ||
rh | |||
) |
new version of the csrwake calculation. this subroutine calculate the 1d csr wakefield including entrance, stead-state, and transitions effects here, hx, rho,...are in real unit. the return ezwake is V/m
subroutine fieldquantclass::csrwaketrigf_fieldquant | ( | integer, intent(in) | Nx, |
real*8 | r0, | ||
real*8 | ptmin, | ||
real*8 | hx, | ||
real*8 | blength, | ||
real*8, dimension(nx) | rhonew | ||
) |
This subroutine calculates the 1d csr wakefield including entrance, stead-state, and transitions effects. Here, hx, rho,...are in real units. The return ezwake is in V! /m. The current version uses IGF corresponding to the four cases ! of Saldin et al.
subroutine fieldquantclass::destruct_fieldquant | ( | type (fieldquant), intent(out) | this | ) |
subroutine fieldquantclass::dispeqcyl_fieldquant | ( | double precision, intent(in) | a, |
double precision, intent(in) | b, | ||
double precision, intent(in) | eps, | ||
double precision, intent(in) | nkx, | ||
double precision, intent(in) | nky, | ||
double precision, dimension(:,:,:), intent(out) | dky | ||
) |
subroutine fieldquantclass::dispeqslab_fieldquant | ( | double precision, intent(in) | a, |
double precision, intent(in) | b, | ||
double precision, intent(in) | eps, | ||
double precision, intent(in) | dlx, | ||
double precision, intent(in) | nkx, | ||
double precision, intent(in) | nky, | ||
double precision, dimension(:), intent(out) | dkx, | ||
double precision, dimension(:,:,:), intent(out) | dky | ||
) |
subroutine fieldquantclass::dwakeconv_fieldquant | ( | integer, intent(in) | Nz, |
double precision, dimension(nz), intent(in) | weightz, | ||
double precision, intent(in) | hz, | ||
double precision, dimension(nz), intent(in) | kern, | ||
double precision, dimension(nz), intent(out) | lam | ||
) |
subroutine fieldquantclass::dwakefield_fieldquant | ( | integer, intent(in) | Nx, |
integer, intent(in) | Ny, | ||
integer, intent(in) | Nz, | ||
double precision, intent(in) | hx, | ||
double precision, intent(in) | hy, | ||
double precision, intent(in) | hz, | ||
double precision, dimension(:,:,:), intent(in) | chgdens, | ||
dexwak | |||
) |
This routine computes the root of the function that is evaluated ! in the subroutine 'funcd'. It is based on the subroutine 'root' of Numerical Recipes 9.4, which makes use of a Newton-Raphson method with root bracketing. It has been modified to handle the two bra! cket endpoints carefully. The routine searches for a root in the inter! val [x1,x2] with a tolerance given by 'xacc', and returns this value as 'rtsafe'. The maximum number of iterations allowed is 'maxit'! . C.E.M.
This routine evaluates the function whose root produces the retarded angle psi that is required for evaluating the CSR kernel in Case D of Saldin et al. The value of the function is output as 'f', and its derivative is output as 'derivf'. C.E.M.
double precision function fieldquantclass::func1 | ( | double precision | x, |
double precision | c1, | ||
double precision | c2 | ||
) |
double precision function fieldquantclass::func2 | ( | double precision | x, |
double precision | c1, | ||
double precision | c3 | ||
) |
double precision function fieldquantclass::get_fieldquant | ( | type (fieldquant), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | k | ||
) |
subroutine fieldquantclass::getglb_fieldquant | ( | type (fieldquant), intent(in) | this, |
type (fieldquant), intent(out) | temp | ||
) |
subroutine fieldquantclass::getlcgrid_fieldquant | ( | type (fieldquant), intent(in) | this, |
integer, intent(out) | nxlc, | ||
integer, intent(out) | nylc, | ||
integer, intent(out) | nzlc | ||
) |
subroutine fieldquantclass::gradeb_fieldquant | ( | integer, intent(in) | innx, |
integer, intent(in) | inny, | ||
integer, intent(in) | innz, | ||
temppotent, | |||
type (compdom), intent(in) | ptsgeom, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | Flagbc, | ||
double precision, intent(in) | gammaz, | ||
integer, intent(in) | FlagImage, | ||
egxout, | |||
egyout, | |||
egzout, | |||
bgxout, | |||
bgyout, | |||
bgzout | |||
) |
find the E and B fields in the lab frame from the potential on the grid of beam frame.
subroutine fieldquantclass::greenf1tintnew2 | ( | integer, intent(in) | nx, |
integer, intent(in) | ny, | ||
integer, intent(in) | nz, | ||
integer, intent(in) | nsizez, | ||
integer, intent(in) | nsizey, | ||
integer, intent(in) | nsizexy, | ||
nsizey | |||
) |
green function for extended array.
subroutine fieldquantclass::greenf1tintshift2 | ( | integer, intent(in) | nx, |
integer, intent(in) | ny, | ||
integer, intent(in) | nz, | ||
integer, intent(in) | nsizez, | ||
integer, intent(in) | nsizey, | ||
integer, intent(in) | nsizexy, | ||
nsiz | |||
) |
green function for extended array.
double precision function fieldquantclass::icsrcasea | ( | double precision | phih, |
double precision | ssh, | ||
double precision | xk2 | ||
) |
double precision function fieldquantclass::icsrcaseb | ( | double precision | ssh, |
double precision | xk2 | ||
) |
double precision function fieldquantclass::icsrcasec | ( | double precision | phimh, |
double precision | xxbarh, | ||
double precision | ssh, | ||
double precision | xk2 | ||
) |
double precision function fieldquantclass::icsrcased | ( | double precision | xxbarh, |
double precision | psimax, | ||
double precision | ssh, | ||
double precision | xk2, | ||
double precision | epstol, | ||
integer | Nmax | ||
) |
subroutine fieldquantclass::openbc3dnew | ( | integer, intent(in) | innx, |
integer, intent(in) | inny, | ||
integer, intent(in) | innz, | ||
double precision, dimension(innx,inny,innz), intent(inout) | rho, | ||
double precision, intent(in) | hx, | ||
double precision, intent(in) | hy, | ||
double precision, intent(in) | hz, | ||
integer, intent(in) | nxpylc2, | ||
integer, intent(in) | nypzlc2, | ||
integer, intent(in) | myidz, | ||
integer, intent(in) | myidy, | ||
integer, intent(in) | npz, | ||
integer, intent(in) | npy, | ||
integer, intent(in) | commrow, | ||
integer, intent(in) | commcol, | ||
integer, intent(in) | comm2d, | ||
integer, dimension(0:npz-1), intent(in) | pztable, | ||
integer, dimension(0:npy-1), intent(in) | pytable, | ||
integer, dimension(0:npz-1), intent(in) | ypzstable, | ||
integer, dimension(0:npy-1), intent(in) | xpystable, | ||
integer, intent(in) | inxglb, | ||
integer, intent(in) | inyglb, | ||
integer, intent(in) | inzglb, | ||
rhoImg, | |||
integer, intent(in) | flagImage, | ||
double precision, intent(in) | zshift | ||
) |
Solving Poisson's equation with open BCs.
subroutine fieldquantclass::psiroot | ( | real*8 | r0, |
real*8 | xx, | ||
real*8 | deltas, | ||
real*8 | psi, | ||
real*8 | eps, | ||
integer | Nmax | ||
) |
find the psi in equation 12 of Stupakov and Emma's paper
subroutine fieldquantclass::set_fieldquant | ( | type (fieldquant), intent(inout) | this, |
integer, intent(in) | innx, | ||
integer, intent(in) | inny, | ||
integer, intent(in) | innz, | ||
type (compdom), intent(in) | geom, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | nprx, | ||
integer, intent(in) | npry | ||
) |
set field quantity.
subroutine fieldquantclass::setval_fieldquant | ( | type (fieldquant), intent(out) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | k, | ||
double precision, intent(in) | value | ||
) |
subroutine fieldquantclass::update3otnew_fieldquant | ( | type (fieldquant), intent(inout) | this, |
source, | |||
type (compdom), intent(in) | fldgeom, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | nxlc | ||
) |
update potential (solving Possion's equation) with 3D isolated boundary conditions. Here, image charge potential along z also calculated
subroutine fieldquantclass::wakefield_fieldquant | ( | integer, intent(in) | Nz, |
double precision, dimension(nz), intent(in) | xwakez, | ||
double precision, dimension(nz), intent(in) | ywakez, | ||
double precision, dimension(nz,2), intent(in) | recvdensz, | ||
double precision, dimension(nz), intent(out) | exwake | ||
) |
longitudinal and transverse wakefield
subroutine fieldquantclass::wakereadin_fieldquant | ( | integer, intent(in) | Nz, |
double precision, dimension(nz), intent(in) | xwakez, | ||
double precision, dimension(nz), intent(in) | ywakez, | ||
double precision, dimension(nz,2), intent(in) | recvdensz, | ||
exwak | |||
) |
longitudinal and transverse wakefield on a beam using the readin longitudinal and transverse wake functions