59int main(
int argc,
char *argv[])
67 MPI_Init(&argc,&argv);
70 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
83 if (argc>1)
if (argv[1][0]==
'-' && argv[1][1]==
'v') verbose =
true;
85 int verbose_int = verbose ? 1 : 0;
87 verbose = verbose_int==1 ? true :
false;
96 int MyPID = Comm.
MyPID();
99 if(verbose && MyPID==0)
102 if (verbose) cout <<
"Processor "<<MyPID<<
" of "<< NumProc
103 <<
" is alive."<<endl;
108 if(verbose && rank!=0) verbose =
false;
110 int NumMyEquations = 1;
111 long long NumGlobalEquations = NumProc;
114 long long* MyGlobalElementsLL =
new long long[NumMyEquations];
116 MyGlobalElementsLL[0] = 2000000000+MyPID;
120 Epetra_Map MapLL(NumGlobalEquations, NumMyEquations, MyGlobalElementsLL, 0, Comm);
128 int* NumNzLL =
new int[NumMyEquations];
132 int* MyIntGlobalElementsLL =
new int[NumMyEquations];
133 MyIntGlobalElementsLL[0] = 20000+MyPID;
142#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
159 int* MyGlobalElementsInt =
new int[NumMyEquations];
161 MyGlobalElementsInt[0] = 2000+MyPID;
166 int* NumNzInt =
new int[NumMyEquations];
170 long long* MyLLGlobalElementsInt =
new long long[NumMyEquations];
171 MyLLGlobalElementsInt[0] = 2000000000+MyPID;
173#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
176 Epetra_Map MapInt(NumGlobalEquations, NumMyEquations, MyGlobalElementsInt, 0LL, Comm);
199 delete [] MyGlobalElementsLL;
201 delete [] MyIntGlobalElementsLL;
202 delete [] MyGlobalElementsInt;
204 delete [] MyLLGlobalElementsInt;
virtual int InsertGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
Insert a list of elements in a given global row of the matrix.
int main(int argc, char *argv[])