281 int NumMyRows = fullMatrix->NumMyRows();
282 int NumMyCols = fullMatrix->NumMyCols();
291 for (
int i=0; i<NumMyRows; i++) {
294 for (
int j=0; j<NumIndices; j++) {
295 int ColumnIndex = Indices[j];
296 ColProfiles[ColumnIndex]++;
299 RowIDs[ColumnIndex] = i;
304 ColHasRowWithSingleton[j2]++;
306 colMapColors[j2] = 1;
324 if (fullMatrix->RowMatrixImporter()!=0) {
327 EPETRA_CHK_ERR(tmpVec.Export(ColProfiles, *fullMatrix->RowMatrixImporter(),
Add));
331 EPETRA_CHK_ERR(tmpVec.Export(ColHasRowWithSingleton, *fullMatrix->RowMatrixImporter(),
Add));
332 EPETRA_CHK_ERR(ColHasRowWithSingleton.Import(tmpVec, *fullMatrix->RowMatrixImporter(),
Insert));
339 if (ColHasRowWithSingleton.MaxValue()>1) {
344 RowHasColWithSingleton.PutValue(0);
348 for (
int j=0; j<NumMyCols; j++) {
351 if (ColProfiles[j]==1 ) {
355 if (rowMapColors[i2]!=1) {
356 RowHasColWithSingleton[i2]++;
357 rowMapColors[i2] = 2;
364 for (
int jj=0; jj<NumIndices; jj++) {
365 NewColProfiles[Indices[jj]]--;
370 else if (ColHasRowWithSingleton[j]==1 && rowMapColors[i2]!=1) {
374 if (RowHasColWithSingleton.MaxValue()>1) {
380 ColHasRowWithSingleton));
382 for (
int i=0; i<NumMyRows; i++) {
383 if (rowMapColors[i]==2) rowMapColors[i] = 1;
467 int ColSingletonCounter = 0;
468 for (i=0; i<NumMyRows; i++) {
486 double pivot = Values[0];
488 int indX = Indices[0];
489 for (j=0; j<NumVectors; j++)
496 for (j=0; j<NumEntries; j++) {
497 if (Indices[j]==targetCol) {
498 double pivot = Values[j];
502 ColSingletonCounter++;
520 FullLHS->PutScalar(0.0);
612 int ColSingletonCounter = 0;
613 for (i=0; i<NumMyRows; i++) {
631 double pivot = Values[0];
633 int indX = Indices[0];
634 for (j=0; j<NumVectors; j++)
641 double pivot = Values[j];
644 ColSingletonCounter++;
655 FullLHS->PutScalar(0.0);
713 int_type IndexBase = (int_type) SourceMap->
IndexBase64();
722 Epetra_Map ContiguousTargetMap((int_type) -1, TargetNumMyElements, IndexBase,Comm);
725 Epetra_Map ContiguousSourceMap((int_type) -1, SourceNumMyElements, IndexBase, Comm);
727 assert(ContiguousSourceMap.NumGlobalElements64()==ContiguousTargetMap.NumGlobalElements64());
730 int_type* SourceMapMyGlobalElements = 0;
735 Epetra_Export Exporter(ContiguousSourceMap, ContiguousTargetMap);
739 TargetIndices.Export(SourceIndices, Exporter,
Insert);
743 RedistributeMap =
new Epetra_Map((int_type) -1, TargetNumMyElements, TargetIndices.Values(), IndexBase, Comm);
746 RedistributeExporter =
new Epetra_Export(*SourceMap, *RedistributeMap);
void Sort(bool SortAscending, int NumKeys, T *Keys, int NumDoubleCompanions, double **DoubleCompanions, int NumIntCompanions, int **IntCompanions, int NumLongLongCompanions, long long **LongLongCompanions)