15 #include "Galeri_Maps.h"
16 #include "Galeri_CrsMatrices.h"
17 #include "Galeri_Utils.h"
23 using namespace Galeri;
32 std::vector<int> vec(4);
33 int data[] = {0, 1 , 3 , 4};
36 vec[i] = 6*Comm.
MyPID()+data[i];
46 double values[] = {-1,2,-1};
52 for(
int i=0;i<4;i++) {
54 ind[0] = map.
GID(i-1);
56 ind[2] = map.
GID(i+1);
76 int main(
int argc,
char *argv[])
79 MPI_Init(&argc, &argv);
95 Matrix->
Apply(x_exact,b);
105 List.
set(
"Reindex",
true);
112 double norm = ComputeNorm(&*Matrix, &x_exact, &b);
113 if (Comm.
MyPID() == 0)
114 std::cout <<
"norm = " << norm << std::endl;
123 return(EXIT_SUCCESS);
Amesos_Klu: A serial, unblocked code ideal for getting started and for very sparse matrices...
int Solve()
Solves A X = B (or AT x = B)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< Epetra_Map > buildMap(Epetra_Comm &Comm)
virtual int InsertGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
virtual int MyPID() const =0
int FillComplete(bool OptimizeDataStorage=true)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define AMESOS_CHK_ERR(a)
int main(int argc, char *argv[])
Teuchos::RCP< Epetra_CrsMatrix > buildMatrix(Epetra_Map &map)
int SetParameters(Teuchos::ParameterList &ParameterList)
Updates internal variables.