#include "Didasko_ConfigDefs.h"
#ifdef 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"
#include "Epetra_FECrsMatrix.h"
int main(int argc, char *argv[]) {
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#else
#endif
int NumGlobalElements = 10;
if( Comm.
MyPID() == 0 ) {
for( int i=0 ; i<NumGlobalElements ; ++i ) {
int index = i;
double value = 1.0*i;
A.InsertGlobalValues(1,&index,&value);
}
}
A.GlobalAssemble();
cout << A;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return(EXIT_SUCCESS);
}
#else
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_MPI
#include "mpi.h"
#endif
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc,&argv);
#endif
puts("Please configure Didasko with:\n"
"--enable-epetra");
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return 0;
}
#endif