PSI_ROT Function

private function PSI_ROT(R, R0, sigR, Z, Z0, sigZ, theta)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: R

R-coordinate of MH sampled location

real(kind=rp), intent(in) :: R0

R-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigR

Variance of first dimension of 2D Gaussian

real(kind=rp), intent(in) :: Z

Z-coordinate of MH sampled location

real(kind=rp), intent(in) :: Z0

Z-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigZ

Variance of second dimension of 2D Gaussian

real(kind=rp), intent(in) :: theta

Angle of counter-clockwise rotation (in radians), of 2D Gaussian distribution relative to R,Z

Return Value real(kind=rp)

Argument of exponential comprising 2D Gaussian distribution


Called by

proc~~psi_rot~~CalledByGraph proc~psi_rot PSI_ROT proc~mh_gaussian_elliptic_torus MH_gaussian_elliptic_torus proc~mh_gaussian_elliptic_torus->proc~psi_rot proc~spong_3d Spong_3D proc~spong_3d->proc~psi_rot

Contents

Source Code


Source Code

FUNCTION PSI_ROT(R,R0,sigR,Z,Z0,sigZ,theta)
  REAL(rp), INTENT(IN) 	:: R
  !! R-coordinate of MH sampled location
  REAL(rp), INTENT(IN) 	:: R0
  !! R-coordinate of center of 2D Gaussian
  REAL(rp), INTENT(IN) 	:: sigR
  !! Variance of first dimension of 2D Gaussian
  REAL(rp), INTENT(IN) 	:: Z
  !! Z-coordinate of MH sampled location
  REAL(rp), INTENT(IN) 	:: Z0
  !! Z-coordinate of center of 2D Gaussian
  REAL(rp), INTENT(IN) 	:: sigZ
  !! Variance of second dimension of 2D Gaussian
  REAL(rp), INTENT(IN) 	:: theta
  !! Angle of counter-clockwise rotation (in radians), of 2D Gaussian
  !! distribution relative to R,Z
  REAL(rp) 		:: PSI_ROT
  !! Argument of exponential comprising 2D Gaussian distribution 

  PSI_ROT=(R-R0)**2*((cos(theta))**2/(2*sigR**2)+(sin(theta))**2/(2*sigZ**2))+ &
       2*(R-R0)*(Z-Z0)*cos(theta)*sin(theta)*(1/(2*sigR**2)-1/(2*sigZ**2))+ &
       (Z-Z0)**2*((sin(theta))**2/(2*sigR**2)+(cos(theta))**2/(2*sigZ**2))
  
END FUNCTION PSI_ROT