60 if (verbose) cout <<
"\n\nXXXXX Testing Post-construction modification of a multivector"
69 int testVecIndex = NumVectors/2;
73 int FirstEntryOfGID = 0;
75 if (Map.
MyGID(testGID)) {
76 LIDOfGID = Map.
LID(testGID);
89 if (Map.
MyGID(testGID)) {
90 if (X[testVecIndex][FirstEntryOfGID]!=newGIDValue) err++;
91 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID<<
"] = "
92 << X[testVecIndex][FirstEntryOfGID]
93 <<
" should = " << newGIDValue << endl;
104 if (Map.
MyGID(testGID)) {
105 if (X[testVecIndex][FirstEntryOfGID+GIDSize-1]!=newGIDValue) err++;
106 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID+GIDSize-1<<
"] = "
107 << X[testVecIndex][FirstEntryOfGID+GIDSize-1]
108 <<
" should = " << newGIDValue << endl;
111 if (locerr!=0) err++;
120 if (Map.
MyGID(testGID)) {
121 if (X[testVecIndex][FirstEntryOfGID]!=(newGIDValue+newGIDValue)) err++;
122 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID<<
"] = "
123 << X[testVecIndex][FirstEntryOfGID]
124 <<
" should = " << newGIDValue+newGIDValue << endl;
127 if (locerr!=0) err++;
137 if (Map.
MyGID(testGID)) {
138 if (X[testVecIndex][FirstEntryOfGID+GIDSize-1]!=(newGIDValue+newGIDValue)) err++;
139 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID+GIDSize-1<<
"] = "
140 << X[testVecIndex][FirstEntryOfGID+GIDSize-1]
141 <<
" should = " << newGIDValue+newGIDValue << endl;
144 if (locerr!=0) err++;
160 if (X[testVecIndex][FirstEntryOfLID]!=newLIDValue) err++;
161 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID<<
"] = "
162 << X[testVecIndex][FirstEntryOfLID]
163 <<
" should = " << newLIDValue << endl;
166 locerr = X.
ReplaceMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
167 if (X[testVecIndex][FirstEntryOfLID+LIDSize-1]!=newLIDValue) err++;
168 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID+LIDSize-1<<
"] = "
169 << X[testVecIndex][FirstEntryOfLID+LIDSize-1]
170 <<
" should = " << newLIDValue << endl;
174 if (X[testVecIndex][FirstEntryOfLID]!=(newLIDValue+newLIDValue)) err++;
175 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID<<
"] = "
176 << X[testVecIndex][FirstEntryOfLID]
177 <<
" should = " << newLIDValue+newLIDValue << endl;
179 locerr = X.
ReplaceMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
180 locerr = X.
SumIntoMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
181 if (X[testVecIndex][FirstEntryOfLID+LIDSize-1]!=(newLIDValue+newLIDValue)) err++;
182 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID+LIDSize-1<<
"] = "
183 << X[testVecIndex][FirstEntryOfLID+LIDSize-1]
184 <<
" should = " << newLIDValue+newLIDValue << endl;
int NumGlobalElements() const
Number of elements across all processors.
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
Epetra_IntMultiVector: A class for constructing and using dense multi-vectors, vectors and matrices i...
int ReplaceGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Replace current value at the specified (GlobalRow, VectorIndex) location with OrdinalValue.
Epetra_BLAS: The Epetra BLAS Wrapper Class.
int NumMyElements() const
Number of elements on the calling processor.
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
int IntMultiVectorTests(const Epetra_BlockMap &Map, int NumVectors, bool verbose)
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int LID(int GID) const
Returns local ID of global ID, return -1 if not found on this processor.
bool MyGID(int GID_in) const
Returns true if the GID passed in belongs to the calling processor in this map, otherwise returns fal...
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.