Commit 9915f5f8 authored by Dmitry Bagaev's avatar Dmitry Bagaev

Improvements in Solver

1) Parameters parsing in inner solvers
2) Parameters parsing in trillions solvers
3) Added xml parsing test
4) Trilinos without mpi support will not compile, disable trillions
solvers if compiling without mpi
parent 57c8d057
......@@ -132,7 +132,7 @@ int main(int argc,char ** argv)
ttt = Timer();
Solver S("inner_ilu2"); // Specify the linear solver to ASM+ILU2+BiCGStab one
S.GetParameters().set("absolute_tolerance", "1e-8");
S.SetParameter("absolute_tolerance", "1e-8");
Residual R; // Residual vector
Sparse::LockService Locks;
Sparse::Vector Update; // Declare the solution and the right-hand side vectors
......
......@@ -718,11 +718,10 @@ int main(int argc,char ** argv)
//Solver S(Solver::INNER_ILU2);
//Solver S(Solver::INNER_MPTILUC);
Solver S("superlu");
SolverParameters &p = S.GetParameters();
p.set("relative_tolerance", "1.0e-14");
p.set("absolute_tolerance", "1.0e-12");
p.set("drop_tolerance", "1.0e-1");
p.set("reuse_tolerance", "1.0e-2");
S.SetParameter("relative_tolerance", "1.0e-14");
S.SetParameter("absolute_tolerance", "1.0e-12");
S.SetParameter("drop_tolerance", "1.0e-1");
S.SetParameter("reuse_tolerance", "1.0e-2");
S.SetMatrix(R.GetJacobian());
//std::fill(Update.Begin(),Update.End(),0.0);
......
......@@ -129,7 +129,7 @@ int main(int argc,char ** argv)
ttt = Timer();
Solver S("inner_ilu2"); // Specify the linear solver to ASM+ILU2+BiCGStab one
S.GetParameters().set("absolute_tolerance", "1e-8");
S.SetParameter("absolute_tolerance", "1e-8");
Sparse::LockService L;
Sparse::Matrix A; // Declare the matrix of the linear system to be solved
Sparse::Vector x,b; // Declare the solution and the right-hand side vectors
......
......@@ -249,7 +249,8 @@ namespace INMOST
/// Clear all internal data of the current solver including matrix, preconditioner etc.
bool Clear();
SolverParameters &GetParameters() const;
std::string GetParameter(std::string name) const;
void SetParameter(std::string name, std::string value);
/// Return the number of iterations performed by the last solution.
/// @see Sparse::Solve
......
......@@ -3,7 +3,6 @@
#include <string>
#include <sstream>
#include "inmost_solver_parameters.h"
#include "inmost_sparse.h"
namespace INMOST {
......@@ -13,13 +12,10 @@ namespace INMOST {
class SolverInterface {
protected:
INMOST_MPI_Comm communicator;
SolverParameters &parameters;
public:
SolverInterface(SolverParameters &parameters): parameters(parameters) {};
SolverInterface() {};
SolverInterface(const SolverInterface *other): parameters(other->parameters) {
parameters = SolverParameters(other->parameters);
};
SolverInterface(const SolverInterface *other) {};
virtual void Assign(const SolverInterface *other) = 0;
......@@ -33,13 +29,9 @@ namespace INMOST {
virtual bool isMatrixSet() = 0;
virtual SolverParameters &GetParameters() const {
return parameters;
};
virtual std::string GetParameter(std::string name) const = 0;
virtual void SetParameters(SolverParameters &_parameters) {
parameters = _parameters;
}
virtual void SetParameter(std::string name, std::string value) = 0;
virtual const INMOST_DATA_ENUM_TYPE Iterations() const = 0;
......
......@@ -9,42 +9,7 @@ namespace INMOST {
#if defined(USE_SOLVER)
class SolverParameters {
private:
std::map<std::string, std::string> parameters;
std::string prefix;
std::string solverName;
public:
SolverParameters();
SolverParameters(std::string solverName, std::string prefix);
SolverParameters(const SolverParameters &other);
std::string getSolverName() const;
std::string getPrefix() const;
void require(std::string name, std::string value);
void set(std::string name, std::string value);
template<typename T>
T get(std::string name) {
return from_string<T>(parameters[name]);
}
};
class GlobalSolversParameters {
private:
static std::vector<SolverParameters> parameters;
GlobalSolversParameters() {};
static void Initialize(std::string databasePath);
public:
static SolverParameters& getSolverParameters(std::string solverName, std::string prefix);
};
#endif
......
......@@ -14,6 +14,13 @@ namespace INMOST {
return v;
}
template<typename T>
std::string to_string(T value) {
std::stringstream ss;
ss << value;
return ss.str();
}
}
#endif //INMOST_UTILS_H
......@@ -329,6 +329,7 @@ namespace INMOST
}
if( get_iStream().fail() )
{
Report("Stream failed while getting the char");
WAITNL;
_state = Failure;
......@@ -466,7 +467,14 @@ namespace INMOST
add.hadlinechar = 0;
add.src = file;
add.s = new std::fstream(file.c_str(),std::ios::in);
inp.push_back(add);
if (!add.s->fail()) {
inp.push_back(add);
} else {
Report("Got a bad stream on input in %s (Include stream %s)" ,__FUNCTION__, file.c_str());
delete add.s;
}
if( get_iStream().fail() )
{
Report("Got a bad stream on input in %s",__FUNCTION__);
......
......@@ -19,11 +19,11 @@ if (USE_SOLVER_PETSC)
add_subdirectory(solver_petsc)
endif()
if (USE_SOLVER_TRILINOS)
if (USE_SOLVER_TRILINOS AND USE_MPI)
add_subdirectory(solver_trilinos)
endif()
if (USE_SOLVER_ANI)
if (USE_SOLVER_ANI AND TEST_FORTRAN_ANI3D)
add_subdirectory(solver_ani)
endif()
......
......@@ -4,10 +4,10 @@ namespace INMOST {
std::map<std::string, SolverBaseFactory *> SolverMaster::solvers = std::map<std::string, SolverBaseFactory *>();
SolverInterface *SolverMaster::getSolver(std::string name, SolverParameters &parameters) {
SolverInterface *SolverMaster::getSolver(std::string name) {
solvers_map_iterator_t iterator = SolverMaster::solvers.find(name);
if (iterator != SolverMaster::solvers.end()) {
return iterator->second->create(parameters);
return iterator->second->create();
} else {
throw INMOST::SolverNotFound;
}
......
......@@ -7,7 +7,7 @@
namespace INMOST {
struct SolverBaseFactory {
virtual SolverInterface *create(SolverParameters &parameters) = 0;
virtual SolverInterface *create() = 0;
virtual SolverInterface *copy(const SolverInterface *other) = 0;
......@@ -16,8 +16,8 @@ namespace INMOST {
template<class C>
struct SolverCreateFactory : SolverBaseFactory {
SolverInterface *create(SolverParameters &parameters) {
return new C(parameters);
SolverInterface *create() {
return new C();
};
SolverInterface *copy(const SolverInterface *other) {
......@@ -34,7 +34,7 @@ namespace INMOST {
solvers.insert(std::make_pair(name, new SolverCreateFactory<T>));
};
static SolverInterface *getSolver(std::string name, SolverParameters &parameters);
static SolverInterface *getSolver(std::string name);
static SolverInterface *copySolver(const SolverInterface *other);
......
......@@ -3,47 +3,4 @@
namespace INMOST {
SolverParameters::SolverParameters() {}
SolverParameters::SolverParameters(std::string solverName, std::string prefix) : solverName(solverName), prefix(prefix) {}
SolverParameters::SolverParameters(const SolverParameters &other) : prefix(other.prefix), parameters(other.parameters) {}
void SolverParameters::set(std::string name, std::string value) {
parameters[name] = value;
}
void SolverParameters::require(std::string name, std::string value) {
if (parameters.find(name) == parameters.end()) {
parameters[name] = value;
}
}
std::string SolverParameters::getSolverName() const {
return solverName;
}
std::string SolverParameters::getPrefix() const {
return prefix;
}
typedef std::vector<SolverParameters>::iterator parameters_iterator_t;
std::vector<SolverParameters> GlobalSolversParameters::parameters = std::vector<SolverParameters>();
SolverParameters &GlobalSolversParameters::getSolverParameters(std::string solverName, std::string prefix) {
for (parameters_iterator_t i = parameters.begin(); i < parameters.end(); i++) {
SolverParameters& p = *i;
if (p.getSolverName() == solverName && p.getPrefix() == prefix) return p;
}
SolverParameters new_p = SolverParameters(solverName, prefix);
parameters.push_back(new_p);
return (parameters[parameters.size() - 1]);
}
void GlobalSolversParameters::Initialize(std::string databasePath) {
std::vector<std::string> solvers = Solver::getAvailableSolvers();
for (std::vector<std::string>::iterator name = solvers.begin(); name < solvers.end(); name++) {
//global[*name] = std::map<std::string, SolverParameters>();
}
}
}
......@@ -12,7 +12,7 @@
#endif
#if defined(USE_SOLVER_TRILINOS)
#if defined(USE_SOLVER_TRILINOS) && defined(USE_MPI)
#include "solver_trilinos/SolverTrilinos.h"
#include "solver_trilinos/solver_aztec/SolverTrilinosAztec.h"
......@@ -49,8 +49,7 @@ namespace INMOST {
bool Solver::is_finalized = false;
Solver::Solver(std::string solverName, std::string prefix, INMOST_MPI_Comm _comm) {
SolverParameters &p = GlobalSolversParameters::getSolverParameters(solverName, prefix);
this->solver = SolverMaster::getSolver(solverName, p);
this->solver = SolverMaster::getSolver(solverName);
this->prefix = prefix;
solver->SetCommunicator(_comm);
std::string solverDatabasePath = Solver::parseDatabase(solverName);
......@@ -70,7 +69,6 @@ namespace INMOST {
this->solver->SetCommunicator(other.solver->GetCommunicator());
this->prefix = other.prefix;
this->solver->Assign(other.solver);
this->solver->SetParameters(other.solver->GetParameters());
}
return *this;
}
......@@ -110,7 +108,7 @@ namespace INMOST {
#if defined(USE_SOLVER_PETSC)
SolverMaster::registerSolver<SolverPETSc>("petsc");
#endif
#if defined(USE_SOLVER_TRILINOS)
#if defined(USE_SOLVER_TRILINOS) && defined(USE_MPI)
SolverMaster::registerSolver<SolverTrilinosAztec>("trilinos_aztec");
SolverMaster::registerSolver<SolverTrilinosBelos>("trilinos_belos");
SolverMaster::registerSolver<SolverTrilinosML>("trilinos_ml");
......@@ -178,8 +176,12 @@ namespace INMOST {
return solver->Clear();
}
SolverParameters &Solver::GetParameters() const {
return solver->GetParameters();
std::string Solver::GetParameter(std::string name) const {
return solver->GetParameter(name);
}
void Solver::SetParameter(std::string name, std::string value) {
return solver->SetParameter(name, value);
}
const INMOST_DATA_ENUM_TYPE Solver::Iterations() const {
......
......@@ -2,11 +2,11 @@
namespace INMOST {
SolverANI::SolverANI(SolverParameters &parameters): SolverInterface(parameters) {
SolverANI::SolverANI() {
};
SolverANI::SolverANI(const SolverInterface *other): SolverInterface(other) {
SolverANI::SolverANI(const SolverInterface *other) {
throw INMOST::SolverUnsupportedOperation; //later
};
......@@ -83,7 +83,7 @@ namespace INMOST {
solution.v = (double *) malloc(sizeof(double) * local_size);
memcpy(solution.v, &SOL[vbeg], sizeof(double) * local_size);
bool result = (solvebcg(&solver, &rhs, &solution) == 0);
bool result = (solvebcg_ani(&solver, &rhs, &solution) == 0);
if (result) {
memcpy(&SOL[vbeg], solution.v, sizeof(double) * local_size);
}
......@@ -109,6 +109,17 @@ namespace INMOST {
return m.n != 0;
}
std::string SolverANI::GetParameter(std::string name) const {
std::cout << "SolverANI::GetParameter unsupported operation" << std::endl;
//throw INMOST::SolverUnsupportedOperation;
return "";
}
void SolverANI::SetParameter(std::string name, std::string value) {
std::cout << "SolverANI::SetParameter unsupported operation" << std::endl;
//throw INMOST::SolverUnsupportedOperation;
}
const INMOST_DATA_ENUM_TYPE SolverANI::Iterations() const {
return static_cast<INMOST_DATA_ENUM_TYPE>(solver.ITER);
}
......
......@@ -13,7 +13,7 @@ namespace INMOST {
INMOST_DATA_ENUM_TYPE local_size;
public:
SolverANI(SolverParameters &parameters);
SolverANI();
SolverANI(const SolverInterface *other);
......@@ -29,6 +29,10 @@ namespace INMOST {
virtual bool isMatrixSet();
virtual std::string GetParameter(std::string name) const;
virtual void SetParameter(std::string name, std::string value);
virtual const INMOST_DATA_ENUM_TYPE Iterations() const;
virtual const INMOST_DATA_REAL_TYPE Residual() const;
......
......@@ -123,7 +123,7 @@ int renewbcg(bcg *s, double *A) {
}
/* Solve linear system */
int solvebcg(bcg *s, vector *b, vector *x) {
int solvebcg_ani(bcg *s, vector *b, vector *x) {
int NUNIT = 6, INFO = 0, eight = 8;
s->ITER = 1000;
......
......@@ -36,7 +36,7 @@ int initbcg(bcg *s, matrix *A);
int renewbcg(bcg *s, double *A);
/* Solve linear system */
int solvebcg(bcg *s, vector *b, vector *x);
int solvebcg_ani(bcg *s, vector *b, vector *x);
/* Free memory used by solver */
void freebcg(bcg *s);
......
......@@ -2,11 +2,11 @@
namespace INMOST {
SolverFCBIILU2::SolverFCBIILU2(SolverParameters &parameters): SolverInterface(parameters) {
SolverFCBIILU2::SolverFCBIILU2() {
}
SolverFCBIILU2::SolverFCBIILU2(const SolverInterface *other): SolverInterface(other) {
SolverFCBIILU2::SolverFCBIILU2(const SolverInterface *other) {
const SolverFCBIILU2 *fcother = static_cast<const SolverFCBIILU2 *>(other);
SolverCopyDataFcbiilu2(&solver_data, fcother->solver_data, communicator);
if (fcother->matrix_data != NULL) {
......@@ -52,7 +52,7 @@ namespace INMOST {
MPI_Comm_rank(A.GetCommunicator(), &myid);
#else
nproc = 1;
myid = 0;
myid = 0;
#endif
int *ibl = (int *) malloc(sizeof(int) * (nproc + 1));
ibl[0] = 0;
......@@ -129,6 +129,17 @@ namespace INMOST {
return matrix_data != NULL;
}
std::string SolverFCBIILU2::GetParameter(std::string name) const {
std::cout << "SolverFCBIILU2::GetParameter unsupported operation" << std::endl;
//throw INMOST::SolverUnsupportedOperation;
return "";
}
void SolverFCBIILU2::SetParameter(std::string name, std::string value) {
std::cout << "SolverFCBIILU2::SetParameter unsupported operation" << std::endl;
//throw INMOST::SolverUnsupportedOperation;
}
const INMOST_DATA_ENUM_TYPE SolverFCBIILU2::Iterations() const {
return static_cast<INMOST_DATA_ENUM_TYPE>(SolverIterationNumberFcbiilu2(solver_data));
}
......
......@@ -12,7 +12,7 @@ namespace INMOST {
void *matrix_data;
INMOST_DATA_ENUM_TYPE local_size, global_size;
public:
SolverFCBIILU2(SolverParameters &parameters);
SolverFCBIILU2();
SolverFCBIILU2(const SolverInterface *other);
......@@ -28,6 +28,10 @@ namespace INMOST {
virtual bool isMatrixSet();
virtual std::string GetParameter(std::string name) const;
virtual void SetParameter(std::string name, std::string value);
virtual const INMOST_DATA_ENUM_TYPE Iterations() const;
virtual const INMOST_DATA_REAL_TYPE Residual() const;
......
......@@ -2,22 +2,22 @@
namespace INMOST {
SolverInner::SolverInner(SolverParameters &parameters): SolverInterface(parameters) {
parameters.require("additive_schwartz_overlap", "1");
parameters.require("maximum_iterations", "2500");
parameters.require("reorder_nonzero", "1");
parameters.require("rescale_iterations", "6");
parameters.require("condition_estimation", "1");
parameters.require("adapt_ddpq_tolerance", "1");
parameters.require("gmres_substeps", "2");
SolverInner::SolverInner() {
iters = 2500;
scale_iters = 6;
condest = 1;
ddpqatol = 1;
overlap = 1;
ell = 2;
reorder_nnz = 1;
parameters.require("absolute_tolerance", "1.0e-5");
parameters.require("relative_tolerance", "1.0e-12");
parameters.require("divergence_tolerance", "1.0e+100");
parameters.require("drop_tolerance", "0.005");
parameters.require("reuse_tolerance", "0.00005");
parameters.require("ddpq_tolerance", "0.75");
parameters.require("fill_level", "3");
atol = 1.0e-5;
rtol = 1.0e-12;
dtol = 1.0e+100;
tau = 0.005;
tau2 = 0.00005;
ddpqtol = 0.75;
fill = 3;
}
SolverInner::SolverInner(const SolverInterface *other): SolverInterface(other) {
......@@ -51,10 +51,10 @@ namespace INMOST {
}
bool SolverInner::Solve(Sparse::Vector &RHS, Sparse::Vector &SOL) {
solver->EnumParameter("maxits") = parameters.get < INMOST_DATA_ENUM_TYPE > ("maximum_iterations");
solver->RealParameter("rtol") = parameters.get<INMOST_DATA_REAL_TYPE>("relative_tolerance");
solver->RealParameter("atol") = parameters.get<INMOST_DATA_REAL_TYPE>("absolute_tolerance");
solver->RealParameter("divtol") = parameters.get<INMOST_DATA_REAL_TYPE>("divergence_tolerance");
solver->EnumParameter("maxits") = iters;
solver->RealParameter("rtol") = rtol;
solver->RealParameter("atol") = atol;
solver->RealParameter("divtol") = dtol;
return solver->Solve(RHS, SOL);
}
......@@ -76,6 +76,46 @@ namespace INMOST {
return matrix != NULL;
}
std::string SolverInner::GetParameter(std::string name) const {
if(name == "maximum_iterations" ) return to_string(iters);
else if( name == "rescale_iterations" ) return to_string(scale_iters);
else if( name == "condition_estimation" ) return to_string(condest);
else if( name == "adapt_ddpq_tolerance" ) return to_string(ddpqatol);
else if( name == "schwartz_overlap" ) return to_string(overlap);
else if( name == "gmres_substeps" ) return to_string(ell);
else if( name == "reorder_nonzeros" ) return to_string(reorder_nnz);
else if( name == "absolute_tolerance") return to_string(atol);
else if( name == "relative_tolerance") return to_string(rtol);
else if( name == "divergence_tolerance") return to_string(dtol);
else if( name == "drop_tolerance") return to_string(tau);
else if( name == "reuse_tolerance") return to_string(tau2);
else if( name == "ddpq_tolerance") return to_string(ddpqtol);
else if( name == "fill_level") return to_string(fill);
else {
std::cout << "Parameter " << name << " is unknown" << std::endl;
return "";
}
}
void SolverInner::SetParameter(std::string name, std::string value) {
const char *val = value.c_str();
if(name == "maximum_iterations" ) iters = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "rescale_iterations" ) scale_iters = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "condition_estimation" ) condest = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "adapt_ddpq_tolerance" ) ddpqatol = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "schwartz_overlap" ) overlap = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "gmres_substeps" ) ell = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "reorder_nonzeros" ) reorder_nnz = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else if( name == "absolute_tolerance") atol = atof(val);
else if( name == "relative_tolerance") rtol = atof(val);
else if( name == "divergence_tolerance") dtol = atof(val);
else if( name == "drop_tolerance") tau = atof(val);
else if( name == "reuse_tolerance") tau2 = atof(val);
else if( name == "ddpq_tolerance") ddpqtol = atof(val);
else if( name == "fill_level") fill = static_cast<INMOST_DATA_ENUM_TYPE>(atoi(val));
else std::cout << "Parameter " << name << " is unknown" << std::endl;
}
const INMOST_DATA_ENUM_TYPE SolverInner::Iterations() const {
return solver->GetIterations();
}
......
......@@ -2,10 +2,12 @@
#define INMOST_SOLVERINNER_H
#include "inmost_solver_interface.h"
#include "inmost_utils.h"
#include "solver_prototypes.hpp"
#include "solver_bcgsl.hpp"
namespace INMOST {
class SolverInner : public SolverInterface {
......@@ -13,8 +15,11 @@ namespace INMOST {
Sparse::Matrix *matrix;
KSOLVER *solver;
Solver::OrderInfo info;
INMOST_DATA_ENUM_TYPE iters, scale_iters, condest, ddpqatol, overlap, ell, reorder_nnz, fill;
INMOST_DATA_REAL_TYPE atol, rtol, dtol, ddpqtol, tau, tau2;
public:
SolverInner(SolverParameters &parameters);
SolverInner();
SolverInner(const SolverInterface *other);
......@@ -30,6 +35,10 @@ namespace INMOST {
virtual bool isMatrixSet();
virtual std::string GetParameter(std::string name) const;
virtual void SetParameter(std::string name, std::string value);
virtual const INMOST_DATA_ENUM_TYPE Iterations() const;
virtual const INMOST_DATA_REAL_TYPE Residual() const;
......
......@@ -2,13 +2,13 @@
namespace INMOST {
SolverDDPQILUC2::SolverDDPQILUC2(SolverParameters &parameters): SolverInner(parameters) {
SolverDDPQILUC2::SolverDDPQILUC2() {
Method *preconditioner = new ILUC_preconditioner(info);
solver = new KSOLVER(preconditioner, info);
matrix = NULL;
}
SolverDDPQILUC2::SolverDDPQILUC2(const SolverInterface *other): SolverInner(other) {
SolverDDPQILUC2::SolverDDPQILUC2(const SolverInterface *other) {
//You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation;
}
......@@ -18,19 +18,19 @@ namespace INMOST {
delete matrix;
}
matrix = new Sparse::Matrix(A);
info.PrepareMatrix(*matrix, parameters.get<INMOST_DATA_ENUM_TYPE>("additive_schwartz_overlap"));
info.PrepareMatrix(*matrix, overlap);
solver->ReplaceMAT(*matrix);
solver->RealParameter(":tau") = parameters.get<INMOST_DATA_REAL_TYPE>("drop_tolerance");
solver->RealParameter(":tau2") = parameters.get<INMOST_DATA_REAL_TYPE>("reuse_tolerance");
solver->EnumParameter(":scale_iters") = parameters.get<INMOST_DATA_ENUM_TYPE>("rescale_iterations");
solver->RealParameter(":ddpq_tau") = parameters.get<INMOST_DATA_REAL_TYPE>("ddpq_tolerance");
solver->EnumParameter(":reorder_nnz") = parameters.get<INMOST_DATA_ENUM_TYPE>("reorder_nonzero");
solver->EnumParameter(":estimator") = parameters.get<INMOST_DATA_ENUM_TYPE>("condition_estimation");
solver->EnumParameter(":ddpq_tau_adapt") = parameters.get<INMOST_DATA_ENUM_TYPE>("adapt_ddpq_tolerance");
solver->RealParameter(":tau") = tau;
solver->RealParameter(":tau2") = tau2;
solver->EnumParameter(":scale_iters") = scale_iters;
solver->RealParameter(":ddpq_tau") = ddpqtol;
solver->EnumParameter(":reorder_nnz") = reorder_nnz;
solver->EnumParameter(":estimator") = condest;
solver->EnumParameter(":ddpq_tau_adapt") = ddpqatol;
if (sizeof(KSOLVER) == sizeof(BCGSL_solver)) {
solver->EnumParameter("levels") = parameters.get<INMOST_DATA_ENUM_TYPE>("gmres_substeps");
solver->EnumParameter("levels") = ell;
}
if (!solver->isInitialized()) {
......
......@@ -10,7 +10,7 @@ namespace INMOST {
class SolverDDPQILUC2 : public SolverInner {
public:
SolverDDPQILUC2(SolverParameters &parameters);
SolverDDPQILUC2();
SolverDDPQILUC2(const SolverInterface *other);
......
......@@ -2,13 +2,13 @@
namespace INMOST {
SolverILU2::SolverILU2(SolverParameters &parameters): SolverInner(parameters) {
SolverILU2::SolverILU2() {
Method *preconditioner = new ILU2_preconditioner(info);
solver = new KSOLVER(preconditioner, info);
matrix = NULL;
}