tem_build_faceBuffers Subroutine

private subroutine tem_build_faceBuffers(minLevel, maxLevel, faces, levelDesc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: minLevel

The minimum refinement level of your mesh.

integer, intent(in) :: maxLevel

The maximum refinement level of your mesh.

type(tem_face_type), intent(inout) :: faces(minLevel:maxLevel)

The communication pattern you want use for the buffer. The created face descriptor.

type(tem_levelDesc_type), intent(in) :: levelDesc(1:3,minLevel:maxLevel)

Dimension-by-dimension level descriptors


Calls

proc~~tem_build_facebuffers~~CallsGraph proc~tem_build_facebuffers tem_build_faceBuffers proc~tem_build_facerecvbuffers tem_build_faceRecvBuffers proc~tem_build_facebuffers->proc~tem_build_facerecvbuffers proc~tem_build_facesendbuffers tem_build_faceSendBuffers proc~tem_build_facebuffers->proc~tem_build_facesendbuffers proc~tem_isrecvface tem_isRecvFace proc~tem_build_facerecvbuffers->proc~tem_isrecvface interface~positionofval~5 positionofval proc~tem_build_facerecvbuffers->interface~positionofval~5 interface~append~23 append proc~tem_build_facerecvbuffers->interface~append~23 proc~tem_abort tem_abort proc~tem_build_facerecvbuffers->proc~tem_abort interface~init~22 init proc~tem_build_facerecvbuffers->interface~init~22 proc~tem_build_facesendbuffers->interface~positionofval~5 proc~tem_build_facesendbuffers->interface~append~23 proc~tem_build_facesendbuffers->proc~tem_abort proc~tem_build_facesendbuffers->interface~init~22 proc~tem_issendface tem_isSendFace proc~tem_build_facesendbuffers->proc~tem_issendface proc~posofval_label posofval_label interface~positionofval~5->proc~posofval_label proc~append_arrayga2d_real append_arrayga2d_real interface~append~23->proc~append_arrayga2d_real proc~append_singlega2d_real append_singlega2d_real interface~append~23->proc~append_singlega2d_real mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~init_ga2d_real init_ga2d_real interface~init~22->proc~init_ga2d_real interface~sortedposofval~5 sortedposofval proc~posofval_label->interface~sortedposofval~5 interface~expand~22 expand proc~append_arrayga2d_real->interface~expand~22 proc~append_singlega2d_real->interface~expand~22

Called by

proc~~tem_build_facebuffers~~CalledByGraph proc~tem_build_facebuffers tem_build_faceBuffers proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_build_facebuffers

Contents

Source Code


Source Code

  subroutine tem_build_faceBuffers( minLevel, maxLevel, faces, levelDesc )
    ! --------------------------------------------------------------------------
    !> The minimum refinement level of your mesh.
    integer, intent(in) :: minLevel
    !> The maximum refinement level of your mesh.
    integer, intent(in) :: maxLevel
    !> The communication pattern you want use for the buffer.
    ! type(tem_commpattern_type), intent(in) :: commPattern
    !> The created face descriptor.
    type(tem_face_type),intent(inout)  :: faces(minLevel:maxLevel)
    !> Dimension-by-dimension level descriptors
    type(tem_levelDesc_type), intent(in) :: levelDesc(1:3,minLevel:maxLevel)
    ! --------------------------------------------------------------------------
    integer :: iLevel, iDir
    ! --------------------------------------------------------------------------

    ! Create the face buffers for which I will receive information before
    ! my rank can do the timestep. Attention: this is consistent with the
    ! definition of a compute face.
    do iLevel = minLevel, maxLevel
      do iDir = 1, 3
        ! buffer for the state
        call tem_build_faceRecvBuffers(                                 &
          &    faces       = faces(iLevel)%faces(iDir),                 &
          &    levelDesc   = levelDesc(iDir, iLevel),                   &
          &    buf         = faces(iLevel)%faces(iDir)%recvBuffer_state )

        ! buffer for the flux
        call tem_build_faceRecvBuffers(                                &
          &    faces       = faces(iLevel)%faces(iDir),                &
          &    levelDesc   = levelDesc(iDir, iLevel),                  &
          &    buf         = faces(iLevel)%faces(iDir)%recvBuffer_flux )
      end do
    end do

    ! Create the face buffers for which I will send information before
    ! the other ranks can the timestep.
    do iLevel = minLevel, maxLevel
      do iDir = 1, 3
      ! buffer for the state
      call tem_build_faceSendBuffers(                                 &
        &    faces       = faces(iLevel)%faces(iDir),                 &
        &    levelDesc   = levelDesc(iDir, iLevel),                   &
        &    buf         = faces(iLevel)%faces(iDir)%sendBuffer_state )
      ! buffer for the flux
      call tem_build_faceSendBuffers(                                &
        &    faces       = faces(iLevel)%faces(iDir),                &
        &    levelDesc   = levelDesc(iDir, iLevel),                  &
        &    buf         = faces(iLevel)%faces(iDir)%sendBuffer_flux )
      end do
    end do

  end subroutine tem_build_faceBuffers