Module fd4_neigh_mod


Uses:
    module fd4_block_mod, only: fd4_r_k_link
    module fd4_globaldef_mod
    module fd4_mpitype_mod
    module kinds_mod
Types:
    public type fd4_i4k_link
    public type fd4_neigh
Variables:
    integer (kind=i_k), public, parameter :: FD4_NEIGH_SEND = 1
    integer (kind=i_k), public, parameter :: FD4_NEIGH_RECV = 2
Subroutines and functions:
    private subroutine fd4_neigh_allocate (n, datatype_count)
    public subroutine fd4_neigh_deallocate (n)
    public subroutine fd4_neigh_deallocate_ptr (n)
    public subroutine fd4_neigh_deallocate_type_ptr (n)

Data related with communication to a neighbor partition. Used in ghost communication and block migration.

Author: Matthias Lieber


Description of Types

fd4_i4k_link

public type fd4_i4k_link
    integer (kind=i4k), pointer :: l => NULL ()
end type fd4_i4k_link

fd4_neigh

public type fd4_neigh
    type (fd4_mpitype), dimension (2) :: mpitype
    type (fd4_r_k_link), dimension (2) :: minptr
    type (fd4_i4k_link), dimension (2) :: minpti
    logical :: changed = .false.
end type fd4_neigh
Components:
mpitype MPI data type for send and receive
minptr pointer to type component with min address (real)
minpti pointer to type component with min address (integer)
changed flag to notify that neigh has been changed

Description of Subroutines and Functions

fd4_neigh_allocate

private subroutine fd4_neigh_allocate (n, datatype_count)
    type (fd4_neigh), intent(inout) :: n
    integer (kind=i_k), intent(in) :: datatype_count
end subroutine fd4_neigh_allocate
Parameters:
n pointer to fd4_neigh to allocate
datatype_count number of datatypes to allocate
Allocate all data of the fd4_neigh

fd4_neigh_deallocate

public subroutine fd4_neigh_deallocate (n)
    type (fd4_neigh), intent(inout) :: n
end subroutine fd4_neigh_deallocate
Parameters:
n fd4_neigh to deallocate
Deallocate all data of the fd4_neigh.

fd4_neigh_deallocate_ptr

public subroutine fd4_neigh_deallocate_ptr (n)
    type (fd4_neigh), pointer :: n
end subroutine fd4_neigh_deallocate_ptr
Parameters:
n pointer to fd4_neigh to deallocate
Deallocate all data of the fd4_neigh, pointer version. Deallocates also the fd4_neigh itself.

fd4_neigh_deallocate_type_ptr

public subroutine fd4_neigh_deallocate_type_ptr (n)
    type (fd4_neigh), pointer :: n
end subroutine fd4_neigh_deallocate_type_ptr
Parameters:
n pointer to fd4_neigh to deallocate
Deallocate all data of the fd4_neigh, pointer version. Deallocates also the fd4_neigh itself and the basic types.