#include "Teuchos_StandardCatchMacros.hpp"
#include "Epetra_Map.h"
#include "Epetra_CrsMatrix.h"
#ifdef HAVE_MPI
#include "mpi.h"
#include "Epetra_MpiComm.h"
#endif
#ifndef __cplusplus
#define __cplusplus
#endif
#include "Epetra_Comm.h"
#include "Epetra_SerialComm.h"
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc,&argv);
#else
#endif
bool success = false;
try {
int i;
int ierr;
int dim = 100;
int blockSize = 5;
bool verbose = false;
if (argc>1) {
if (argv[1][0]=='-' && argv[1][1]=='v') {
verbose = true;
}
}
std::vector<int> MyGlobalElements(NumMyElements);
std::vector<int> NumNz(NumMyElements);
for (i=0; i<NumMyElements; i++) {
if (MyGlobalElements[i]==0 || MyGlobalElements[i] == dim-1) {
NumNz[i] = 2;
}
else {
NumNz[i] = 3;
}
}
std::vector<double> Values(2);
Values[0] = -1.0; Values[1] = -1.0;
std::vector<int> Indices(2);
double two = 2.0;
int NumEntries;
for (i=0; i<NumMyElements; i++) {
if (MyGlobalElements[i]==0) {
Indices[0] = 1;
NumEntries = 1;
}
else if (MyGlobalElements[i] == dim-1) {
Indices[0] = dim-2;
NumEntries = 1;
}
else {
Indices[0] = MyGlobalElements[i]-1;
Indices[1] = MyGlobalElements[i]+1;
NumEntries = 2;
}
assert(ierr==0);
assert(ierr==0);
}
assert(ierr==0);
ivec->Random();
if (verbose) {
}
ierr = Anasazi::TestMultiVecTraits<double,EMV>(MyOM,ivec);
success = (ierr == 0);
if (ierr) {
}
else {
MyOM->print(
Anasazi::Warnings,
"*** EpetraAdapter FAILED TestMultiVecTraits() ***\n\n");
}
ierr = Anasazi::TestOperatorTraits<double,EMV,EOP>(MyOM,ivec,op);
success &= (ierr == 0);
if (ierr) {
}
else {
MyOM->print(
Anasazi::Warnings,
"*** EpetraAdapter FAILED TestOperatorTraits() ***\n\n");
}
if (success)
else
}
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return ( success ? EXIT_SUCCESS : EXIT_FAILURE );
}