ReserveSetMessages Subroutine

public subroutine ReserveSetMessages(mesh, nvar)

Reserve mesh%decomp's request scratch for the largest scalar exchange a set with nvar variables posts: 2*nvar messages per rank-remote conforming side, mortar sub-side or anisotropic mortar half. Rank-local; no communication.

Arguments

TypeIntentOptionalAttributesName
type(Mesh3D), intent(inout) :: mesh
integer, intent(in) :: nvar

Called by

proc~~reservesetmessages~~CalledByGraph proc~reservesetmessages ReserveSetMessages proc~setupinterfaces_multisetmodel3d_t SetupInterfaces_MultiSetModel3D_t proc~setupinterfaces_multisetmodel3d_t->proc~reservesetmessages proc~setupinterfaces_multisetmodel3d SetupInterfaces_MultiSetModel3D proc~setupinterfaces_multisetmodel3d->proc~setupinterfaces_multisetmodel3d_t

Contents

Source Code


Source Code

  subroutine ReserveSetMessages(mesh,nvar)
    !! Reserve mesh%decomp's request scratch for the largest scalar exchange a set with
    !! nvar variables posts: 2*nvar messages per rank-remote conforming side, mortar
    !! sub-side or anisotropic mortar half. Rank-local; no communication.
    implicit none
    type(Mesh3D),intent(inout) :: mesh
    integer,intent(in) :: nvar
    ! Local
    integer :: nRemote

    nRemote = mesh%decomp%CountRemoteSides(mesh%sideInfo,mesh%nElem,6)
    if(mesh%nMortars > 0) then
      nRemote = max(nRemote,mesh%decomp%CountRemoteMortarSides(mesh%mortarInfo,mesh%nMortars,4))
    endif
    if(mesh%nAnisoMortars > 0) then
      nRemote = max(nRemote, &
                    mesh%decomp%CountRemoteMortarSides(mesh%anisoMortarInfo,mesh%nAnisoMortars,2))
    endif
    call mesh%decomp%ReserveMessages(2*nvar*nRemote)

  endsubroutine ReserveSetMessages