mom_array_transform module reference
Module for supporting the rotation of a field’s index map. The implementation of each angle is described below.
Functions/Subroutines
Rotate the elements of a 2d real array along first and second axes. |
|
Rotate the elements of a 3d real array along first and second axes. |
|
Rotate the elements of a 4d real array along first and second axes. |
|
Rotate the elements of a 2d integer array along first and second axes. |
|
Rotate the elements of a 2d logical array along first and second axes. |
|
Rotate the elements of a 2d real array pair along first and second axes. |
|
Rotate the elements of a 3d real array pair along first and second axes. |
|
Rotate the elements of a 4d real array pair along first and second axes. |
|
Rotate the elements of a 2d real vector along first and second axes. |
|
Rotate the elements of a 3d real vector along first and second axes. |
|
Rotate the elements of a 4d real vector along first and second axes. |
|
Allocate a 2d real array on the rotated index map of a reference array. |
|
Allocate a 3d real array on the rotated index map of a reference array. |
|
Allocate a 4d real array on the rotated index map of a reference array. |
|
Allocate a 2d integer array on the rotated index map of a reference array. |
|
Do a rotationally symmetric sum of a 1-d array. |
|
Do a rotationally symmetric sum of a 2-d array using a recursive "Union-Jack" pattern of addition. |
|
Do a naive non-rotationally symmetric sum of a 2-d array. |
|
Returns true if a unit test of the symmetric sums fails. |
Detailed Description
+90deg: B(i,j) = A(n-j,i) = transpose, then row reverse 180deg: B(i,j) = A(m-i,n-j) = row reversal + column reversal -90deg: B(i,j) = A(j,m-i) = row reverse, then transpose
90 degree rotations change the shape of the field, and are handled separately from 180 degree rotations.
It also provides the symmetric_sum() functions to do a rotationally invariant sum of the contents of a 1d or 2d array. functions to do a rotationally invariant sum of the contents of a 1d or 2d array.
Function/Subroutine Documentation
- subroutine mom_array_transform/rotate_array_real_2d(A_in, turns, A)
Rotate the elements of a 2d real array along first and second axes.
- Parameters:
a_in :: [in] Unrotated array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated array [arbitrary]
- Called from:
- subroutine mom_array_transform/rotate_array_real_3d(A_in, turns, A)
Rotate the elements of a 3d real array along first and second axes.
- Parameters:
a_in :: [in] Unrotated array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated array [arbitrary]
- subroutine mom_array_transform/rotate_array_real_4d(A_in, turns, A)
Rotate the elements of a 4d real array along first and second axes.
- Parameters:
a_in :: [in] Unrotated array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated array [arbitrary]
- subroutine mom_array_transform/rotate_array_integer(A_in, turns, A)
Rotate the elements of a 2d integer array along first and second axes.
- Parameters:
a_in :: [in] Unrotated array
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated array
- subroutine mom_array_transform/rotate_array_logical(A_in, turns, A)
Rotate the elements of a 2d logical array along first and second axes.
- Parameters:
a_in :: [in] Unrotated array
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated array
- subroutine mom_array_transform/rotate_array_pair_real_2d(A_in, B_in, turns, A, B)
Rotate the elements of a 2d real array pair along first and second axes.
- Parameters:
a_in :: [in] Unrotated scalar array pair [arbitrary]
b_in :: [in] Unrotated scalar array pair [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated scalar array pair [arbitrary]
b :: [out] Rotated scalar array pair [arbitrary]
- subroutine mom_array_transform/rotate_array_pair_real_3d(A_in, B_in, turns, A, B)
Rotate the elements of a 3d real array pair along first and second axes.
- Parameters:
a_in :: [in] Unrotated scalar array pair [arbitrary]
b_in :: [in] Unrotated scalar array pair [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated scalar array pair [arbitrary]
b :: [out] Rotated scalar array pair [arbitrary]
- subroutine mom_array_transform/rotate_array_pair_integer(A_in, B_in, turns, A, B)
Rotate the elements of a 4d real array pair along first and second axes.
- Parameters:
a_in :: [in] Unrotated scalar array pair
b_in :: [in] Unrotated scalar array pair
turns ::
turns[in] Number of quarter turnsa :: [out] Rotated scalar array pair
b :: [out] Rotated scalar array pair
- subroutine mom_array_transform/rotate_vector_real_2d(A_in, B_in, turns, A, B)
Rotate the elements of a 2d real vector along first and second axes.
- Parameters:
a_in :: [in] First component of unrotated vector [arbitrary]
b_in :: [in] Second component of unrotated vector [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] First component of rotated vector [arbitrary]
b :: [out] Second component of unrotated vector [arbitrary]
- subroutine mom_array_transform/rotate_vector_real_3d(A_in, B_in, turns, A, B)
Rotate the elements of a 3d real vector along first and second axes.
- Parameters:
a_in :: [in] First component of unrotated vector [arbitrary]
b_in :: [in] Second component of unrotated vector [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] First component of rotated vector [arbitrary]
b :: [out] Second component of unrotated vector [arbitrary]
- subroutine mom_array_transform/rotate_vector_real_4d(A_in, B_in, turns, A, B)
Rotate the elements of a 4d real vector along first and second axes.
- Parameters:
a_in :: [in] First component of unrotated vector [arbitrary]
b_in :: [in] Second component of unrotated vector [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [out] First component of rotated vector [arbitrary]
b :: [out] Second component of unrotated vector [arbitrary]
- subroutine mom_array_transform/allocate_rotated_array_real_2d(A_in, lb, turns, A)
Allocate a 2d real array on the rotated index map of a reference array.
- Parameters:
lb ::
lb[in] Lower index bounds of A_ina_in :: [in] Reference array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [inout] Array on rotated index [arbitrary]
- subroutine mom_array_transform/allocate_rotated_array_real_3d(A_in, lb, turns, A)
Allocate a 3d real array on the rotated index map of a reference array.
- Parameters:
lb ::
lb[in] Lower index bounds of A_ina_in :: [in] Reference array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [inout] Array on rotated index [arbitrary]
- subroutine mom_array_transform/allocate_rotated_array_real_4d(A_in, lb, turns, A)
Allocate a 4d real array on the rotated index map of a reference array.
- Parameters:
lb ::
lb[in] Lower index bounds of A_ina_in :: [in] Reference array [arbitrary]
turns ::
turns[in] Number of quarter turnsa :: [inout] Array on rotated index [arbitrary]
- subroutine mom_array_transform/allocate_rotated_array_integer(A_in, lb, turns, A)
Allocate a 2d integer array on the rotated index map of a reference array.
- Parameters:
lb ::
lb[in] Lower index bounds of A_ina_in :: [in] Reference array
turns ::
turns[in] Number of quarter turnsa :: [inout] Array on rotated index
- function mom_array_transform/symmetric_sum_1d(field)
Do a rotationally symmetric sum of a 1-d array.
- Parameters:
field ::
field[in] The field to sum in arbitrary units [A ~> a]- Return:
undefined :: The rotationally symmetric sum of the entries in field [A ~> a]
- Called from:
- function mom_array_transform/symmetric_sum_2d(field)
Do a rotationally symmetric sum of a 2-d array using a recursive “Union-Jack” pattern of addition.
- Parameters:
field ::
field[in] The field to sum in arbitrary units [A ~> a]- Return:
undefined :: The rotationally symmetric sum of the entries in field [A ~> a]
- Called from:
- function mom_array_transform/naive_sum_2d(field, abs_val)
Do a naive non-rotationally symmetric sum of a 2-d array. This function is only here for testing.
- Parameters:
field ::
field[in] The field to sum in arbitrary units [A ~> a]abs_val ::
abs_val[in] If present and true, sum the absolute values
- Return:
undefined :: The rotation dependent sum of the entries in field [A ~> a]
- Called from:
- function mom_array_transform/symmetric_sum_unit_tests(verbose)
Returns true if a unit test of the symmetric sums fails.
- Parameters:
verbose ::
verbose[in] If true, write results to stdout- Call to:
- Called from: