55 #include "../epetra_test_err.h" 58 int main(
int argc,
char *argv[]) {
67 MPI_Init(&argc,&argv);
70 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
84 if(argv[1][0]==
'-' && argv[1][1]==
'v') {
90 int MyPID = Comm.
MyPID();
93 if(verbose && MyPID==0)
96 if(verbose) cout <<
"Processor " << MyPID <<
" of " << NumProc <<
" is alive." << endl;
99 if(verbose && rank != 0)
102 int NumMyEquations = 6;
103 int NumGlobalEquations = NumMyEquations*NumProc+
EPETRA_MIN(NumProc,3);
116 const int numVecs = 3;
123 Comm.
MaxAll(&ierr, &global_ierr, 1);
125 for(
int i = 0; i < myIMV.
MyLength(); ++i) {
126 for(
int j = 0; j < numVecs; ++j) {
127 myVals[j*myLDA + i] = numVecs*i + j;
133 ierr = (myIMV[2][3] == 42 ? 0 : 1);
134 Comm.
MaxAll(&ierr, &global_ierr, 1);
139 ierr = (myIMV[1][3] == 3*numVecs + 1 + 42 ? 0 : 1);
140 Comm.
MaxAll(&ierr, &global_ierr, 1);
146 ierr = (myIMV[2][3] == 48 ? 0 : 1);
149 ierr = (myIMV[1][3] == 3*numVecs + 1 + 42 + 48 ? 0 : 1);
152 Comm.
MaxAll(&ierr, &global_ierr, 1);
156 Epetra_BlockMap Map0(NumGlobalEquations, (MyPID == 0 ? NumGlobalEquations : 0), 1, 0, Comm);
161 Comm.
MaxAll(&ierr, &global_ierr, 1);
165 ierr = (myIMV0[1][ 3] == 3*numVecs + 1 + 42 ? 0 : 1);
167 ierr = (myIMV0[1][10] == 3*numVecs + 1 + 42 ? 0 : 1);
169 ierr = (myIMV0[1][17] == 3*numVecs + 1 + 42 + 48 ? 0 : 1);
171 ierr = (myIMV0[1][24] == 3*numVecs + 1 + 42 ? 0 : 1);
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
int main(int argc, char *argv[])
#define EPETRA_TEST_ERR(a, b)
static void SetTracebackMode(int TracebackModeValue)
Set the value of the Epetra_Object error traceback report mode.
Epetra_IntMultiVector: A class for constructing and using dense multi-vectors, vectors and matrices i...
Epetra_MpiComm: The Epetra MPI Communication Class.
int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const
Epetra_SerialComm Global Max function.
std::string Epetra_Version()
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
int ReplaceGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Replace current value at the specified (GlobalRow, VectorIndex) location with OrdinalValue.
Epetra_Combine Mode enumerable type.
int NumProc() const
Returns total number of processes (always returns 1 for SerialComm).
int ExtractView(int **A, int *MyLDA) const
Set user-provided addresses of A and MyLDA.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
int NumMyElements() const
Number of elements on the calling processor.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_SerialComm: The Epetra Serial Communication Class.
int MyPID() const
Return my process ID.
int SumIntoGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Adds OrdinalValue to existing value at the specified (GlobalRow, VectorIndex) location.
int SumIntoMyValue(int MyRow, int VectorIndex, int OrdinalValue)
Adds OrdinalValue to existing value at the specified (MyRow, VectorIndex) location.
int ReplaceMyValue(int MyRow, int VectorIndex, int OrdinalValue)
Replace current value at the specified (MyRow, VectorIndex) location with OrdinalValue.
int Import(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
Imports an Epetra_DistObject using the Epetra_Import object.
int GID(int LID) const
Returns global ID of local ID, return IndexBase-1 if not found on this processor. ...