dm_transform_cartesian_to_polar_3d Interface

public interface dm_transform_cartesian_to_polar_3d

Module Procedures

private pure subroutine dm_transform_cartesian_to_polar_3d_array(c, p)

Transforms cartesian coordinates to polar (spherical) coordinates. Array c must contain [ x, y, z ], array p will contain [ r, omega, phi ].

Arguments

Type IntentOptional Attributes Name
real(kind=r8), intent(in) :: c(3)

Cartesian coordinates (x, y, z).

real(kind=r8), intent(out) :: p(3)

Polar coordinates (r, omega, phi).

private pure elemental subroutine dm_transform_cartesian_to_polar_3d_scalar(x, y, z, r, omega, phi)

Transforms cartesian coordinates to polar (spherical) coordinates.

Arguments

Type IntentOptional Attributes Name
real(kind=r8), intent(in) :: x

X coordinate.

real(kind=r8), intent(in) :: y

Y coordinate.

real(kind=r8), intent(in) :: z

Z coordinate.

real(kind=r8), intent(out) :: r

Radial distance.

real(kind=r8), intent(out) :: omega

Polar (vertical) angle [rad].

real(kind=r8), intent(out) :: phi

Azimuthal (horizontal) angle [rad].