Some improvements to SolverInterface, SolverParameters added
Showing
... | ... | @@ -6,16 +6,6 @@ namespace INMOST { |
Method *preconditioner = new MTILU2_preconditioner(info); | ||
solver = new KSOLVER(preconditioner, info); | ||
matrix = NULL; | ||
additive_schwartz_overlap = DEFAULT_ADDITIVE_SCHWARTZ_OVERLAP; | ||
maximum_iterations = DEFAULT_MAXIMUM_ITERATIONS; | ||
absolute_tolerance = DEFAULT_ABSOLUTE_TOLERANCE; | ||
relative_tolerance = DEFAULT_RELATIVE_TOLERANCE; | ||
divergence_tolerance = DEFAULT_DIVERGENCE_TOLERANCE; | ||
preconditioner_drop_tolerance = DEFAULT_PRECONDITIONER_DROP_TOLERANCE; | ||
preconditioner_reuse_tolerance = DEFAULT_PRECONDITIONER_REUSE_TOLERANCE; | ||
preconditioner_rescale_iterations = DEFAULT_PRECONDITIONER_RESCALE_ITERS; | ||
solver_gmres_substeps = DEFAULT_SOLVER_GMRES_SUBSTEPS; | ||
} | ||
SolverMPTILU2::SolverMPTILU2(const SolverInterface *other) { | ||
... | ... | @@ -37,15 +27,15 @@ namespace INMOST { |
delete matrix; | ||
} | ||
matrix = new Sparse::Matrix(A); | ||
info.PrepareMatrix(*matrix, additive_schwartz_overlap); | ||
info.PrepareMatrix(*matrix, parameters.GetParameterEnum("additive_schwartz_overlap")); | ||
solver->ReplaceMAT(*matrix); | ||
solver->RealParameter(":tau") = preconditioner_drop_tolerance; | ||
solver->RealParameter(":tau2") = preconditioner_reuse_tolerance; | ||
< |