ezp
lightweight C++ wrapper for selected distributed solvers for linear systems
mumps.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  ******************************************************************************/
115 #ifndef MUMPS_PARSER_HPP
116 #define MUMPS_PARSER_HPP
117 
118 #include "mumps.hpp"
119 #include "parser.hpp"
120 
121 namespace ezp {
122  template<data_t DT, index_t IT> auto mumps_set(const std::string& command, mumps<DT, IT>& solver) {
123  for(const auto& [token, value] : detail::parse(command)) {
124  if(token == "--output-error-message") solver.icntl_output_error_message(value);
125  else if(token == "--output-diagnostic-statistics-warning") solver.icntl_output_diagnostic_statistics_warning(value);
126  else if(token == "--output-global-information") solver.icntl_output_global_information(value);
127  else if(token == "--printing-level") solver.icntl_printing_level(value);
128  else if(token == "--permutation-and-scaling") solver.icntl_permutation_and_scaling(value);
129  else if(token == "--symmetric-permutation") solver.icntl_symmetric_permutation(value);
130  else if(token == "--scaling-strategy") solver.icntl_scaling_strategy(value);
131  else if(token == "--transpose-matrix") solver.icntl_transpose_matrix(value);
132  else if(token == "--iterative-refinement") solver.icntl_iterative_refinement(value);
133  else if(token == "--error-analysis") solver.icntl_error_analysis(value);
134  else if(token == "--ordering-strategy") solver.icntl_ordering_strategy(value);
135  else if(token == "--root-parallelism") solver.icntl_root_parallelism(value);
136  else if(token == "--working-space-percentage-increase") solver.icntl_working_space_percentage_increase(value);
137  else if(token == "--compression-block-format") solver.icntl_compression_block_format(value);
138  else if(token == "--openmp-threads") solver.icntl_openmp_threads(value);
139  else if(token == "--distribution-strategy-input") solver.icntl_distribution_strategy_input(value);
140  else if(token == "--schur-complement") solver.icntl_schur_complement(value);
141  else if(token == "--distribution-strategy-solution") solver.icntl_distribution_strategy_solution(value);
142  else if(token == "--out-of-core") solver.icntl_out_of_core(value);
143  else if(token == "--maximum-working-memory") solver.icntl_maximum_working_memory(value);
144  else if(token == "--null-pivot-row-detection") solver.icntl_null_pivot_row_detection(value);
145  else if(token == "--deficient-and-null-space-basis") solver.icntl_deficient_and_null_space_basis(value);
146  else if(token == "--schur-complement-solution") solver.icntl_schur_complement_solution(value);
147  else if(token == "--rhs-block-size") solver.icntl_rhs_block_size(value);
148  else if(token == "--ordering-computation") solver.icntl_ordering_computation(value);
149  else if(token == "--inverse-computation") solver.icntl_inverse_computation(value);
150  else if(token == "--forward-elimination") solver.icntl_forward_elimination(value);
151  else if(token == "--determinant-computation") solver.icntl_determinant_computation(value);
152  else if(token == "--out-of-core-file") solver.icntl_out_of_core_file(value);
153  else if(token == "--blr") solver.icntl_blr(value);
154  else if(token == "--blr-variant") solver.icntl_blr_variant(value);
155  else if(token == "--blr-compression") solver.icntl_blr_compression(value);
156  else if(token == "--lu-compression-rate") solver.icntl_lu_compression_rate(value);
157  else if(token == "--block-compression-rate") solver.icntl_block_compression_rate(value);
158  else if(token == "--tree-parallelism") solver.icntl_tree_parallelism(value);
159  else if(token == "--compact-working-space") solver.icntl_compact_working_space(value);
160  else if(token == "--rank-revealing-factorization") solver.icntl_rank_revealing_factorization(value);
161  else if(token == "--symbolic-factorization") solver.icntl_symbolic_factorization(value);
162  }
163  }
164 } // namespace ezp
165 
166 #endif
167 
Solver for general sparse matrices.