#include "Didasko_ConfigDefs.h"
#if defined(HAVE_DIDASKO_EPETRA)
#include "Epetra_ConfigDefs.h"
#ifdef HAVE_MPI
#include "mpi.h"
#include "Epetra_MpiComm.h"
#else
#include "Epetra_SerialComm.h"
#endif
#include "Epetra_Map.h"
#include "Epetra_MultiVector.h"
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#else
#endif
int NumElements = 10;
int MyLength = x.MyLength();
for( int c=0 ; c<x.NumVectors() ; ++c )
for( int i=0 ; i<MyLength ; ++i ) x[c][i] = 1.0*i+1000*c;
double ** pointer;
x.ExtractView( &pointer );
for( int c=0 ; c<x.NumVectors() ;++c )
for( int i=0 ; i<MyLength ; ++i )
cout <<
"on proc " << Comm.
MyPID() <<
", x["
<< i << "] = " << pointer[c][i] << endl;
for( int c=0 ; c<x.NumVectors() ;++c )
for( int i=0 ; i<MyLength ; ++i )
pointer[c][i] *= 10;
cout << x;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return(0);
}
#else
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("Please configure Didasko with:\n"
"--enable-epetra");
return 0;
}
#endif