changeType_element_vec Subroutine

private subroutine changeType_element_vec(me, nElems, elemPos, new_eType)

Arguments

Type IntentOptional Attributes Name
type(tem_element_type), intent(inout) :: me
integer, intent(in) :: nElems
integer, intent(in) :: elemPos(:)
integer, intent(in) :: new_eType

Calls

proc~~changetype_element_vec~~CallsGraph proc~changetype_element_vec changeType_element_vec proc~tem_etypeisvalid tem_eTypeIsValid proc~changetype_element_vec->proc~tem_etypeisvalid

Called by

proc~~changetype_element_vec~~CalledByGraph proc~changetype_element_vec changeType_element_vec interface~changetype changeType interface~changetype->proc~changetype_element_vec proc~communicate_elements communicate_elements proc~communicate_elements->interface~changetype proc~identify_lists identify_lists proc~communicate_elements->proc~identify_lists proc~redefine_halos redefine_halos proc~communicate_elements->proc~redefine_halos proc~identify_lists->interface~changetype proc~redefine_halos->interface~changetype proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~communicate_elements proc~tem_find_allelements->proc~identify_lists proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements

Source Code

  subroutine changeType_element_vec( me, nElems, elemPos, new_eType )
    ! ---------------------------------------------------------------------------
    type(tem_element_type), intent(inout) :: me
    integer, intent(in) :: nElems
    integer, intent(in) :: elemPos(:)
    integer, intent(in) :: new_eType
    ! ---------------------------------------------------------------------------
    integer :: old_eType, iElem
    ! ---------------------------------------------------------------------------

    if ( tem_eTypeIsValid(new_eType) ) then
      do iElem = 1, nElems
        old_eType = me%eType%val( elemPos(iElem) )
        me%eType%val( elemPos(iElem) ) = new_eType
        me%nElems(new_eType) = me%nElems(new_eType) + 1
        me%nElems(old_eType) = me%nElems(old_eType) - 1
      end do
    end if

  end subroutine changeType_element_vec