Update the position of the elements inside the buffers from the original tID list to the later totalList
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_communication_type), | intent(inout) | :: | buffer |
communication buffer |
||
type(tem_levelDesc_type), | intent(in) | :: | levelDesc |
levelDesc to be used |
||
integer, | intent(out) | :: | iError |
return encountered error |
subroutine update_buffer_elemPos( buffer, levelDesc, iError ) ! --------------------------------------------------------------------------- !> communication buffer type(tem_communication_type), intent(inout) :: buffer !> levelDesc to be used type(tem_levelDesc_type), intent(in) :: levelDesc !> return encountered error integer, intent(out) :: iError ! --------------------------------------------------------------------------- integer :: iElem, iProc, elemPos, iVal ! --------------------------------------------------------------------------- iError = 0 do iProc = 1, buffer%nProcs do iElem = 1, buffer%elemPos( iProc )%nVals elemPos = buffer%elemPos( iProc )%val( iElem ) ! replace buffer elemPos from levelDesc%elem%tID list to ! levelDesc%total list buffer%elemPos( iProc )%val( iElem ) = & & tem_treeIDinTotal( tID = levelDesc%elem%tID%val( elemPos ),& & eType = levelDesc%elem%eType%val(elemPos),& & levelDesc = levelDesc ) if( buffer%elemPos( iProc )%val( iElem ) < 1 ) then write(dbgUnit(2),*) ' tID ', levelDesc%elem%tID%val(elemPos), & & ' in buffer not found' iError = iProc*10000000+iElem do iVal = 1, levelDesc%elem%tID%nVals if( levelDesc%elem%tID%val( iVal ) == levelDesc%elem%tID% & & val( elemPos )) then write(dbgUnit(2),*)'found at', iVal end if end do do iVal = 1, size(levelDesc%total) if( levelDesc%total( iVal ) == levelDesc%elem%tID%val( elemPos )) & & write(dbgUnit(2),*) 'found in total at', iVal end do end if ! if elemPos < 1 end do !iElem end do !iProc end subroutine update_buffer_elemPos