Using LinearSolverFactory in spu_2p.cpp to gain linear solver flexibility.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-14 10:19:35 +02:00
parent 96dfbf8d5d
commit b64db1027b

View File

@ -58,11 +58,7 @@
#include <opm/core/fluid/IncompPropertiesFromDeck.hpp>
#include <opm/core/fluid/RockCompressibility.hpp>
#include <opm/core/linalg/LinearSolverUmfpack.hpp>
// #define EXPERIMENT_ISTL
#ifdef EXPERIMENT_ISTL
#include <opm/core/linalg/LinearSolverIstl.hpp>
#endif
#include <opm/core/linalg/LinearSolverFactory.hpp>
#include <opm/core/transport/transport_source.h>
#include <opm/core/transport/CSRMatrixUmfpackSolver.hpp>
@ -417,12 +413,9 @@ main(int argc, char** argv)
}
// Solvers init.
// Linear solver.
Opm::LinearSolverFactory linsolver(param);
// Pressure solver.
#ifdef EXPERIMENT_ISTL
Opm::LinearSolverIstl linsolver(param);
#else
Opm::LinearSolverUmfpack linsolver;
#endif // EXPERIMENT_ISTL
const double *grav = use_gravity ? &gravity[0] : 0;
Opm::IncompTpfa psolver(*grid->c_grid(), props->permeability(), grav, linsolver);
// Reordering solver.