[Trilinos-Users] Epetra_BasicDirectory :: RemoteIDList() not able to manage repeated GIDs (bug?)

Andreas Zilian a.zilian at tu-bs.de
Sun Dec 20 08:15:08 MST 2009


Dear all,

I found the method Epetra_BasicDirectory::RemoteIDList() not able to  
handle multiple occurrence of an GID in the list of GIDs given to the  
method, e.g. int gid[6] = { 1,2,2,3,4,3 }.
The list of LIDs and PROCs then contains undetermined, incorrect  
entries.

Since I need correct behavior of this method in Epetra_BlockMap, I  
propose the following modifications in Epetra_BasicDirectory.cpp  
(lines 604-612):


   for( int i = 0, last_j = -99, rep = 0; i < NumRecv; i++, last_j =  
j ) {
     curr_LID = *ptr++;
     j = Epetra_Util_binary_search(curr_LID, sortedGE, NumEntries,  
insertPoint);
     if (j > -1) { (last_j == j) ? rep++ : rep = 0;
       Procs[offsets[j+rep]] = *ptr++;
       if (DoLIDs) LocalEntries[offsets[j+rep]] = *ptr++;
       if (DoSizes) EntrySizes[offsets[j+rep]] = *ptr++;
     }
   }


If acceptable, it would be great if this could be included in a later  
revision of Trilinos.

Thank you very much,

	Andreas




More information about the Trilinos-Users mailing list