Scrambler
1
|
defgroup CommonFunctions More...
Data Types | |
interface | AddCurl |
Public Member Functions | |
REAL(KIND=qPREC) function, dimension(3) | SphericalRotation (x, theta, phi) |
REAL(KIND=qPREC) function, dimension(3) | InvSphericalRotation (x, theta, phi) |
REAL(KIND=qPrec) function, dimension(3) | rotate_x (v, a) |
Rotates a vector v a degrees around the x-axis. | |
REAL(KIND=qPrec) function, dimension(3) | rotate_y (v, a) |
Rotates a vector v a degrees around the y-axis. | |
REAL(KIND=qPrec) function, dimension(3) | rotate_z (v, a) |
Rotates a vector v a degrees around the z-axis. | |
REAL(KIND=qPrec) function | rotate_z2D (v, a) |
subroutine | LSSolver (JLs, lsdata, sls, errls) |
subroutine | MatrixInvert (A, n) |
REAL(KIND=qPREC) function | GravityPotential (mass, pos, r_soft, soft_function) |
REAL(KIND=qPREC) function, dimension(3) | GravityForce (mass, pos, r_soft, soft_function) |
REAL(KIND=qPREC) function | SplineSoftening (pos, r_soft) |
Gravitational softening parameter. | |
REAL(KIND=qPREC) function | SplinePotential (r, r_soft) |
Potential for SplineSoftening. | |
REAL(KIND=qPREC) function | PlummerSoftening (pos, r_soft) |
Gravitational softening parameter. | |
REAL(KIND=qPREC) function | PlummerSoftening2D (pos, r_soft) |
Gravitational softening parameter. | |
REAL(KIND=qPREC) function | PlummerPotential (r, r_soft) |
Potential for PlummerSoftening. | |
REAL(KIND=qPREC) function | PlummerPotential2D (r, r_soft) |
Potential for PlummerSoftening. | |
REAL(KIND=qPREC) function | Cross2D (a, b) |
2D cross product of a with b | |
REAL(KIND=qPREC) function | Cross3D (a, b) |
3D cross product of a with b | |
REAL(KIND=qPrec) function, dimension(3) | SolveCrossEq (b, c) |
Solves a x b = c for a where a is a unit vector. | |
REAL(KIND=qPrec) function | fade (r, thickness) |
REAL(KIND=qPrec) function | pLgndr (l, m, x) |
REAL(KIND=qPrec) function | GAMMAS (xx) |
REAL(KIND=qPrec) function | SBesj (n, x) |
REAL(KIND=qPrec) function | SBesy (n, x) |
REAL(KIND=qPrec) function | BNomial (n, k) |
REAL(KIND=qPrec) function | profac (start, inc, num) |
REAL(KIND=qPREC) function, dimension(3) | ConvertCylindrical (pos) |
Converts from cartesian (x,y,z) to cylindrical (s, phi, z) | |
REAL(KIND=qPREC) function, dimension(3) | ConvertSpherical (pos) |
Converts from cartesian (x,y,z) to spherical (r, theta, phi) | |
REAL(8) function | GetPhi (x, y) |
Calculates phi given x and y. | |
REAL(KIND=qPREC) function | JeansLength (rho, temp) |
rho and temp in cu Returns Jeans Length in cu | |
subroutine | random_sphere (A) |
Calculate a vector on a random sphere. | |
subroutine | random_circle (A) |
REAL(KIND=qPREC) function | SpectraK (ipos, mB) |
REAL(KIND=qPREC) function | Curl2D (v, dx) |
REAL(KIND=qPREC) function | Curl3D (v, dx) |
AddCurl Routines | |
subroutine | AddCurl2D (b, a, dx) |
Takes curl of a and adds it to b. | |
subroutine | AddCurl3D (b, a, dx) |
Takes curl of a and adds it to b. | |
Smoothing Functions | |
REAL(KIND=qPREC) function | SmoothFunction (r, ifunc, smooth) |
REAL(KIND=qPREC) function | smooth_tanh (r, smooth) |
Function that performs tangential smoothing. | |
REAL(KIND=qPREC) function | smooth_dbl_tanh (r, smooth) |
Function that performs tangential smoothing. | |
Public Attributes | |
INTEGER, parameter | INOSMOOTH = 0 |
INTEGER, parameter | ITANH = 1 |
INTEGER, parameter | IDBL_TANH = 2 |
INTEGER, parameter | IDECAYING_EXP = 3 |
INTEGER, parameter, public | NOSOFT = 0 |
INTEGER, parameter, public | SPLINESOFT = 1 |
INTEGER, parameter, public | PLUMMERSOFT = 2 |
defgroup CommonFunctions
Module containing many common miscellaneous functions Module containing many common miscellaneous functions
Definition at line 32 of file common_functions.f90.
subroutine AddCurl2D | ( | REAL(KIND=qPREC), dimension(:,:,:) | b, |
REAL(KIND=qPREC), dimension(:,:) | a, | ||
REAL(KIND=qPREC) | dx | ||
) |
Takes curl of a and adds it to b.
b | output vector field |
a | input vector field |
dx | grid spacing |
Definition at line 59 of file common_functions.f90.
subroutine AddCurl3D | ( | REAL(KIND=qPREC), dimension(:,:,:,:) | b, |
REAL(KIND=qPREC), dimension(:,:,:,:) | a, | ||
REAL(KIND=qPREC) | dx | ||
) |
Takes curl of a and adds it to b.
b | output vector field |
a | input vector field |
dx | grid spacing |
Definition at line 76 of file common_functions.f90.
REAL(KIND=qPREC) function SmoothFunction | ( | REAL(KIND=qPREC) | r, |
INTEGER | ifunc, | ||
REAL(KIND=qPREC) | smooth | ||
) |
Definition at line 104 of file common_functions.f90.
REAL(KIND=qPREC) function smooth_tanh | ( | REAL(KIND=qPREC) | r, |
REAL(KIND=qPREC) | smooth | ||
) |
Function that performs tangential smoothing.
r | radial factor (ratio of distance from cell to clump center divided by clump radius) |
smooth | smoothing width |
Definition at line 125 of file common_functions.f90.
REAL(KIND=qPREC) function smooth_dbl_tanh | ( | REAL(KIND=qPREC) | r, |
REAL(KIND=qPREC) | smooth | ||
) |
Function that performs tangential smoothing.
r | radial factor (ratio of distance from cell to clump center divided by clump radius) |
smooth | smoothing width |
Definition at line 139 of file common_functions.f90.
REAL(KIND=qPREC) function, dimension(3) SphericalRotation | ( | REAL(KIND=qPREC), dimension(3) | x, |
REAL(KIND=qPREC) | theta, | ||
REAL(KIND=qPREC) | phi | ||
) |
Definition at line 155 of file common_functions.f90.
REAL(KIND=qPREC) function, dimension(3) InvSphericalRotation | ( | REAL(KIND=qPREC), dimension(3) | x, |
REAL(KIND=qPREC) | theta, | ||
REAL(KIND=qPREC) | phi | ||
) |
Definition at line 161 of file common_functions.f90.
REAL(KIND=qPrec) function, dimension(3) rotate_x | ( | REAL(KIND=qPrec), dimension(3) | v, |
REAL(KIND=qPrec) | a | ||
) |
Rotates a vector v a degrees around the x-axis.
v | vector to rotate |
a | angle |
Definition at line 170 of file common_functions.f90.
REAL(KIND=qPrec) function, dimension(3) rotate_y | ( | REAL(KIND=qPrec), dimension(3) | v, |
REAL(KIND=qPrec) | a | ||
) |
Rotates a vector v a degrees around the y-axis.
v | vector to rotate |
a | angle |
Definition at line 180 of file common_functions.f90.
REAL(KIND=qPrec) function, dimension(3) rotate_z | ( | REAL(KIND=qPrec), dimension(3) | v, |
REAL(KIND=qPrec) | a | ||
) |
Rotates a vector v a degrees around the z-axis.
v | vector to rotate |
a | angle |
Definition at line 191 of file common_functions.f90.
REAL(KIND=qPrec) function rotate_z2D | ( | REAL(KIND=qPrec), dimension(2) | v, |
REAL(KIND=qPrec) | a | ||
) |
Definition at line 198 of file common_functions.f90.
subroutine LSSolver | ( | REAL(KIND=qPREC), dimension(:,:), intent(in) | JLs, |
REAL(KIND=qPREC), dimension(:), intent(in) | lsdata, | ||
REAL(KIND=qPREC), dimension(:), intent(inout) | sls, | ||
REAL(KIND=qPREC), dimension(:), optional | errls | ||
) |
Definition at line 209 of file common_functions.f90.
subroutine MatrixInvert | ( | REAL(KIND=qPREC), dimension(1:n,1:n), intent(inout) | A, |
INTEGER, intent(in) | n | ||
) |
Definition at line 254 of file common_functions.f90.
REAL(KIND=qPREC) function GravityPotential | ( | REAL(KIND=qPREC) | mass, |
REAL(KIND=qPREC), dimension(3) | pos, | ||
REAL(KIND=qPREC) | r_soft, | ||
INTEGER | soft_function | ||
) |
Definition at line 356 of file common_functions.f90.
REAL(KIND=qPREC) function, dimension(3) GravityForce | ( | REAL(KIND=qPREC) | mass, |
REAL(KIND=qPREC), dimension(3) | pos, | ||
REAL(KIND=qPREC) | r_soft, | ||
INTEGER | soft_function | ||
) |
Definition at line 436 of file common_functions.f90.
REAL(KIND=qPREC) function SplineSoftening | ( | REAL(KIND=qPREC), dimension(3) | pos, |
REAL(KIND=qPREC) | r_soft | ||
) |
Gravitational softening parameter.
Definition at line 456 of file common_functions.f90.
REAL(KIND=qPREC) function SplinePotential | ( | REAL(KIND=qPREC) | r, |
REAL(KIND=qPREC) | r_soft | ||
) |
Potential for SplineSoftening.
Definition at line 493 of file common_functions.f90.
REAL(KIND=qPREC) function PlummerSoftening | ( | REAL(KIND=qPREC), dimension(3) | pos, |
REAL(KIND=qPREC) | r_soft | ||
) |
Gravitational softening parameter.
Definition at line 526 of file common_functions.f90.
REAL(KIND=qPREC) function PlummerSoftening2D | ( | REAL(KIND=qPREC), dimension(3) | pos, |
REAL(KIND=qPREC) | r_soft | ||
) |
Gravitational softening parameter.
Definition at line 538 of file common_functions.f90.
REAL(KIND=qPREC) function PlummerPotential | ( | REAL(KIND=qPREC) | r, |
REAL(KIND=qPREC) | r_soft | ||
) |
Potential for PlummerSoftening.
Definition at line 546 of file common_functions.f90.
REAL(KIND=qPREC) function PlummerPotential2D | ( | REAL(KIND=qPREC) | r, |
REAL(KIND=qPREC) | r_soft | ||
) |
Potential for PlummerSoftening.
Definition at line 557 of file common_functions.f90.
REAL(KIND=qPREC) function Cross2D | ( | REAL(KIND=qPREC), dimension(2) | a, |
REAL(KIND=qPREC), dimension(2) | b | ||
) |
2D cross product of a with b
a | 1st vector |
b | 2nd vector |
Definition at line 566 of file common_functions.f90.
REAL(KIND=qPREC) function Cross3D | ( | REAL(KIND=qPREC), dimension(3) | a, |
REAL(KIND=qPREC), dimension(3) | b | ||
) |
3D cross product of a with b
a | 1st vector |
b | 2nd vector |
Definition at line 574 of file common_functions.f90.
REAL(KIND=qPrec) function, dimension(3) SolveCrossEq | ( | REAL(KIND=qPrec), dimension(3) | b, |
REAL(KIND=qPrec), dimension(3) | c | ||
) |
Solves a x b = c for a where a is a unit vector.
Definition at line 581 of file common_functions.f90.
REAL(KIND=qPrec) function fade | ( | REAL(KIND=qPrec) | r, |
REAL(KIND=qPrec) | thickness | ||
) |
Definition at line 587 of file common_functions.f90.
REAL(KIND=qPrec) function pLgndr | ( | INTEGER | l, |
INTEGER | m, | ||
REAL(KIND=qPrec) | x | ||
) |
Definition at line 600 of file common_functions.f90.
REAL(KIND=qPrec) function GAMMAS | ( | REAL(KIND=qPrec) | xx | ) |
Definition at line 632 of file common_functions.f90.
REAL(KIND=qPrec) function SBesj | ( | INTEGER | n, |
REAL(KIND=qPrec) | x | ||
) |
Definition at line 664 of file common_functions.f90.
REAL(KIND=qPrec) function SBesy | ( | INTEGER | n, |
REAL(KIND=qPrec) | x | ||
) |
Definition at line 680 of file common_functions.f90.
REAL(KIND=qPrec) function BNomial | ( | REAL(KIND=qPrec) | n, |
REAL(KIND=qPrec) | k | ||
) |
Definition at line 688 of file common_functions.f90.
REAL(KIND=qPrec) function profac | ( | REAL(KIND=qPrec) | start, |
REAL(KIND=qPrec) | inc, | ||
INTEGER | num | ||
) |
Definition at line 695 of file common_functions.f90.
REAL(KIND=qPREC) function, dimension(3) ConvertCylindrical | ( | REAL(KIND=qPREC), dimension(3) | pos | ) |
Converts from cartesian (x,y,z) to cylindrical (s, phi, z)
Definition at line 709 of file common_functions.f90.
REAL(KIND=qPREC) function, dimension(3) ConvertSpherical | ( | REAL(KIND=qPREC), dimension(3) | pos | ) |
Converts from cartesian (x,y,z) to spherical (r, theta, phi)
Definition at line 716 of file common_functions.f90.
REAL(8) function GetPhi | ( | REAL(8) | x, |
REAL(8) | y | ||
) |
Calculates phi given x and y.
Definition at line 724 of file common_functions.f90.
REAL(KIND=qPREC) function JeansLength | ( | REAL(KIND=qPREC) | rho, |
REAL(KIND=qPREC) | temp | ||
) |
rho and temp in cu Returns Jeans Length in cu
Definition at line 734 of file common_functions.f90.
subroutine random_sphere | ( | REAL(8), dimension(:) | A | ) |
Calculate a vector on a random sphere.
Definition at line 741 of file common_functions.f90.
subroutine random_circle | ( | REAL(8), dimension(:) | A | ) |
Definition at line 752 of file common_functions.f90.
REAL(KIND=qPREC) function SpectraK | ( | INTEGER, dimension(:) | ipos, |
INTEGER, dimension(:,:) | mB | ||
) |
Definition at line 761 of file common_functions.f90.
REAL(KIND=qPREC) function Curl2D | ( | REAL(KIND=qPREC), dimension(3,3,2) | v, |
REAL(KIND=qPREC) | dx | ||
) |
Definition at line 779 of file common_functions.f90.
REAL(KIND=qPREC) function Curl3D | ( | REAL(KIND=qPREC), dimension(3,3,3,3) | v, |
REAL(KIND=qPREC) | dx | ||
) |
Definition at line 786 of file common_functions.f90.
INTEGER, parameter INOSMOOTH = 0 |
Definition at line 44 of file common_functions.f90.
INTEGER, parameter ITANH = 1 |
Definition at line 44 of file common_functions.f90.
INTEGER, parameter IDBL_TANH = 2 |
Definition at line 44 of file common_functions.f90.
INTEGER, parameter IDECAYING_EXP = 3 |
Definition at line 44 of file common_functions.f90.
INTEGER, parameter, public NOSOFT = 0 |
Definition at line 45 of file common_functions.f90.
INTEGER, parameter, public SPLINESOFT = 1 |
Definition at line 45 of file common_functions.f90.
INTEGER, parameter, public PLUMMERSOFT = 2 |
Definition at line 45 of file common_functions.f90.