tem_faceDep_verticalDown Subroutine

private subroutine tem_faceDep_verticalDown(coarseFaces, fineFaces, dir, nEligibleChildren)

Arguments

Type IntentOptional Attributes Name
type(tem_face_descriptor_type), intent(inout) :: coarseFaces

Face description on the coarse level. The dependencies to the finer level will be appended to this face descriptor.

type(tem_face_descriptor_type), intent(in) :: fineFaces

Face description on the finer level.

integer, intent(in) :: dir

The spatial direction of the face to add the downward dependencies for. 1 --> x direction 2 --> y direction 3 --> z direction

integer, intent(in) :: nEligibleChildren

The number of eligible children for the vertical face dependency


Source Code

  subroutine tem_faceDep_verticalDown( coarseFaces, fineFaces, dir, &
                                     & nEligibleChildren )
    ! --------------------------------------------------------------------------
    !> Face description on the coarse level. The dependencies to the finer
    !! level will be appended to this face descriptor.
    type(tem_face_descriptor_type), intent(inout) :: coarseFaces
    !> Face description on the finer level.
    type(tem_face_descriptor_type), intent(in) :: fineFaces
    !> The spatial direction of the face to add the downward dependencies for.
    !! 1 --> x direction
    !! 2 --> y direction
    !! 3 --> z direction
    integer, intent(in) :: dir
    !> The number of eligible children for the vertical face dependency
    integer, intent(in) :: nEligibleChildren
    ! --------------------------------------------------------------------------
    integer :: iFace
    integer :: leftPrp, rightPrp
    ! --------------------------------------------------------------------------

    ! Run over all the faces and add the downward depndency (depending on the
    ! properties of the face).
    faceLoop: do iFace = 1, coarseFaces%faceList%faceId%nVals

      ! get its properties from left and right
      call tem_getFace_prp( coarseFaces, iFace, leftPrp, rightPrp )

      ! check if this face requires downwards dependencies. If yes, we just add
      ! this dependency to the coarse face descriptor.
      if( tem_reqDep_down(leftPrp, rightPrp) ) then
        call tem_addDep_down( iFace, coarseFaces, fineFaces, &
                            & dir, nEligibleChildren )
      end if

    end do faceLoop

  end subroutine tem_faceDep_verticalDown