Attaches another property to a given face (from left or right). If the face does not exist this routine will not do anything.
Type | Intent | Optional | 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. |
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