Commit 7d0a743e authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Parameters names for solvers; fix diagonal pivoting issues in mptiluc2 (still off)

parent 759930e7
......@@ -173,10 +173,10 @@ namespace INMOST {
void SolverFCBIILU2::SetParameter(std::string name, std::string value) {
const char *val = value.c_str();
if (name == "kovl") solver_data->kovl = atoi(val);
else if (name == "tau") solver_data->tau = atof(val);
else if (name == "eps") solver_data->eps = atof(val);
else if (name == "nit") solver_data->nit = atoi(val);
if (name == "kovl" || name == "schwartz_overlap" ) solver_data->kovl = atoi(val);
else if (name == "tau" || name == "drop_tolerance" ) solver_data->tau = atof(val);
else if (name == "eps" || name == "absolute_tolerance" ) solver_data->eps = atof(val);
else if (name == "nit" || name == "maximum_iterations" ) solver_data->nit = atoi(val);
else if (name == "msglev") solver_data->msglev = atoi(val);
#if !defined(SILENCE_SET_PARAMETER)
else std::cout << "Parameter " << name << " is unknown" << std::endl;
......
......@@ -42,6 +42,9 @@ class MTILUC_preconditioner : public Method
std::vector<Sparse::Row::entry> & Entries,
INMOST_DATA_ENUM_TYPE wmbeg, INMOST_DATA_ENUM_TYPE wmend,
std::string file_name);
void CheckOrder(interval<INMOST_DATA_ENUM_TYPE, Interval> & Address,
std::vector<Sparse::Row::entry> & Entries,
INMOST_DATA_ENUM_TYPE rbeg, INMOST_DATA_ENUM_TYPE rend);
void SwapEntries(interval<INMOST_DATA_ENUM_TYPE, Interval> & Address,
std::vector<Sparse::Row::entry> & Entries,
INMOST_DATA_ENUM_TYPE rbeg, INMOST_DATA_ENUM_TYPE rend,
......
......@@ -179,13 +179,16 @@ namespace INMOST {
void SolverK3BIILU2::SetParameter(std::string name, std::string value) {
const char *val = value.c_str();
if (name == "msglev") solver_data->pParIter->msglev = atoi(val);
else if (name == "kovl") solver_data->pParams->ncycle = atoi(val);
else if (name == "tau") {
if (name == "msglev" ) solver_data->pParIter->msglev = atoi(val);
else if (name == "kovl" || name == "schwartz_overlap") solver_data->pParams->ncycle = atoi(val);
else if (name == "tau" || name == "drop_tolerance" )
{
solver_data->pParams->tau1 = atof(val);
solver_data->pParams->tau2 = -1.0;
} else if (name == "nit") solver_data->pParIter->maxit = atoi(val);
else if (name == "eps") solver_data->pParIter->eps = atof(val);
//solver_data->pParams->tau2 = -1.0;
}
else if (name == "reuse_tolerance" ) solver_data->pParams->tau2 = atof(val);
else if (name == "nit" || name == "maximum_iterations") solver_data->pParIter->maxit = atoi(val);
else if (name == "eps" || name == "absolute_tolerance") solver_data->pParIter->eps = atof(val);
#if !defined(SILENCE_SET_PARAMETER)
else std::cout << "Parameter " << name << " is unknown" << std::endl;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment