rotate Interface

public interface rotate

Contents


Module Procedures

private pure function rotate_general_1(i, j, k, Ip, Jp, Kp) result(rst)

Constructs a rotation matrix when the orientation of the coordinate frame of interest is known relative to the parent coordinate frame.

The matrix is of the following form.

This routine does not check for orthogonallity or unit vector length; therefore, to ensure correct results it is the callers responsibility to ensure each vector is of unit length and that the unit vectors are properly orthogonal.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: i(3)

The rotated coordinate frame x-axis unit vector.

real(kind=real64), intent(in) :: j(3)

The rotated coordinate frame y-axis unit vector.

real(kind=real64), intent(in) :: k(3)

The rotated coordinate frame z-axis unit vector.

real(kind=real64), intent(in) :: Ip(3)

The parent coordinate frame x-axis unit vector.

real(kind=real64), intent(in) :: Jp(3)

The parent coordinate frame y-axis unit vector.

real(kind=real64), intent(in) :: Kp(3)

The parent coordinate frame z-axis unit vector.

Return Value real(kind=real64), (3,3)

The resulting 3-by-3 matrix.

private pure function rotate_general_2(i, j, k) result(rst)

Constructs a rotation matrix when the orientation of the coordinate frame of interest is known relative to the parent coordinate frame.

The matrix is of the following form.

The parent coordinate frame is assumed to be as follows.

This routine does not check for orthogonallity or unit vector length; therefore, to ensure correct results it is the callers responsibility to ensure each vector is of unit length and that the unit vectors are properly orthogonal.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: i(3)

The rotated coordinate frame x-axis unit vector.

real(kind=real64), intent(in) :: j(3)

The rotated coordinate frame y-axis unit vector.

real(kind=real64), intent(in) :: k(3)

The rotated coordinate frame z-axis unit vector.

Return Value real(kind=real64), (3,3)

The resulting 3-by-3 matrix.