00001 #include "Ifpack_ConfigDefs.h"
00002 #ifdef HAVE_IFPACK_TEUCHOS
00003 #include "Ifpack_Partitioner.h"
00004 #include "Ifpack_OverlappingPartitioner.h"
00005 #include "Ifpack_LinearPartitioner.h"
00006 #include "Epetra_CrsGraph.h"
00007
00008
00009 int Ifpack_LinearPartitioner::ComputePartitions()
00010 {
00011
00012 int mod = NumMyRows() / NumLocalParts_;
00013 for (int i = 0 ; i < NumMyRows() ; ++i) {
00014 Partition_[i] = i / mod;
00015 if (Partition_[i] >= NumLocalParts_)
00016 Partition_[i] = NumLocalParts_ - 1;
00017 }
00018
00019 return(0);
00020 }
00021 #endif // HAVE_IFPACK_TEUCHOS