tem_appendFace_prp Subroutine

private subroutine tem_appendFace_prp(faceId, prp, faces, prp_dir)

Attaches another property to a given face (from left or right). If the face does not exist this routine will not do anything.

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: faceId

The face identifier to append the face property to.

integer, intent(in) :: prp

The property to attach

type(tem_face_descriptor_type), intent(inout) :: faces

The face desriptor to update.

integer, intent(in) :: prp_dir

Attach the property to the left or right property of the face.


Calls

proc~~tem_appendface_prp~~CallsGraph proc~tem_appendface_prp tem_appendFace_prp interface~positionofval~5 positionofval proc~tem_appendface_prp->interface~positionofval~5 proc~tem_melt_faceprp tem_melt_facePrp proc~tem_appendface_prp->proc~tem_melt_faceprp proc~posofval_label posofval_label interface~positionofval~5->proc~posofval_label interface~sortedposofval~5 sortedposofval proc~posofval_label->interface~sortedposofval~5 proc~sortposofval_label sortposofval_label interface~sortedposofval~5->proc~sortposofval_label

Called by

proc~~tem_appendface_prp~~CalledByGraph proc~tem_appendface_prp tem_appendFace_prp proc~tem_extend_commfromfinerprp tem_extend_commFromFinerPrp proc~tem_extend_commfromfinerprp->proc~tem_appendface_prp proc~tem_extend_commfromcoarserprp tem_extend_commFromCoarserPrp proc~tem_extend_commfromcoarserprp->proc~tem_appendface_prp proc~tem_extend_remoteprp tem_extend_remotePrp proc~tem_extend_remoteprp->proc~tem_extend_commfromfinerprp proc~tem_extend_remoteprp->proc~tem_extend_commfromcoarserprp proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_extend_remoteprp

Contents

Source Code


Source Code

  subroutine tem_appendFace_prp( faceId, prp, faces, prp_dir )
    ! --------------------------------------------------------------------------
    !> The face identifier to append the face property to.
    integer(kind=long_k), intent(in) :: faceId
    !> The property to attach
    integer, intent(in) :: prp
    !> The face desriptor to update.
    type(tem_face_descriptor_type), intent(inout) :: faces
    !> Attach the property to the left or right property of the face.
    integer, intent(in) :: prp_dir
    ! --------------------------------------------------------------------------
    integer :: facePos, currentPrp, newPrp
    ! --------------------------------------------------------------------------

    ! Check if the face element exists and attach the property.
    facePos = PositionOfVal( faces%faceList%faceId, faceId )

    ! If the element is found: Check if the element has already the
    ! property we want to attach to it. If not, add it.
    if(facePos.gt.0) then

      ! Get the current face propery.
      if( prp_dir .eq. tem_left ) then
        currentPrp = faces%faceList%leftPrp%val(facePos)
      else
        currentPrp = faces%faceList%rightPrp%val(facePos)
      end if

      ! Melt the property we want to attach with the current one.
      newPrp = tem_melt_facePrp(currentPrp, prp)

      ! Set the melted face propery.
      if( prp_dir .eq. tem_left ) then
        faces%faceList%leftPrp%val(facePos) = newPrp
      else
        faces%faceList%rightPrp%val(facePos) = newPrp
      end if

    end if

  end subroutine tem_appendFace_prp