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 interface~append~24 append proc~tem_build_facerecvbuffers->interface~append~24 interface~init~24 init proc~tem_build_facerecvbuffers->interface~init~24 interface~positionofval~5 positionofval proc~tem_build_facerecvbuffers->interface~positionofval~5 proc~tem_abort tem_abort proc~tem_build_facerecvbuffers->proc~tem_abort proc~tem_isrecvface tem_isRecvFace proc~tem_build_facerecvbuffers->proc~tem_isrecvface proc~tem_build_facesendbuffers->interface~append~24 proc~tem_build_facesendbuffers->interface~init~24 proc~tem_build_facesendbuffers->interface~positionofval~5 proc~tem_build_facesendbuffers->proc~tem_abort proc~tem_issendface tem_isSendFace proc~tem_build_facesendbuffers->proc~tem_issendface proc~append_arrayga2d_real append_arrayga2d_real interface~append~24->proc~append_arrayga2d_real proc~append_singlega2d_real append_singlega2d_real interface~append~24->proc~append_singlega2d_real proc~init_ga2d_real init_ga2d_real interface~init~24->proc~init_ga2d_real proc~posofval_label posofval_label interface~positionofval~5->proc~posofval_label mpi_abort mpi_abort proc~tem_abort->mpi_abort interface~expand~22 expand proc~append_arrayga2d_real->interface~expand~22 proc~append_singlega2d_real->interface~expand~22 interface~sortedposofval~5 sortedposofval proc~posofval_label->interface~sortedposofval~5

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

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