37 INFO(
"------------------------------------------------------------------");
38 INFO(
"*** LIS solver computation");
42 int ierr = lis_solver_create(&solver);
49 INFO(
"-> number of threads: {:d}", (
int)omp_get_max_threads());
53 ierr = lis_solver_get_precon(solver, &precon);
56 INFO(
"-> precon: {:d}", precon);
60 ierr = lis_solver_get_solver(solver, &slv);
63 INFO(
"-> solver: {:d}", slv);
73 LIS_INT linear_solver_status;
74 ierr = lis_solver_get_status(solver, &linear_solver_status);
78 INFO(
"-> status: {:d}", linear_solver_status);
82 ierr = lis_solver_get_iter(solver, &iter);
86 INFO(
"-> iteration: {:d}", iter);
90 ierr = lis_solver_get_residualnorm(solver, &resid);
93 INFO(
"-> residual: {:g}", resid);
96 double time, itime, ptime, p_ctime, p_itime;
97 ierr = lis_solver_get_timeex(solver, &time, &itime, &ptime, &p_ctime,
101 INFO(
"-> time total (s): {:g}", time);
102 INFO(
"-> time iterations (s): {:g}", itime);
103 INFO(
"-> time preconditioning (s): {:g}", ptime);
104 INFO(
"-> time precond. create (s): {:g}", p_ctime);
105 INFO(
"-> time precond. iter (s): {:g}", p_itime);
109 ierr = lis_solver_destroy(solver);
112 INFO(
"------------------------------------------------------------------");
114 return linear_solver_status == LIS_SUCCESS;
Definition of the LisLinearSolver class.
Definition of the LisMatrix class.
Definition of the LisVector class.
void INFO(char const *fmt, Args const &... args)
bool solve(LisMatrix &A, LisVector &b, LisVector &x)
LisLinearSolver(const std::string solver_name="", BaseLib::ConfigTree const *const option=nullptr)
LisMatrix is a wrapper class for matrix types of the linear iterative solvers library.
LIS_MATRIX & getRawMatrix()
return a raw Lis matrix object
Lis vector wrapper class.
LIS_VECTOR & getRawVector()
return a raw Lis vector object
bool checkLisError(int err)
bool finalizeMatrixAssembly(MAT_T &)
std::string option_string_