Documentation for module dct

the type I Discrete Cosine Transfrom (DCT-I)

source: dct.F
Loading...

public Types:

dct_type
...

public Subroutines/Functions:

Initializes a dct_type
Releases a dct_type
expands a pw_type data to an evenly symmetric pw_type data that is 8 times larger than the original one: the even symmetry for a 1D sequence of length n is defined as: 1 2 3 ... n-2 n-1 n --> 1 2 3 ... n-2 n-1 n n-1 n-2 ... 3 2 and is generalized to 3D by applying the same rule in all three directions
shrinks an evenly symmetric pw_type data to a pw_type data that is 8 times smaller (the reverse procedure of pw_expand).
sets up an extended pw_grid for Discrete Cosine Transform (DCT) calculations

Parameters:

INTEGER
:: neumannx = 100
INTEGER
:: neumannxy = 110
INTEGER
:: neumannxyz = 111
INTEGER
:: neumannxz = 101
INTEGER
:: neumanny = 010
INTEGER
:: neumannyz = 011
INTEGER
:: neumannz = 001

public Types:

TYPE :: dct_type

...


INTEGER,
DIMENSION(:), POINTER :: dests_expand => NULL() ...
INTEGER,
DIMENSION(:), POINTER :: srcs_expand => NULL() ...
INTEGER,
DIMENSION(:), POINTER :: flipg_stat => NULL() ...
INTEGER,
DIMENSION(:), POINTER :: dests_shrink => NULL() ...
INTEGER
:: srcs_shrink ...
INTEGER,
DIMENSION(:,:,:), POINTER :: recv_msgs_bnds => NULL() ...
INTEGER,
DIMENSION(2,3) :: dct_bounds ...
INTEGER,
DIMENSION(2,3) :: dct_bounds_local ...
INTEGER,
DIMENSION(2,3) :: bounds_shftd ...
INTEGER,
DIMENSION(2,3) :: bounds_local_shftd ...

SUBROUTINEdct_type_init(pw_grid, neumann_directions, dct_env)

Initializes a dct_type

Arguments:
INTENT(in),
POINTER
:: pw_grid the original plane wave grid
INTEGER,
INTENT(in)
:: neumann_directions directions in which dct should be performed
TYPE(dct_type),
INTENT(inout)
:: dct_env dct_type to be initialized

SUBROUTINEdct_type_release(dct_env)

Releases a dct_type

Arguments:
TYPE(dct_type),
INTENT(inout)
:: dct_env dct_type to be released

SUBROUTINEpw_expand(neumann_directions, recv_msgs_bnds, dests_expand, srcs_expand, flipg_stat, bounds_shftd, pw_in, pw_expanded)

expands a pw_type data to an evenly symmetric pw_type data that is 8 times larger than the original one: the even symmetry for a 1D sequence of length n is defined as: 1 2 3 ... n-2 n-1 n --> 1 2 3 ... n-2 n-1 n n-1 n-2 ... 3 2 and is generalized to 3D by applying the same rule in all three directions

Arguments:
INTEGER,
INTENT(in)
:: neumann_directions directions in which dct should be performed
INTEGER,
INTENT(in),
POINTER
:: recv_msgs_bnds(:,:,:) bounds of the messages to be received
INTEGER,
INTENT(in),
POINTER
:: dests_expand(:) list of the destination processes
INTEGER,
INTENT(in),
POINTER
:: srcs_expand(:) list of the source processes
INTEGER,
INTENT(in),
POINTER
:: flipg_stat(:) flipping status for the received data chunks
INTEGER,
INTENT(in)
:: bounds_shftd(2,3) bounds of the original grid shifted to have g0 in the middle of the cell
TYPE(pw_type),
INTENT(in),
POINTER
:: pw_in the original plane wave data
TYPE(pw_type),
INTENT(inout),
POINTER
:: pw_expanded the pw data after expansion

SUBROUTINEpw_shrink(neumann_directions, dests_shrink, srcs_shrink, bounds_local_shftd, pw_in, pw_shrinked)

shrinks an evenly symmetric pw_type data to a pw_type data that is 8 times smaller (the reverse procedure of pw_expand).

Arguments:
INTEGER,
INTENT(in)
:: neumann_directions directions in which dct should be performed
INTEGER,
INTENT(in),
POINTER
:: dests_shrink(:) list of the destination processes
INTEGER,
INTENT(in)
:: srcs_shrink list of the source proceses
INTEGER,
INTENT(in)
:: bounds_local_shftd(2,3) local bounds of the original grid after shifting
TYPE(pw_type),
INTENT(in),
POINTER
:: pw_in the original plane wave data
TYPE(pw_type),
INTENT(inout),
POINTER
:: pw_shrinked the shrinked plane wave data

SUBROUTINEsetup_dct_pw_grids(pw_grid, cell_hmat, neumann_directions, dct_pw_grid)

sets up an extended pw_grid for Discrete Cosine Transform (DCT) calculations

Arguments:
INTENT(in),
POINTER
:: pw_grid the original plane wave grid
REAL(dp),
INTENT(in)
:: cell_hmat(3,3) cell hmat
INTEGER,
INTENT(in)
:: neumann_directions directions in which dct should be performed
INTENT(inout),
POINTER
:: dct_pw_grid DCT plane-wave grid