57 double *residual =
new double[NumVectors];
83 double **App, **Bpp, **Cpp;
89 App =
new double *[NumVectors];
90 Bpp =
new double *[NumVectors];
91 Cpp =
new double *[NumVectors];
92 for (i=0; i<NumVectors; i++) App[i] =
new double[A.
MyLength()+i];
93 for (i=0; i<NumVectors; i++) Bpp[i] =
new double[B.
MyLength()+i];
94 for (i=0; i<NumVectors; i++) Cpp[i] =
new double[C.
MyLength()+i];
100 for (
int strided = 0; strided<2; strided++) {
103 for (i=0; i<4; i++) {
104 char transa =
'N';
if (i>1) transa =
'T';
105 char transb =
'N';
if (i%2!=0) transb =
'T';
106 double alpha = (double) i+1;
107 double beta = (double) (i/2);
109 int localierr =
BuildMatrixTests(C,transa, transb, alpha, A, B, beta, C_GEMM );
113 Ap = &A; Bp = &B; Cp = &C;
122 localierr = Cp->
Multiply(transa, transb, alpha, *Ap, *Bp, beta);
124 ierr += Cp->
Update(-1.0, C_GEMM, 1.0);
125 ierr += Cp->
Norm2(residual);
129 cout <<
"XXXXX Replicated Local MultiVector GEMM tests";
131 cout <<
" (Strided Multivectors)" << endl;
133 cout <<
" (Non-Strided Multivectors)" << endl;
134 cout <<
" alpha = " << alpha <<
", beta = " << beta <<
", transa = "<<transa
135 <<
", transb = " << transb;
137 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
143 for (i=0; i<NumVectors; i++)
172 int localierr = C.
Multiply(transa, transb, alpha, A, B, beta);
174 ierr += C.
Update(-1.0, C_GEMM, 1.0);
175 ierr += C.
Norm2(residual);
179 cout <<
"XXXXX Generalized 2D dot product via GEMM call " << endl;
180 cout <<
" alpha = " << alpha <<
", beta = " << beta <<
", transa = "<<transa
181 <<
", transb = " << transb;
183 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
202 char transb =
'N';
if (i>0) transb =
'T';
207 ierr += C.
Multiply(transa, transb, alpha, A, B, beta);
208 ierr += C.
Update(-1.0, C_GEMM, 1.0);
209 ierr += C.
Norm2(residual);
213 cout <<
"XXXXX Generalized 2D vector update via GEMM call " << endl;
214 cout <<
" alpha = " << alpha <<
", beta = " << beta <<
", transa = "<<transa
215 <<
", transb = " << transb;
217 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
229 int localLength = 10;
230 double *localMinValue =
new double[localLength];
231 double *localMaxValue =
new double[localLength];
232 double *localNorm1 =
new double[localLength];
233 double *localDot =
new double[localLength];
234 double *localNorm2 =
new double[localLength];
235 double *localMeanValue =
new double[localLength];
239 double doubleLocalLength = (double) localLength;
240 for (
int j=0; j< NumVectors; j++) {
241 for (i=0; i< localLength-1; i++) A[j][i] = (
double) (i+1);
242 A[j][localLength-1] = (double) (localLength+j);
243 localMinValue[j] = A[j][0];
244 localMaxValue[j] = A[j][localLength-1];
245 localNorm1[j] = (doubleLocalLength-1.0)*(doubleLocalLength)/2.0+A[j][localLength-1];
246 localDot[j] = (doubleLocalLength-1.0)*(doubleLocalLength)*(2.0*(doubleLocalLength-1.0)+1.0)/6.0+A[j][localLength-1]*A[j][localLength-1];
247 localNorm2[j] = std::sqrt(localDot[j]);
248 localMeanValue[j] = localNorm1[j]/doubleLocalLength;
251 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localMinValue[j]);
252 if (verbose) cout <<
"XXXXX MinValue" << endl;
253 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
256 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localMaxValue[j]);
257 if (verbose) cout <<
"XXXXX MaxValue" << endl;
258 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
260 ierr += A.
Norm1(residual);
261 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localNorm1[j]);
262 if (verbose) cout <<
"XXXXX Norm1" << endl;
263 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
265 ierr += A.
Dot(A,residual);
266 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localDot[j]);
267 if (verbose) cout <<
"XXXXX Dot" << endl;
268 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
270 ierr += A.
Norm2(residual);
271 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localNorm2[j]);
272 if (verbose) cout <<
"XXXXX Norm2" << endl;
273 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
276 for (
int j=0; j<NumVectors; j++) residual[j] = std::abs(residual[j] - localMeanValue[j]);
277 if (verbose) cout <<
"XXXXX MeanValue" << endl;
278 if (
BadResidual(verbose,residual, NumVectors))
return(-1);
280 delete [] localMinValue;
281 delete [] localMaxValue;
282 delete [] localNorm1;
284 delete [] localNorm2;
285 delete [] localMeanValue;
298 double *residual =
new double[NumVectors];
304 int MyPID = Comm.
MyPID();
318 double *dotvec_AB =
new double[NumVectors];
319 double *norm1_A =
new double[NumVectors];
320 double *norm2_sqrtA =
new double[NumVectors];
321 double *norminf_A =
new double[NumVectors];
322 double *normw_A =
new double[NumVectors];
323 double *minval_A =
new double[NumVectors];
324 double *maxval_A =
new double[NumVectors];
325 double *meanval_A =
new double[NumVectors];
333 C_plusB, dotvec_AB, norm1_A, norm2_sqrtA, norminf_A,
334 normw_A, Weights, minval_A, maxval_A, meanval_A);
337 if (verbose) cout <<
"XXXXX Testing alpha * A ";
344 if (err) ierr += err;
350 if (verbose) cout <<
"XXXXX Testing C = alpha * A + B ";
357 if (err) ierr += err;
363 if (verbose) cout <<
"XXXXX Testing C += B ";
370 if (err) ierr += err;
376 if (verbose) cout <<
"XXXXX Testing A.dotProd(B) ";
378 double *dotvec = residual;
380 BLAS.
AXPY(NumVectors,-1.0,dotvec_AB,dotvec);
382 if (err) ierr += err;
388 if (verbose) cout <<
"XXXXX Testing norm1_A ";
390 double *norm1 = residual;
392 BLAS.
AXPY(NumVectors,-1.0,norm1_A,norm1);
394 if (err) ierr += err;
400 if (verbose) cout <<
"XXXXX Testing norm2_sqrtA ";
402 double *norm2 = residual;
404 BLAS.
AXPY(NumVectors,-1.0,norm2_sqrtA,norm2);
406 if (err) ierr += err;
412 if (verbose) cout <<
"XXXXX Testing norminf_A ";
414 double *norminf = residual;
416 BLAS.
AXPY(NumVectors,-1.0,norminf_A,norminf);
418 if (err) ierr += err;
424 if (verbose) cout <<
"XXXXX Testing normw_A ";
426 double *normw = residual;
428 BLAS.
AXPY(NumVectors,-1.0,normw_A,normw);
430 if (err) ierr += err;
436 if (verbose) cout <<
"XXXXX Testing minval_A ";
438 double *minval = residual;
440 BLAS.
AXPY(NumVectors,-1.0,minval_A,minval);
442 if (err) ierr += err;
448 if (verbose) cout <<
"XXXXX Testing maxval_A ";
450 double *maxval = residual;
452 BLAS.
AXPY(NumVectors,-1.0,maxval_A,maxval);
454 if (err) ierr += err;
460 if (verbose) cout <<
"XXXXX Testing meanval_A ";
462 double *meanval = residual;
464 BLAS.
AXPY(NumVectors,-1.0,meanval_A,meanval);
466 if (err) ierr += err;
472 if (verbose) cout <<
"XXXXX Testing abs_A ";
479 if (err) ierr += err;
485 if (verbose) cout <<
"XXXXX Testing random_A (Test1) ";
495 if (err) ierr += err;
501 if (verbose) cout <<
"XXXXX Testing random_A (Test2) ";
505 int randvalsdiffer = 1;
506 for (i=0; i< NumVectors; i++)
507 for (
int j=i+1; j<NumVectors; j++)
508 if (Rand1_A[i][0]==Rand1_A[j][0]) randvalsdiffer = 0;
510 Comm.
MinAll(&randvalsdiffer, &allrandvals, 1);
514 Comm.
MinAll(&locerr, &err, 1);
518 cout <<
"\t Checked OK" << endl;
520 cout <<
"\t Checked Failed" << endl;
524 if (verbose) cout <<
"XXXXX Testing random_A (Test3) ";
533 if (MyPID==0) itmp = nproc;
534 Epetra_Map AllrandstartsMap(nproc, itmp, 0, Comm);
537 for (i=0; i< NumVectors; i++) Randstarts[i][0] = Rand1_A[i][0];
546 for (i=0; i< NumVectors; i++)
547 for (
int irand=0; irand<nproc; irand++)
548 for (
int jrand=irand+1; jrand<nproc; jrand++)
549 if (Allrandstarts[i][irand]==Allrandstarts[i][jrand]) randvalsdiffer = 0;
552 Comm.
MinAll(&randvalsdiffer, &allrandvals, 1);
556 Comm.
MinAll(&locerr, &err, 1);
559 cout <<
"\t Checked OK" << endl;
561 cout <<
"\t Checked Failed" << endl;
569 delete [] norm2_sqrtA;
581 if (verbose) cout <<
"\n\nXXXXX Testing Post-construction modification of a multivector"
591 int testVecIndex = NumVectors/2;
595 int FirstEntryOfGID = 0;
597 if (Map.
MyGID(testGID)) {
598 LIDOfGID = Map.
LID(testGID);
607 double newGIDValue = 4.0;
610 if (Map.
MyGID(testGID)) {
611 if (X[testVecIndex][FirstEntryOfGID]!=newGIDValue) err++;
612 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID<<
"] = "
613 << X[testVecIndex][FirstEntryOfGID]
614 <<
" should = " << newGIDValue << endl;
617 if (locerr!=1) err++;
625 if (Map.
MyGID(testGID)) {
626 if (X[testVecIndex][FirstEntryOfGID+GIDSize-1]!=newGIDValue) err++;
627 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID+GIDSize-1<<
"] = "
628 << X[testVecIndex][FirstEntryOfGID+GIDSize-1]
629 <<
" should = " << newGIDValue << endl;
632 if (locerr!=1) err++;
641 if (Map.
MyGID(testGID)) {
642 if (X[testVecIndex][FirstEntryOfGID]!=(newGIDValue+newGIDValue)) err++;
643 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID<<
"] = "
644 << X[testVecIndex][FirstEntryOfGID]
645 <<
" should = " << newGIDValue << endl;
648 if (locerr!=1) err++;
658 if (Map.
MyGID(testGID)) {
659 if (X[testVecIndex][FirstEntryOfGID+GIDSize-1]!=(newGIDValue+newGIDValue)) err++;
660 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfGID+GIDSize-1<<
"] = "
661 << X[testVecIndex][FirstEntryOfGID+GIDSize-1]
662 <<
" should = " << newGIDValue << endl;
665 if (locerr!=1) err++;
678 double newLIDValue = 4.0;
681 if (X[testVecIndex][FirstEntryOfLID]!=newLIDValue) err++;
682 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID<<
"] = "
683 << X[testVecIndex][FirstEntryOfLID]
684 <<
" should = " << newLIDValue << endl;
687 locerr = X.
ReplaceMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
688 if (X[testVecIndex][FirstEntryOfLID+LIDSize-1]!=newLIDValue) err++;
689 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID+LIDSize-1<<
"] = "
690 << X[testVecIndex][FirstEntryOfLID+LIDSize-1]
691 <<
" should = " << newLIDValue << endl;
695 if (X[testVecIndex][FirstEntryOfLID]!=(newLIDValue+newLIDValue)) err++;
696 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID<<
"] = "
697 << X[testVecIndex][FirstEntryOfLID]
698 <<
" should = " << newLIDValue << endl;
700 locerr = X.
ReplaceMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
701 locerr = X.
SumIntoMyValue(testLID, LIDSize-1, testVecIndex, newLIDValue);
702 if (verbose) cout <<
"X["<<testVecIndex<<
"]["<<FirstEntryOfLID+LIDSize-1<<
"] = "
703 << X[testVecIndex][FirstEntryOfLID+LIDSize-1]
704 <<
" should = " << newLIDValue << endl;
705 if (X[testVecIndex][FirstEntryOfLID+LIDSize-1]!=(newLIDValue+newLIDValue)) err++;
714 if (verbose) cout <<
"\n\nXXXXX Testing Post-construction modification of a vector"
720 double * VecValues =
new double[NumEntries];
721 int * VecGIDs =
new int[NumEntries];
722 VecGIDs[0] = testGID;
723 VecGIDs[1] = testGID+1;
729 VecValues[0] = 2.0; VecValues[1] = 4.0;
732 for (i=0; i<NumEntries; i++) {
733 testGID = VecGIDs[i];
734 if (Map.
MyGID(testGID)) {
735 LIDOfGID = Map.
LID(testGID);
738 if ((*x)[FirstEntryOfGID]!=VecValues[i]) err++;
739 if (verbose) cout <<
"x["<<FirstEntryOfGID<<
"] = "
740 << (*x)[FirstEntryOfGID]
741 <<
" should = " << VecValues[i] << endl;
744 if (locerr!=1) err++;
752 VecValues[0] = 4.0; VecValues[1] = 8.0;
755 for (i=0; i<NumEntries; i++) {
756 testGID = VecGIDs[i];
757 if (Map.
MyGID(testGID)) {
758 LIDOfGID = Map.
LID(testGID);
760 if ((*x)[FirstEntryOfGID+GIDSize-1]!=VecValues[i]) err++;
761 if (verbose) cout <<
"x["<<FirstEntryOfGID+GIDSize-1<<
"] = "
762 << (*x)[FirstEntryOfGID+GIDSize-1]
763 <<
" should = " << VecValues[i] << endl;
766 if (locerr!=1) err++;
773 VecValues[0] = 1.0; VecValues[1] = 2.0;
777 for (i=0; i<NumEntries; i++) {
778 testGID = VecGIDs[i];
779 if (Map.
MyGID(testGID)) {
780 LIDOfGID = Map.
LID(testGID);
782 if ((*x)[FirstEntryOfGID]!=(VecValues[i]+VecValues[i])) err++;
783 if (verbose) cout <<
"x["<<FirstEntryOfGID<<
"] = "
784 << (*x)[FirstEntryOfGID]
785 <<
" should = " << (VecValues[i]+VecValues[i]) << endl;
788 if (locerr!=1) err++;
794 VecValues[0] = 1.0; VecValues[1] = 2.0;
798 for (i=0; i<NumEntries; i++) {
799 testGID = VecGIDs[i];
800 if (Map.
MyGID(testGID)) {
801 LIDOfGID = Map.
LID(testGID);
803 if ((*x)[FirstEntryOfGID+GIDSize-1]!=(VecValues[i]+VecValues[i])) err++;
804 if (verbose) cout <<
"x["<<FirstEntryOfGID+GIDSize-1<<
"] = "
805 << (*x)[FirstEntryOfGID+GIDSize-1]
806 <<
" should = " << (VecValues[i]+VecValues[i]) << endl;
809 if (locerr!=1) err++;
815 int * VecLIDs =
new int[NumEntries];
816 VecLIDs[0] = testLID;
817 VecLIDs[1] = testLID+1;
819 VecValues[0] = 2.0; VecValues[1] = 4.0;
822 for (i=0; i<NumEntries; i++) {
823 testLID = VecLIDs[i];
826 if ((*x)[FirstEntryOfLID]!=VecValues[i]) err++;
827 if (verbose) cout <<
"x["<<FirstEntryOfLID<<
"] = "
828 << (*x)[FirstEntryOfLID]
829 <<
" should = " << VecValues[i] << endl;
832 VecValues[0] = 4.0; VecValues[1] = 8.0;
833 locerr = x->
ReplaceMyValues(NumEntries, LIDSize-1, VecValues, VecLIDs);
835 for (i=0; i<NumEntries; i++) {
836 testLID = VecLIDs[i];
839 if ((*x)[FirstEntryOfLID+LIDSize-1]!=VecValues[i]) err++;
840 if (verbose) cout <<
"x["<<FirstEntryOfLID+LIDSize-1<<
"] = "
841 << (*x)[FirstEntryOfLID+LIDSize-1]
842 <<
" should = " << VecValues[i] << endl;
845 VecValues[0] = 1.0; VecValues[1] = 1.0;
849 for (i=0; i<NumEntries; i++) {
850 testLID = VecLIDs[i];
853 if ((*x)[FirstEntryOfLID]!=(VecValues[i]+VecValues[i])) err++;
854 if (verbose) cout <<
"x["<<FirstEntryOfLID<<
"] = "
855 << (*x)[FirstEntryOfLID]
856 <<
" should = " << (VecValues[i]+VecValues[i]) << endl;
859 VecValues[0] = 2.0; VecValues[1] = 4.0;
860 locerr = x->
ReplaceMyValues(NumEntries, LIDSize-1, VecValues, VecLIDs);
861 locerr = x->
SumIntoMyValues(NumEntries, LIDSize-1, VecValues, VecLIDs);
863 for (i=0; i<NumEntries; i++) {
864 testLID = VecLIDs[i];
867 if ((*x)[FirstEntryOfLID+LIDSize-1]!=(VecValues[i]+VecValues[i])) err++;
868 if (verbose) cout <<
"x["<<FirstEntryOfLID+LIDSize-1<<
"] = "
869 << (*x)[FirstEntryOfLID+LIDSize-1]
870 <<
" should = " << (VecValues[i]+VecValues[i]) << endl;
882 double threshold = 5.0E-6;
884 for (
int i=0; i<NumVectors; i++) {
885 if (Residual[i]>threshold) {
887 if (verbose) cout << endl <<
" Residual[" << i <<
"] = " << Residual[i];
891 if (ierr==0) cout <<
"\t Checked OK" << endl;
899 double threshold = 5.0E-6;
901 for (
int i=0; i<NumVectors; i++) {
902 if (Residual[i]<threshold) {
904 if (verbose) cout << endl <<
" Residual[" << i <<
"] = " << Residual[i] <<
" Should be larger";
908 if (ierr==0) cout <<
"\t Checked OK" << endl;
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
int NumGlobalElements() const
Number of elements across all processors.
Epetra_Map: A class for partitioning vectors and matrices.
int Abs(const Epetra_MultiVector &A)
Puts element-wise absolute values of input Multi-vector in target.
int Random()
Set multi-vector values to random numbers.
int ReplaceMyValue(int MyRow, int VectorIndex, double ScalarValue)
Replace current value at the specified (MyRow, VectorIndex) location with ScalarValue.
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
void AXPY(const int N, const float ALPHA, const float *X, float *Y, const int INCX=1, const int INCY=1) const
Epetra_BLAS vector update function (SAXPY)
int MaxValue(double *Result) const
Compute maximum value of each vector in multi-vector.
int SumIntoGlobalValues(int NumEntries, const double *Values, const int *Indices)
Sum values into a vector with a given indexed list of values, indices are in global index space...
#define EPETRA_TEST_ERR(a, b)
int NormWeighted(const Epetra_MultiVector &Weights, double *Result) const
Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
int MatrixTests(const Epetra_BlockMap &Map, const Epetra_LocalMap &LocalMap, int NumVectors, bool verbose)
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
Epetra_Comm Global Min function.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
int ExtractCopy(double *A, int MyLDA) const
Put multi-vector values into user-provided two-dimensional array.
virtual int MyPID() const =0
Return my process ID.
int BuildMatrixTests(Epetra_MultiVector &C, const char TransA, const char TransB, const double alpha, Epetra_MultiVector &A, Epetra_MultiVector &B, const double beta, Epetra_MultiVector &C_GEMM)
int BadResidual1(bool verbose, double *Residual, int NumVectors)
int Dot(const Epetra_MultiVector &A, double *Result) const
Computes dot product of each corresponding pair of vectors.
int ReplaceMyValues(int NumEntries, const double *Values, const int *Indices)
Replace values in a vector with a given indexed list of values, indices are in local index space...
int ReplaceGlobalValues(int NumEntries, const double *Values, const int *Indices)
Replace values in a vector with a given indexed list of values, indices are in global index space...
int SumIntoGlobalValue(int GlobalRow, int VectorIndex, double ScalarValue)
Adds ScalarValue to existing value at the specified (GlobalRow, VectorIndex) location.
Epetra_BLAS: The Epetra BLAS Wrapper Class.
int NumMyElements() const
Number of elements on the calling processor.
int MultiVectorTests(const Epetra_Map &Map, int NumVectors, bool verbose)
int Scale(double ScalarValue)
Scale the current values of a multi-vector, this = ScalarValue*this.
bool Residual(int N, int NRHS, double *A, int LDA, bool Transpose, double *X, int LDX, double *B, int LDB, double *resid)
Epetra_Comm: The Epetra Communication Abstract Base Class.
int SumIntoMyValues(int NumEntries, const double *Values, const int *Indices)
Sum values into a vector with a given indexed list of values, indices are in local index space...
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
int NormInf(double *Result) const
Compute Inf-norm of each vector in multi-vector.
int ReplaceGlobalValue(int GlobalRow, int VectorIndex, double ScalarValue)
Replace current value at the specified (GlobalRow, VectorIndex) location with ScalarValue.
int SumIntoMyValue(int MyRow, int VectorIndex, double ScalarValue)
Adds ScalarValue to existing value at the specified (MyRow, VectorIndex) location.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int MeanValue(double *Result) const
Compute mean (average) value of each vector in multi-vector.
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 MinValue(double *Result) const
Compute minimum value of each vector in multi-vector.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
int Update(double ScalarA, const Epetra_MultiVector &A, double ScalarThis)
Update multi-vector values with scaled values of A, this = ScalarThis*this + ScalarA*A.
int Norm1(double *Result) const
Compute 1-norm of each vector in multi-vector.
int Multiply(char TransA, char TransB, double ScalarAB, const Epetra_MultiVector &A, const Epetra_MultiVector &B, double ScalarThis)
Matrix-Matrix multiplication, this = ScalarThis*this + ScalarAB*A*B.
virtual int NumProc() const =0
Returns total number of processes.
int Norm2(double *Result) const
Compute 2-norm of each vector in multi-vector.
int BuildMultiVectorTests(Epetra_MultiVector &C, const double alpha, Epetra_MultiVector &A, Epetra_MultiVector &sqrtA, Epetra_MultiVector &B, Epetra_MultiVector &C_alphaA, Epetra_MultiVector &C_alphaAplusB, Epetra_MultiVector &C_plusB, double *const dotvec_AB, double *const norm1_A, double *const norm2_sqrtA, double *const norminf_A, double *const normw_A, Epetra_MultiVector &Weights, double *const minval_A, double *const maxval_A, double *const meanval_A)
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.
Epetra_LocalMap: A class for replicating vectors and matrices across multiple processors.
int BadResidual(bool verbose, double *Residual, int NumVectors)