Lines Matching defs:solver
83 int best_time_id; // id of the best solver for the current system
107 out <<" <SOLVER ID='" << EIGEN_UMFPACK << "'>\n";
110 out << " </SOLVER> \n";
113 out <<" <SOLVER ID='" << EIGEN_SUPERLU << "'>\n";
116 out << " </SOLVER> \n";
119 out <<" <SOLVER ID='" << EIGEN_CHOLMOD_SIMPLICIAL_LLT << "'>\n";
122 out << " </SOLVER> \n";
124 out <<" <SOLVER ID='" << EIGEN_CHOLMOD_SUPERNODAL_LLT << "'>\n";
127 out << " </SOLVER> \n";
129 out <<" <SOLVER ID='" << EIGEN_CHOLMOD_LDLT << "'>\n";
132 out << " </SOLVER> \n";
135 out <<" <SOLVER ID='" << EIGEN_PARDISO << "'>\n";
138 out << " </SOLVER> \n";
140 out <<" <SOLVER ID='" << EIGEN_PARDISO_LLT << "'>\n";
143 out << " </SOLVER> \n";
145 out <<" <SOLVER ID='" << EIGEN_PARDISO_LDLT << "'>\n";
148 out << " </SOLVER> \n";
151 out <<" <SOLVER ID='" << EIGEN_PASTIX << "'>\n";
154 out << " </SOLVER> \n";
156 out <<" <SOLVER ID='" << EIGEN_PASTIX_LLT << "'>\n";
159 out << " </SOLVER> \n";
161 out <<" <SOLVER ID='" << EIGEN_PASTIX_LDLT << "'>\n";
164 out << " </SOLVER> \n";
167 out <<" <SOLVER ID='" << EIGEN_BICGSTAB << "'>\n";
170 out << " </SOLVER> \n";
172 out <<" <SOLVER ID='" << EIGEN_BICGSTAB_ILUT << "'>\n";
175 out << " </SOLVER> \n";
177 out <<" <SOLVER ID='" << EIGEN_GMRES_ILUT << "'>\n";
180 out << " </SOLVER> \n";
182 out <<" <SOLVER ID='" << EIGEN_SIMPLICIAL_LDLT << "'>\n";
185 out << " </SOLVER> \n";
187 out <<" <SOLVER ID='" << EIGEN_SIMPLICIAL_LLT << "'>\n";
190 out << " </SOLVER> \n";
192 out <<" <SOLVER ID='" << EIGEN_CG << "'>\n";
195 out << " </SOLVER> \n";
197 out <<" <SOLVER ID='" << EIGEN_SPARSELU_COLAMD << "'>\n";
200 out << " </SOLVER> \n";
203 out <<" <SOLVER ID='" << EIGEN_SPARSELU_METIS << "'>\n";
206 out << " </SOLVER> \n";
213 template<typename Solver, typename Scalar>
214 void call_solver(Solver &solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX,std::ofstream& statbuf)
225 solver.compute(A);
226 if (solver.info() != Success)
228 std::cerr << "Solver failed ... \n";
239 x = solver.solve(b);
240 if (solver.info() == NumericalIssue)
242 std::cerr << "Solver failed ... \n";
278 template<typename Solver, typename Scalar>
279 void call_directsolver(Solver& solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX, std::string& statFile)
283 call_solver(solver, solver_id, A, b, refX,statbuf);
288 template<typename Solver, typename Scalar>
289 void call_itersolver(Solver &solver, const int solver_id, const typename Solver::MatrixType& A, const Matrix<Scalar, Dynamic, 1>& b, const Matrix<Scalar, Dynamic, 1>& refX, std::string& statFile)
291 solver.setTolerance(RelErr);
292 solver.setMaxIterations(MaximumIters);
296 call_solver(solver, solver_id, A, b, refX,statbuf);
297 statbuf << " <ITER> "<< solver.iterations() << "</ITER>\n";
299 std::cout << "ITERATIONS : " << solver.iterations() <<"\n\n\n";
315 UmfPackLU<SpMat> solver;
316 call_directsolver(solver, EIGEN_UMFPACK, A, b, refX,statFile);
323 SuperLU<SpMat> solver;
324 call_directsolver(solver, EIGEN_SUPERLU, A, b, refX,statFile);
332 PastixLU<SpMat> solver;
333 call_directsolver(solver, EIGEN_PASTIX, A, b, refX,statFile) ;
341 PardisoLU<SpMat> solver;
342 call_directsolver(solver, EIGEN_PARDISO, A, b, refX,statFile);
348 SparseLU<SpMat, COLAMDOrdering<int> > solver;
349 call_directsolver(solver, EIGEN_SPARSELU_COLAMD, A, b, refX, statFile);
354 SparseLU<SpMat, MetisOrdering<int> > solver;
355 call_directsolver(solver, EIGEN_SPARSELU_METIS, A, b, refX, statFile);
362 BiCGSTAB<SpMat> solver;
363 call_itersolver(solver, EIGEN_BICGSTAB, A, b, refX,statFile);
368 BiCGSTAB<SpMat, IncompleteLUT<Scalar> > solver;
369 call_itersolver(solver, EIGEN_BICGSTAB_ILUT, A, b, refX,statFile);
376 // GMRES<SpMat> solver;
377 // call_itersolver(solver, EIGEN_GMRES, A, b, refX,statFile);
382 GMRES<SpMat, IncompleteLUT<Scalar> > solver;
383 call_itersolver(solver, EIGEN_GMRES_ILUT, A, b, refX,statFile);
392 SimplicialLDLT<SpMat, Lower> solver;
393 call_directsolver(solver, EIGEN_SIMPLICIAL_LDLT, A, b, refX,statFile);
400 CholmodDecomposition<SpMat, Lower> solver;
401 solver.setMode(CholmodLDLt);
402 call_directsolver(solver,EIGEN_CHOLMOD_LDLT, A, b, refX,statFile);
410 PastixLDLT<SpMat, Lower> solver;
411 call_directsolver(solver,EIGEN_PASTIX_LDLT, A, b, refX,statFile);
419 PardisoLDLT<SpMat, Lower> solver;
420 call_directsolver(solver,EIGEN_PARDISO_LDLT, A, b, refX,statFile);
432 SimplicialLLT<SpMat, Lower> solver;
433 call_directsolver(solver,EIGEN_SIMPLICIAL_LLT, A, b, refX,statFile);
441 CholmodDecomposition<SpMat, Lower> solver;
442 solver.setMode(CholmodSupernodalLLt);
443 call_directsolver(solver,EIGEN_CHOLMOD_SUPERNODAL_LLT, A, b, refX,statFile);
446 solver.setMode(CholmodSimplicialLLt);
447 call_directsolver(solver,EIGEN_CHOLMOD_SIMPLICIAL_LLT, A, b, refX,statFile);
455 PastixLLT<SpMat, Lower> solver;
456 call_directsolver(solver,EIGEN_PASTIX_LLT, A, b, refX,statFile);
464 PardisoLLT<SpMat, Lower> solver;
465 call_directsolver(solver,EIGEN_PARDISO_LLT, A, b, refX,statFile);
472 ConjugateGradient<SpMat, Lower> solver;
473 call_itersolver(solver,EIGEN_CG, A, b, refX,statFile);
478 // ConjugateGradient<SpMat, Lower, IdentityPreconditioner> solver;
479 // call_itersolver(solver,EIGEN_CG_PRECOND, A, b, refX,statFile);