#include <lac/sparsematrix.h>
#include <lac/solver_cg.h>
#include <lac/vector_memory.h>
+#include <lac/precondition.h>
#include <map>
#include <fstream>
SolverCG<SparseMatrix<double>,Vector<double> > cg(control,memory);
// solve
- cg.solve (system_matrix, solution, right_hand_side);
+ cg.solve (system_matrix, solution, right_hand_side,
+ PreconditionIdentity<Vector<double> >());
// distribute solution
constraints.distribute (solution);
};
#include <lac/sparsematrix.h>
#include <lac/solver_cg.h>
#include <lac/vector_memory.h>
+#include <lac/precondition.h>
#include <map>
#include <fstream>
SolverCG<SparseMatrix<double>,Vector<double> > cg(control,memory);
// solve
- cg.solve (system_matrix, solution, right_hand_side);
+ cg.solve (system_matrix, solution, right_hand_side,
+ PreconditionIdentity<Vector<double> >());
// distribute solution
constraints.distribute (solution);
};
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams