ezp
lightweight C++ wrapper for selected distributed solvers for linear systems
Loading...
Searching...
No Matches
pardiso.parser.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (C) 2025-2026 Theodore Chang
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
69#ifndef PARDISO_PARSER_HPP
70#define PARDISO_PARSER_HPP
71
72#ifdef EZP_MKL
73
74#include "pardiso.hpp"
75#include "parser.hpp"
76
77namespace ezp {
78 template<data_t DT, index_t IT> auto pardiso_set(const std::string& command, pardiso<DT, IT>& solver) {
79 for(const auto& [token, value] : detail::parse(command)) {
80 if(token == "--default-value") solver.iparm_default_value(value);
81 else if(token == "--reducing-ordering") solver.iparm_reducing_ordering(value);
82 else if(token == "--user-permutation") solver.iparm_user_permutation(value);
83 else if(token == "--iterative-refinement") solver.iparm_iterative_refinement(value);
84 else if(token == "--pivoting-perturbation") solver.iparm_pivoting_perturbation(value);
85 else if(token == "--scaling") solver.iparm_scaling(value);
86 else if(token == "--transpose-matrix") solver.iparm_transpose_matrix(value);
87 else if(token == "--weighted-matching") solver.iparm_weighted_matching(value);
88 else if(token == "--nnz-factor") solver.iparm_nnz_factor(value);
89 else if(token == "--pivoting-type") solver.iparm_pivoting_type(value);
90 else if(token == "--matrix-checker") solver.iparm_matrix_checker(value);
91 else if(token == "--partial-solve") solver.iparm_partial_solve(value);
92 else if(token == "--zero-based-indexing") solver.iparm_zero_based_indexing(value);
93 else if(token == "--schur-complement") solver.iparm_schur_complement(value);
94 else if(token == "--out-of-core") solver.iparm_out_of_core(value);
95 }
96 }
97} // namespace ezp
98
99#endif
100
101#endif
102
Solver for general sparse matrices.