Commit 57c8d057 authored by Dmitry Bagaev's avatar Dmitry Bagaev
Browse files

SolverParameters class init

Basic functionality
parent 6467caf5
......@@ -263,8 +263,11 @@ set(INMOST_INSTALL_HEADERS Source/Headers/inmost.h
Source/Headers/inmost_nonlinear.h
Source/Headers/inmost_partitioner.h
Source/Headers/inmost_solver.h
Source/Headers/inmost_solver_interface.h
Source/Headers/inmost_solver_parameters.h
Source/Headers/inmost_sparse.h
Source/Headers/inmost_xml.h
Source/Headers/inmost_utils.h
Source/Headers/inmost_variable.h
Source/Headers/container.hpp)
......@@ -293,9 +296,12 @@ set_property(TARGET inmost PROPERTY PUBLIC_HEADER
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_nonlinear.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_partitioner.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_solver.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_solver_interface.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_solver_parameters.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_sparse.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_variable.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_xml.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/inmost_utils.h"
"${PROJECT_SOURCE_DIR}/Source/Headers/container.hpp")
install(FILES
......
......@@ -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.SetParameter("absolute_tolerance", "1e-8");
S.GetParameters().set("absolute_tolerance", "1e-8");
Residual R; // Residual vector
Sparse::LockService Locks;
Sparse::Vector Update; // Declare the solution and the right-hand side vectors
......
......@@ -718,10 +718,12 @@ int main(int argc,char ** argv)
//Solver S(Solver::INNER_ILU2);
//Solver S(Solver::INNER_MPTILUC);
Solver S("superlu");
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");
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.SetMatrix(R.GetJacobian());
//std::fill(Update.Begin(),Update.End(),0.0);
if( S.Solve(R.GetResidual(),Update) )
......
......@@ -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.SetParameter("absolute_tolerance", "1e-8");
S.GetParameters().set("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
......
......@@ -7,8 +7,10 @@ add_subdirectory(NonlinearSolver)
add_subdirectory(Autodiff)
add_subdirectory(Partitioner)
add_subdirectory(Misc)
add_subdirectory(Utils)
add_subdirectory(Headers)
set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} PARENT_SCOPE)
set(SOURCE ${SOURCE} PARENT_SCOPE)
set(HEADER ${HEADER} PARENT_SCOPE)
......@@ -13,6 +13,7 @@ set(HEADER
${CMAKE_CURRENT_SOURCE_DIR}/inmost_mesh.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_solver.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_solver_interface.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_solver_parameters.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_partitioner.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_autodiff.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_expression.h
......@@ -20,6 +21,7 @@ set(HEADER
${CMAKE_CURRENT_SOURCE_DIR}/inmost_sparse.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_nonlinear.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_xml.h
${CMAKE_CURRENT_SOURCE_DIR}/inmost_utils.h
${CMAKE_CURRENT_SOURCE_DIR}/container.hpp
PARENT_SCOPE
)
\ No newline at end of file
......@@ -11,5 +11,6 @@
#include "inmost_variable.h"
#include "inmost_nonlinear.h"
#include "inmost_xml.h"
#include "inmost_utils.h"
#endif // INMOST_H_INCLUDED
......@@ -224,6 +224,7 @@ namespace INMOST
SolverNotFound,
SolverUnsupportedOperation,
SolverUnknownParameter,
SolverNonExistentParameters,
/// The list of errors may occur in the Partitioner.
ErrorInPartitioner = 500,
......
......@@ -21,12 +21,14 @@
#define DEFAULT_PRECONDITIONER_ADAPT_DDPQ_TOLERANCE 1
#if defined(USE_SOLVER)
namespace INMOST {
namespace INMOST
{
#define GUARD_MPI(x) {ierr = x; if( ierr != MPI_SUCCESS ) {char str[4096]; int len; MPI_Error_string(ierr,str,&len); std::cout << #x << " not successfull: " << str << std::endl; MPI_Abort(comm,-1000);}}
#define HASH_TABLE_SIZE 2048
class Solver {
class Solver
{
private:
static int *argc;
static char ***argv;
......@@ -40,7 +42,8 @@ namespace INMOST {
public:
/// Base class for low level operations with objects of Solver class.
class OrderInfo {
class OrderInfo
{
private:
typedef std::vector<INMOST_DATA_ENUM_TYPE> storage_type;
storage_type global_to_proc; //stores ends of all non-overlapping intervals of elements, owned by this processor
......@@ -98,7 +101,8 @@ namespace INMOST {
GetLocalRegion(INMOST_DATA_ENUM_TYPE proc, INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const;
/// Get the local index region for the current process.
void GetVectorRegion(INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const {
void GetVectorRegion(INMOST_DATA_ENUM_TYPE &mbeg, INMOST_DATA_ENUM_TYPE &mend) const
{
mbeg = local_vector_begin;
mend = local_vector_end;
}
......@@ -116,12 +120,14 @@ namespace INMOST {
/// Get the communicator which the solver is associated with.
INMOST_MPI_Comm GetComm() const { return comm; }
// Access to arrays below allows to organize manual exchange
INMOST_MPI_Request *GetSendRequests() {
INMOST_MPI_Request *GetSendRequests()
{
assert(!send_requests.empty());
return &send_requests[0];
}
INMOST_MPI_Request *GetRecvRequests() {
INMOST_MPI_Request *GetRecvRequests()
{
assert(!recv_requests.empty());
return &recv_requests[0];
}
......@@ -130,14 +136,16 @@ namespace INMOST {
INMOST_DATA_ENUM_TYPE GetRecvRequestsSize() { return static_cast<INMOST_DATA_ENUM_TYPE>(recv_requests.size()); }
INMOST_DATA_ENUM_TYPE *GetSendExchangeArray() {
INMOST_DATA_ENUM_TYPE *GetSendExchangeArray()
{
assert(!vector_exchange_send.empty());
return &vector_exchange_send[0];
}
INMOST_DATA_ENUM_TYPE GetSendExchangeSize() { return static_cast<INMOST_DATA_ENUM_TYPE>(send_storage.size()); }
INMOST_DATA_ENUM_TYPE *GetRecvExchangeArray() {
INMOST_DATA_ENUM_TYPE *GetRecvExchangeArray()
{
assert(!vector_exchange_recv.empty());
return &vector_exchange_recv[0];
}
......@@ -241,11 +249,7 @@ namespace INMOST {
/// Clear all internal data of the current solver including matrix, preconditioner etc.
bool Clear();
void SetDefaultParameters();
SolverParameter GetParameter(std::string property) const;
void SetParameter(std::string property, std::string value);
SolverParameters &GetParameters() const;
/// Return the number of iterations performed by the last solution.
/// @see Sparse::Solve
......
#ifndef INMOST_SOLVERINTERFACE_H
#define INMOST_SOLVERINTERFACE_H
#ifndef INMOST_SOLVER_INTERFACE_H
#define INMOST_SOLVER_INTERFACE_H
#include <string>
#include <sstream>
#include "inmost_solver_parameters.h"
#include "inmost_sparse.h"
namespace INMOST {
#if defined(USE_SOLVER)
class SolverParameter {
private:
std::string value;
public:
SolverParameter() {};
SolverParameter(std::string value) : value(value) {};
template<typename T>
const T get() const {
std::istringstream stream(value);
T parameter;
stream >> parameter;
return parameter;
}
};
class SolverParameters {
private:
std::map<std::string, SolverParameter> parameters;
public:
SolverParameters();
void SetParameter(std::string name, std::string value);
const SolverParameter GetParameter(std::string name) const;
template<typename T>
const T get(std::string name) const {
return GetParameter(name).get<T>();
}
};
class SolverInterface {
protected:
INMOST_MPI_Comm communicator;
SolverParameters parameters;
SolverParameters &parameters;
public:
SolverInterface() {};
SolverInterface(SolverParameters &parameters): parameters(parameters) {};
SolverInterface(const SolverInterface *other) {};
SolverInterface(const SolverInterface *other): parameters(other->parameters) {
parameters = SolverParameters(other->parameters);
};
virtual void Assign(const SolverInterface *other) = 0;
......@@ -63,15 +33,13 @@ namespace INMOST {
virtual bool isMatrixSet() = 0;
virtual void SetDefaultParameters() = 0;
virtual SolverParameter GetParameter(std::string name) const {
return parameters.GetParameter(name);
virtual SolverParameters &GetParameters() const {
return parameters;
};
virtual void SetParameter(std::string name, std::string value) {
parameters.SetParameter(name, value);
};
virtual void SetParameters(SolverParameters &_parameters) {
parameters = _parameters;
}
virtual const INMOST_DATA_ENUM_TYPE Iterations() const = 0;
......@@ -89,7 +57,6 @@ namespace INMOST {
virtual ~SolverInterface() {};
void SetCommunicator(INMOST_MPI_Comm _communicator) {
communicator = _communicator;
}
......@@ -97,10 +64,11 @@ namespace INMOST {
INMOST_MPI_Comm GetCommunicator() {
return communicator;
}
};
}
#endif
#endif //INMOST_SOLVERINTERFACE_H
#endif //INMOST_SOLVER_INTERFACE_H
#ifndef INMOST_SOLVER_PARAMETERS_H
#define INMOST_SOLVER_PARAMETERS_H
#include <string>
#include "inmost_utils.h"
#include "inmost_common.h"
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
}
#endif //INMOST_SOLVER_PARAMETERS_H
#ifndef INMOST_UTILS_H
#define INMOST_UTILS_H
#include <sstream>
#include <string>
namespace INMOST {
template<typename T>
T from_string(std::string str) {
T v;
std::istringstream ss(str);
ss >> v;
return v;
}
}
#endif //INMOST_UTILS_H
#ifndef INMOST_SOLVER_INCLUDED
#define INMOST_SOLVER_INCLUDED
#include "inmost_common.h"
#include "inmost_sparse.h"
//#include "solver_prototypes.hpp"
#define DEFAULT_ADDITIVE_SCHWARTZ_OVERLAP 1
#define DEFAULT_ABSOLUTE_TOLERANCE 1.0e-5
#define DEFAULT_RELATIVE_TOLERANCE 1.0e-12
#define DEFAULT_DIVERGENCE_TOLERANCE 1.0e+100
#define DEFAULT_MAXIMUM_ITERATIONS 2500
#define DEFAULT_SOLVER_GMRES_SUBSTEPS 2
#define DEFAULT_PRECONDITIONER_DROP_TOLERANCE 0.005
#define DEFAULT_PRECONDITIONER_REUSE_TOLERANCE 0.00005
#define DEFAULT_PRECONDITIONER_FILL_LEVEL 3
#define DEFAULT_PRECONDITIONER_DDPQ_TOLERANCE 0.75
#define DEFAULT_PRECONDITIONER_REORDER_NONZEROS 1
#define DEFAULT_PRECONDITIONER_RESCALE_ITERS 6
#define DEFAULT_PRECONDITIONER_CONDITION_ESTIMATION 1
#define DEFAULT_PRECONDITIONER_ADAPT_DDPQ_TOLERANCE 1
#if defined(USE_SOLVER)
namespace INMOST
{
/// Main class to set and solve linear system.
/// Solver class is used to set the coefficient Matrix, the right-hand side Vector
/// and the initial guess Vector, construct the preconditioner and Solve
/// the linear system.
///
/// Formally, Solver class is independent of INMOST::Mesh class.
/// @see Sparse::Matrix
/// @see Sparse::Vector
/// @see Sparse::Solve
class Solver
{
private:
static INMOST_MPI_Type RowEntryType; //prepared in Initialize
public:
/// Type of the Solver can be currently used in this version of INMOST.
enum Type
{
INNER_ILU2, ///< inner Solver based on BiCGStab(L) solver with second order ILU factorization as preconditioner.
INNER_DDPQILUC, ///< inner Solver based on BiCGStab(L) solver with second order Crout-ILU with inversed-based condition estimation and unsymmetric reordering for diagonal dominance as preconditioner.
INNER_MPTILUC, ///< inner Solver based on BiCGStab(L) solver with second order Crout-ILU with inversed-based condition estimation and maximum product transversal reordering as preconditioner.
INNER_MPTILU2, ///< inner Solver based on BiCGStab(L) solver with second order ILU and maximum product transversal reordering as preconditioner.
Trilinos_Aztec, ///< external Solver AztecOO from Trilinos package.
Trilinos_Belos, ///< external Solver Belos from Trilinos package, currently without preconditioner.
Trilinos_ML, ///< external Solver AztecOO with ML preconditioner.
Trilinos_Ifpack,///< external Solver AztecOO with Ifpack preconditioner.
PETSc, ///< external Solver PETSc, @see http://www.mcs.anl.gov/petsc/
ANI, ///< external Solver from ANI3D based on ILU2 (sequential Fortran version), @see http://ani3d.sourceforge.net/
FCBIILU2, ///< external FCBIILU2 Solver (BIILU2 parallel F2C version).
K3BIILU2, ///< inner K3BIILU2 Solver (BIILU2 parallel version).
SUPERLU ///< external Solver SuperLU @see https://github.com/starseeker/SuperLU
};
static std::string TypeName(Type t);
//solver.cpp::::::::::::::::::::::::::::::::::::::::::::::::::::
public:
/// Base class for low level operations with objects of Solver class.
class OrderInfo
{
private:
typedef std::vector<INMOST_DATA_ENUM_TYPE> storage_type;
storage_type global_to_proc; //stores ends of all non-overlapping intervals of elements, owned by this processor
storage_type global_overlap; //stores pairs: [begin,end) of overlapping intervals of rows
std::vector<INMOST_DATA_ENUM_TYPE> vector_exchange_recv, vector_exchange_send;
std::vector<INMOST_DATA_REAL_TYPE> send_storage, recv_storage;
std::vector<INMOST_MPI_Request> send_requests, recv_requests;
std::vector<INMOST_DATA_ENUM_TYPE> extended_indexes;
//remote indexes
INMOST_DATA_ENUM_TYPE local_vector_begin, local_vector_end;
INMOST_DATA_ENUM_TYPE initial_matrix_begin, initial_matrix_end; //local interval of matrix
INMOST_DATA_ENUM_TYPE local_matrix_begin, local_matrix_end; //local interval of matrix
bool have_matrix;
INMOST_MPI_Comm comm;
int rank,size;
public:
void Clear();
/// Return true if Matrix data have already been specified.
bool & HaveMatrix() { return have_matrix; }
OrderInfo();
OrderInfo(const OrderInfo & other);
OrderInfo & operator =(OrderInfo const & other);
~OrderInfo();
/// Prepare parallel state of the Matrix with specified overlap size.
/// This state of the matrix can be used, for instance, to construct
/// the preconditioner for Additive Swartz method.
/// @param m Matrix to be expanded.
/// @param overlap Overlap size, viz. the number of overlap layers.
void PrepareMatrix(Sparse::Matrix & m, INMOST_DATA_ENUM_TYPE overlap);
/// Restore initial nonparallel state of the Matrix with no overlap.
void RestoreMatrix(Sparse::Matrix & m);
/// Prepare parallel state of the Vector.
void PrepareVector(Sparse::Vector & v) const;
/// Restore initial nonparallel state of the Vector.
void RestoreVector(Sparse::Vector & v) const;
/// Retrieve the processor number by binary search for the specified global index.
INMOST_DATA_ENUM_TYPE GetProcessor(INMOST_DATA_ENUM_TYPE gind) const; //retrieve processor by binary search in global_to_proc
void GetOverlapRegion(INMOST_DATA_ENUM_TYPE proc, INMOST_DATA_ENUM_TYPE & mbeg, INMOST_DATA_ENUM_TYPE & mend) const;
/// Get the local index region for the specified process.
void GetLocalRegion(INMOST_DATA_ENUM_TYPE proc, INMOST_DATA_ENUM_TYPE & mbeg, INMOST_DATA_ENUM_TYPE & mend) const;
/// Get the local index region for the current process.
void GetVectorRegion(INMOST_DATA_ENUM_TYPE & mbeg, INMOST_DATA_ENUM_TYPE & mend) const {mbeg = local_vector_begin; mend = local_vector_end;}
/// Get the rank of the current communicator, i.e. the current process index.
INMOST_DATA_ENUM_TYPE GetRank() const {return rank;}
/// Get the size of the current communicator, i.e. the total number of processes used.
INMOST_DATA_ENUM_TYPE GetSize() const {return size;}
/// Update the shared data in parallel vector.
void Update (Sparse::Vector & x); // update parallel vector
/// Sum shared values in parallel vector.
void Accumulate(Sparse::Vector & x); // sum shared values in parallel vector
/// Get the sum of num elements of real array on all processes.
void Integrate(INMOST_DATA_REAL_TYPE * inout, INMOST_DATA_ENUM_TYPE num) const;
/// Get the communicator which the solver is associated with.
INMOST_MPI_Comm GetComm() const {return comm;}
// Access to arrays below allows to organize manual exchange
INMOST_MPI_Request * GetSendRequests() {assert(!send_requests.empty()); return &send_requests[0];}
INMOST_MPI_Request * GetRecvRequests() {assert(!recv_requests.empty()); return &recv_requests[0];}
INMOST_DATA_ENUM_TYPE GetSendRequestsSize() {return static_cast<INMOST_DATA_ENUM_TYPE>(send_requests.size());}
INMOST_DATA_ENUM_TYPE GetRecvRequestsSize() {return static_cast<INMOST_DATA_ENUM_TYPE>(recv_requests.size());}
INMOST_DATA_ENUM_TYPE * GetSendExchangeArray() {assert(!vector_exchange_send.empty()); return &vector_exchange_send[0];}
INMOST_DATA_ENUM_TYPE GetSendExchangeSize() {return static_cast<INMOST_DATA_ENUM_TYPE>(send_storage.size());}
INMOST_DATA_ENUM_TYPE * GetRecvExchangeArray() {assert(!vector_exchange_recv.empty()); return &vector_exchange_recv[0];}
INMOST_DATA_ENUM_TYPE GetRecvExchangeSize() {return static_cast<INMOST_DATA_ENUM_TYPE>(recv_storage.size());}
//for debug
//~ void BeginSequentialCode() {for(int i = 0; i < rank; i++) MPI_Barrier(comm);}
//~ void EndSequentialCode() {for(int i = rank; i < size; i++) MPI_Barrier(comm);}
// Get the scalar product of the specified interval of the distributed vector.
// Conflicts with OpenMP, should not be used in future
//void ScalarProd(Vector const & left, Vector const & right, INMOST_DATA_ENUM_TYPE index_begin, INMOST_DATA_ENUM_TYPE index_end, INMOST_DATA_REAL_TYPE & sum) const;
};
private:
static bool is_initialized, is_finalized;
INMOST_MPI_Comm comm;
std::string name;
INMOST_DATA_ENUM_TYPE local_size, global_size;
INMOST_DATA_ENUM_TYPE last_it;
INMOST_DATA_REAL_TYPE last_resid;
OrderInfo info;
INMOST_DATA_ENUM_TYPE additive_schwartz_overlap;
INMOST_DATA_ENUM_TYPE maximum_iterations;
INMOST_DATA_REAL_TYPE absolute_tolerance;
INMOST_DATA_REAL_TYPE relative_tolerance;
INMOST_DATA_REAL_TYPE divergence_tolerance;
INMOST_DATA_REAL_TYPE preconditioner_drop_tolerance;
INMOST_DATA_REAL_TYPE preconditioner_reuse_tolerance;
INMOST_DATA_REAL_TYPE preconditioner_ddpq_tolerance;
INMOST_DATA_ENUM_TYPE preconditioner_reorder_nonzero;
INMOST_DATA_REAL_TYPE preconditioner_fill_level;
INMOST_DATA_ENUM_TYPE preconditioner_rescale_iterations;
INMOST_DATA_ENUM_TYPE preconditioner_condition_estimation;
INMOST_DATA_ENUM_TYPE preconditioner_adapt_ddpq_tolerance;
INMOST_DATA_ENUM_TYPE solver_gmres_substeps;
std::string return_reason;
void * solver_data;
void * matrix_data;
void * precond_data;
void * rhs_data;
void * solution_data;
Type _pack;
Solver(const Solver & other);// prohibit copy
Solver & operator =(Solver const & other); //prohibit assignment
public:
/// Retrive approximate condition number produced by INNER_MPTILUC.
/// The number is cond(L^-1).
INMOST_DATA_REAL_TYPE GetConditionNumberL();
/// Retrive approximate condition number produced by INNER_MPTILUC.
/// The number is cond(U^-1).
INMOST_DATA_REAL_TYPE GetConditionNumberU();
/// Set the solver parameter of the integer type.
/// You can find defaults for parameters in the top of the file inmost_solver.h.
///
/// Parameters:
/// - "maximum_iterations" - total number of iterations
/// - "schwartz_overlap" - number of overlapping levels for additive schwartz method,
/// works for:
/// INNER_ILU2, INNER_MLILUC
/// Trilinos_Aztec, Trilinos_Belos, Trilinos_ML, Trilinos_Ifpack
/// PETSc
/// - "gmres_substeps" - number of gmres steps performed after each bicgstab step,
/// works for:
/// INNER_ILU2, INNER_MLILUC
/// - "reorder_nonzeros" - place sparser rows at the beggining of matrix during reordering,
/// works for:
/// INNER_MLILUC
/// - "rescale_iterations" - number of iterations for two-side matrix rescaling,
/// works for:
/// INNER_ILU2, INNER_MLILUC
/// - "condition_estimation" - exploit condition estimation of inversed factors to adapt
/// drop and reuse tolerances,
/// works for:
/// INNER_MLILUC
/// - "adapt_ddpq_tolerance" - adapt ddpq tolerance depending from the complexity
/// of calculation of Schur complement,
/// works for:
/// INNER_MLILUC
void SetParameterEnum(std::string name, INMOST_DATA_ENUM_TYPE value);
/// Set the solver parameter of the real type.
/// You can find defaults for parameters in the top of the file inmost_solver.h.
///
/// Parameters:
/// - "absolute_tolerance" - iterative method will stop on i-th iteration
/// if ||A x(i)-b|| < absolute_tolerance
/// - "relative_tolerance" - iterative method will stop on i-th iteration
/// if ||A x(i)-b||/||A x(0) - b||
/// - "divergence_tolerance" - iterative method will fail if
/// ||A x(i) - b|| > divergence_tolerance
/// - "drop_tolerance" - tolerance for dropping values during incomplete factorization,
/// works for:
/// INNER_ILU2, INNER_MLILUC
/// Trilinos_Aztec, Trilinos_Ifpack
/// PETSc
/// - "reuse_tolerance" - tolerance for reusing values during incomplete factorization,
/// these values are used only during calculation of L and U factors
/// and/or Schur complement and discarded once factorization is done,
/// value should be less then "drop_tolerance",
/// typical value is drop_tolerance^2,
/// works for:
/// INNER_ILU2, INNER_MLILUC
/// - "ddpq_tolerance" - by this tolerance most diagonnaly-dominant elements will be selected
/// to form the next level of factorization, the closer the tolerance