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);
#define EPETRA_TEST_ERR(a, b)
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
static void SetTracebackMode(int TracebackModeValue)
Set the value of the Epetra_Object error traceback report mode.
int ExtractView(int **A, int *MyLDA) const
Set user-provided addresses of A and MyLDA.
Epetra_IntMultiVector: A class for constructing and using dense multi-vectors, vectors and matrices i...
int MyPID() const
Return my process ID.
Epetra_MpiComm: The Epetra MPI Communication Class.
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 NumMyElements() const
Number of elements on the calling processor.
int GID(int LID) const
Returns global ID of local ID, return IndexBase-1 if not found on this processor. ...
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int NumProc() const
Returns total number of processes (always returns 1 for SerialComm).
Epetra_SerialComm: The Epetra Serial Communication Class.
int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const
Epetra_SerialComm Global Max function.
int SumIntoGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Adds OrdinalValue to existing value at the specified (GlobalRow, VectorIndex) location.
int main(int argc, char *argv[])
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.