dm_coord Module

Coordinate transformations.


Uses

  • module~~dm_coord~~UsesGraph module~dm_coord dm_coord module~dm_kind dm_kind module~dm_coord->module~dm_kind iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Used by

  • module~~dm_coord~~UsedByGraph module~dm_coord dm_coord module~dmpack dmpack module~dmpack->module~dm_coord proc~dm_transform_polar_3d dm_transform_polar_3d proc~dm_transform_polar_3d->module~dm_coord

Interfaces

Generic 3D cartesian to polar cooordinate transformation routine.

  • private pure subroutine coord_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 coord_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].

Generic 3D polar to cartesian cooordinate transformation routine.

  • private pure subroutine coord_polar_to_cartesian_3d_array(p, c)

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

    Arguments

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

    Polar coordinates (r, omega, phi).

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

    Cartesian coordinates (x, y, z).

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

    Transforms polar (spherical) coordinates to cartesian coordinates.

    Arguments

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

    Radial distance.

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

    Polar (vertical) angle [rad].

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

    Azimuthal (horizontal) angle [rad].

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

    X coordinate.

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

    Y coordinate.

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

    Z coordinate.