Module fd4_ghostcomm_mod


Uses:
    module fd4_globaldef_mod
    module fd4_vartab_mod
    module fd4_block_mod
    module fd4_comm_mod
    module fd4_domain_mod
    module fd4_neigh_mod
    module fd4_mpitype_mod
    module fd4_mpi_mod
    module fd4_ghostlist_mod
    module stack_mod
    module mrgrnk_mod
Types:
    public type fd4_ghostblock_types
    public type fd4_ghostcomm
Variables:
    integer (kind=i8k), public :: ghostcomm_total_size
Subroutines and functions:
    public subroutine fd4_ghostcomm_create (gc, domain, nfields, idx, st, err)
    public subroutine fd4_ghostcomm_delete (gc)
    public subroutine fd4_ghostcomm_exch (gc, err)

Exchange of ghost blocks.

Preprocessor options:

TODO:

Author: Matthias Lieber

See also: module fd4_comm


Description of Types

fd4_ghostblock_types

public type fd4_ghostblock_types
    integer, dimension (3,2) :: btypes
    integer, dimension (3) :: gtypes
end type fd4_ghostblock_types
Components:
btypes block types for comm. in (dim,dir)
gtypes ghost block types for comm. in (dim)
Save MPI datatypes for ghost communication of a block with specific size

fd4_ghostcomm

public type fd4_ghostcomm
    type (fd4_domain), pointer :: domain => null ()
    integer (kind=i_k), pointer, dimension (:,:) :: stride => null ()
    type (fd4_ghostblock_types), pointer, dimension (:,:,:) :: gbt
    type (fd4_neigh), pointer, dimension (:) :: neigh
    integer (kind=i8k) :: partition_id
end type fd4_ghostcomm
Components:
domain the domain
stride stride within block%sdata describing the selected variables
gbt (ghost) block types for each existing spatial block size
neigh data associated with each neighbor MPI rank
partition_id unique identifier of the current partition (counter)
Type describing a ghost communication relation within a domain for a selection of variables and timesteps.

Description of Subroutines and Functions

fd4_ghostcomm_create

public subroutine fd4_ghostcomm_create (gc, domain, nfields, idx, st, err)
    type (fd4_ghostcomm), intent(inout) :: gc
    type (fd4_domain), intent(inout), target :: domain
    integer (kind=i_k), intent(in) :: nfields
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_ghostcomm_create
Parameters:
gc the ghost communication description
domain the domain
nfields number of fields in idx and st
idx variable indexes
st time steps
err error status: 0...ok
Create a new ghost communication relation with specified fields.

TODO:


fd4_ghostcomm_delete

public subroutine fd4_ghostcomm_delete (gc)
    type (fd4_ghostcomm), intent(inout) :: gc
end subroutine fd4_ghostcomm_delete
Parameters:
gc the ghost communication description
Delete ghost communication relation.

fd4_ghostcomm_exch

public subroutine fd4_ghostcomm_exch (gc, err)
    type (fd4_ghostcomm), intent(inout), target :: gc
    integer (kind=i_k), intent(out) :: err
end subroutine fd4_ghostcomm_exch
Parameters:
gc the ghost communication description
err error status: 0...ok
Exchange of ghost blocks.