gibuu is hosted by Hepforge, IPPP Durham
GiBUU

TABLE OF CONTENTS


/ADI [ Modules ]

[ Top ] [ Modules ]

NAME

module ADI

PURPOSE

This module contains the subroutine ADI_solve for the solution of the matrix equations, which appear when the gradient terms are taken into account in RMF. Can also be applied for the Yukawa or Coulomb potential calculations. Uses the Alternating Direction Implicit (ADI) iterative method, similar to the one from module yukawa. (See S.Teis, PhD thesis, and the book of R.S.Varga, "Matrix Iterative Analysis".)


ADI/debugADI [ Global module-variables ]

[ Top ] [ ADI ] [ Global module-variables ]

SOURCE

  logical, SAVE :: debugADI=.false.

PURPOSE

Switch on some debug output.


ADI/init [ Subroutines ]

[ Top ] [ ADI ] [ Subroutines ]

NAME

subroutine init

PURPOSE

Reads input switches. Initializes fields.


ADI/ADI_input [ Namelists ]

[ Top ] [ ADI ] [ Namelists ]

NAME

NAMELIST /ADI_input/

PURPOSE

Includes the switches:


ADI/ADI_solve_Douglas [ Subroutines ]

[ Top ] [ ADI ] [ Subroutines ]

NAME

subroutine ADI_solve_Douglas(U, S, Diag, eta_x, eta_y, CoulombFlag, rconv, niter_out, error_out)

PURPOSE

Solve the linear system

   ( tildeX + tildeY + tildeZ )* U = S

with respect to the field U(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1, where Nx=2*gridPoints(1)+1, Ny=2*gridPoints(2)+1, Nz=2*gridPoints(3)+1. Here tildeX, tildeY and tildeZ are the linear operators:

   [ tildeX * U ](i,j,k) = ( - U(i-1,j,k) + 2.*U(i,j,k) -  U(i+1,j,k) )*eta_x
                           + Diag(i,j,k)*U(i,j,k),
   [ tildeY * U ](i,j,k) = ( - U(i,j-1,k) + 2.*U(i,j,k) -  U(i,j+1,k) )*eta_y
                           + Diag(i,j,k)*U(i,j,k),
   [ tildeZ * U ](i,j,k) = - U(i,j,k-1) + 2.*U(i,j,k) -  U(i,j,k+1)
                           + Diag(i,j,k)*U(i,j,k).

with:

  • S(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1 --- the source field.

The values of U(i,j,k) at the boundary ( i=1,Nx or j=1,Ny or k=1,Nz ) are fixed.

INPUTS

  • real, dimension(:,:,:), intent(inout) :: U ! -- starting value of the field U for iterations,
  • real, dimension(:,:,:), intent(in) :: S ! -- the source field,
  • real, dimension(:,:,:), intent(in) :: Diag ! -- diagonal coefficient field,
  • real, intent(in) :: eta_x ! =(gridSpacing(3)/gridSpacing(1))**2,
  • real, intent(in) :: eta_y ! =(gridSpacing(3)/gridSpacing(2))**2
  • logical, optional, intent(in) :: CoulombFlag ! please, set .true. when Coulomb field is computed
  • real, optional, intent(in) :: rconv ! convergence parameter
  • integer, optional, intent(out) :: niter_out ! number of iterations
  • real, optional, intent(out) :: error_out ! error

OUTPUT

  • real, dimension(:,:,:), intent(inout) :: U ! -- final iterated value of the field U,

NOTES

Uses the Douglas Iterative Method (c.f. R.S.Varga, "Matrix Iterative Analysis") The tridiagonal inversion procedure is explained, e.g. in S.E. Koonin, D.C. Meredith, "Computational Physics"


ADI/ADI_Coulomb [ Subroutines ]

[ Top ] [ ADI ] [ Subroutines ]

NAME

subroutine ADI_Coulomb(U, S, eta_x, eta_y, rconv, niter_out, error_out)

PURPOSE

Solve the linear system

   ( tildeX + tildeY + tildeZ )* U = S

with respect to the field U(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1, where Nx=2*gridPoints(1)+1, Ny=2*gridPoints(2)+1, Nz=2*gridPoints(3)+1. Here tildeX, tildeY and tildeZ are the linear operators:

   [ tildeX * U ](i,j,k) = ( - U(i-1,j,k) + 2.*U(i,j,k) -  U(i+1,j,k) )*eta_x
   [ tildeY * U ](i,j,k) = ( - U(i,j-1,k) + 2.*U(i,j,k) -  U(i,j+1,k) )*eta_y
   [ tildeZ * U ](i,j,k) = - U(i,j,k-1) + 2.*U(i,j,k) -  U(i,j,k+1)

with:

  • S(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1 --- the source field.

The values of U(i,j,k) at the boundary ( i=1,Nx or j=1,Ny or k=1,Nz ) are fixed.

INPUTS

  • real, dimension(:,:,:), intent(inout) :: U ! -- starting value of the field U for iterations,
  • real, dimension(:,:,:), intent(in) :: S ! -- the source field,
  • real, intent(in) :: eta_x ! =(gridSpacing(3)/gridSpacing(1))**2,
  • real, intent(in) :: eta_y ! =(gridSpacing(3)/gridSpacing(2))**2
  • real, optional, intent(in) :: rconv ! convergence parameter
  • integer, optional, intent(out) :: niter_out ! number of iterations
  • real, optional, intent(out) :: error_out ! error

OUTPUT

  • real, dimension(:,:,:), intent(inout) :: U ! -- final iterated value of the field U,

NOTES

Uses the Douglas Iterative Method (c.f. R.S. Varga "Matrix Iterative Analysis") The tridiagonal inversion procedure is explained, e.g. in S.E. Koonin, D.C. Meredith, "Computational Physics". This subroutine is the same as ADI_solve_Douglas, but without diagonal coefficients.


ADI/ADI_solve [ Subroutines ]

[ Top ] [ ADI ] [ Subroutines ]

NAME

subroutine ADI_solve(U, S, Diag, eta_x, eta_y, CoulombFlag, rconv, niter_out, error_out)

PURPOSE

Solve the linear system

   ( tildeX + tildeY + tildeZ )* U = S

with respect to the field U(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1, where Nx=2*gridPoints(1)+1, Ny=2*gridPoints(2)+1, Nz=2*gridPoints(3)+1. Here tildeX, tildeY and tildeZ are the linear operators:

   [ tildeX * U ](i,j,k) = ( - U(i-1,j,k) + 2.*U(i,j,k) -  U(i+1,j,k) )*eta_x
                         + Diag(i,j,k)*U(i,j,k),
   [ tildeY * U ](i,j,k) = ( - U(i,j-1,k) + 2.*U(i,j,k) -  U(i,j+1,k) )*eta_y
                         + Diag(i,j,k)*U(i,j,k),
   [ tildeZ * U ](i,j,k) = - U(i,j,k-1) + 2.*U(i,j,k) -  U(i,j,k+1)
                         + Diag(i,j,k)*U(i,j,k).

with:

  • S(i,j,k), i=2,...,Nx-1, j=2,...,Ny-1, k=2,...,Nz-1 --- the source field.

The values of U(i,j,k) at the boundary ( i=1,Nx or j=1,Ny or k=1,Nz ) are fixed.

INPUTS

  • real, dimension(:,:,:), intent(inout) :: U ! -- starting value of the field U for iterations,
  • real, dimension(:,:,:), intent(in) :: S ! -- the source field,
  • real, dimension(:,:,:), intent(in) :: Diag ! -- diagonal coefficient field,
  • real, intent(in) :: Diag_min, Diag_max ! -- min and max values of Diag,
  • real, intent(in) :: eta_x ! =(gridSpacing(3)/gridSpacing(1))**2,
  • real, intent(in) :: eta_y ! =(gridSpacing(3)/gridSpacing(2))**2
  • logical, optional, intent(in) :: CoulombFlag ! please, set .true. when Coulomb field is computed
  • real, optional, intent(in) :: rconv ! convergence parameter
  • integer, optional, intent(out) :: niter_out ! number of iterations
  • real, optional, intent(out) :: error_out ! error

OUTPUT

  • real, dimension(:,:,:), intent(inout) :: U ! -- final iterated value of the field U,
  • real, intent(out) :: funMax ! =max(abs(( tildeX + tildeY + tildeZ )* U - S))

NOTES

Uses the Peaceman-Rachford Iterative Method (c.f. R.S. Varga "Matrix Iterative Analysis") The tridiagonal inversion procedure is explained, e.g. in S.E. Koonin, D.C. Meredith, "Computational Physics"