#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_Vector.h"
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#else
#endif
int NumLocalElements = 10;
double* values; values = new double[NumLocalElements];
for( int i=0 ;i<NumLocalElements ; i++ )
values[i] = 1.0*i;
values[0] = 123;
cout << x;
double* values2; values2 = new double[NumLocalElements];
for( int i=0 ;i<NumLocalElements ; i++ )
values2[i] = -1.0*i;
x.ResetView( values2 );
cout << x;
delete[] values;
delete[] values2;
#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