1 /****************************************************************************** 2 * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other 3 * HYPRE Project Developers. See the top-level COPYRIGHT file for details. 4 * 5 * SPDX-License-Identifier: (Apache-2.0 OR MIT) 6 ******************************************************************************/ 7 8 #ifndef hypre_ParILU_DATA_HEADER 9 #define hypre_ParILU_DATA_HEADER 10 11 /*-------------------------------------------------------------------------- 12 * hypre_ParILUData 13 *--------------------------------------------------------------------------*/ 14 typedef struct hypre_ParILUData_struct 15 { 16 #ifdef HYPRE_USING_CUDA 17 /* Data slots for cusparse-based ilu0 */ 18 cusparseMatDescr_t matL_des;//lower tri with ones on diagonal 19 cusparseMatDescr_t matU_des;//upper tri 20 csrsv2Info_t matAL_info;//ILU info for L of A block (used in A-smoothing) 21 csrsv2Info_t matAU_info;//ILU info for U of A block 22 csrsv2Info_t matBL_info;//ILU info for L of B block 23 csrsv2Info_t matBU_info;//ILU info for U of B block 24 csrsv2Info_t matSL_info;//ILU info for L of S block 25 csrsv2Info_t matSU_info;//ILU info for U of S block 26 cusparseSolvePolicy_t ilu_solve_policy;//Use/Don't use level 27 void *ilu_solve_buffer;//working array on device memory 28 29 /* on GPU, we have to form E and F explicitly, since we don't have much control to it 30 * 31 */ 32 hypre_CSRMatrix *matALU_d;//the matrix holding ILU of A (for A-smoothing) 33 hypre_CSRMatrix *matBLU_d;//the matrix holding ILU of B 34 hypre_CSRMatrix *matSLU_d;//the matrix holding ILU of S 35 hypre_CSRMatrix *matE_d; 36 hypre_CSRMatrix *matF_d; 37 hypre_ParCSRMatrix *Aperm; 38 hypre_ParCSRMatrix *R; 39 hypre_ParCSRMatrix *P; 40 hypre_Vector *Ftemp_upper; 41 hypre_Vector *Utemp_lower; 42 HYPRE_Int *A_diag_fake;//fake diagonal, used to pretend that the diagonal matrix is empty 43 #endif 44 //general data 45 HYPRE_Int global_solver; 46 hypre_ParCSRMatrix *matA; 47 hypre_ParCSRMatrix *matL; 48 HYPRE_Real *matD; 49 hypre_ParCSRMatrix *matU; 50 hypre_ParCSRMatrix *matmL; 51 HYPRE_Real *matmD; 52 hypre_ParCSRMatrix *matmU; 53 hypre_ParCSRMatrix *matS; 54 HYPRE_Real *droptol;/* should be an array of 3 element, for B, (E and F), S respectively */ 55 HYPRE_Int lfil; 56 HYPRE_Int maxRowNnz; 57 HYPRE_Int *CF_marker_array; 58 HYPRE_Int *perm; 59 HYPRE_Int *qperm; 60 HYPRE_Real tol_ddPQ; 61 hypre_ParVector *F; 62 hypre_ParVector *U; 63 hypre_ParVector *residual; 64 HYPRE_Real *rel_res_norms; 65 HYPRE_Int num_iterations; 66 HYPRE_Real *l1_norms; 67 HYPRE_Real final_rel_residual_norm; 68 HYPRE_Real tol; 69 HYPRE_Real operator_complexity; 70 71 HYPRE_Int logging; 72 HYPRE_Int print_level; 73 HYPRE_Int max_iter; 74 75 HYPRE_Int ilu_type; 76 HYPRE_Int nLU; 77 HYPRE_Int nI; 78 79 /* used when schur block is formed */ 80 HYPRE_Int *u_end; 81 82 /* temp vectors for solve phase */ 83 hypre_ParVector *Utemp; 84 hypre_ParVector *Ftemp; 85 hypre_ParVector *Xtemp; 86 hypre_ParVector *Ytemp; 87 HYPRE_Real *uext; 88 HYPRE_Real *fext; 89 90 /* data structure sor solving Schur System */ 91 HYPRE_Solver schur_solver; 92 HYPRE_Solver schur_precond; 93 hypre_ParVector *rhs; 94 hypre_ParVector *x; 95 96 /* schur solver data */ 97 98 /* -> GENERAL-SLOTS */ 99 HYPRE_Int ss_logging; 100 HYPRE_Int ss_print_level; 101 102 /* -> SCHUR-GMRES */ 103 HYPRE_Int ss_kDim;/* max number of iterations for GMRES */ 104 HYPRE_Int ss_max_iter;/* max number of iterations for GMRES solve */ 105 HYPRE_Real ss_tol;/* stop iteration tol for GMRES */ 106 HYPRE_Real ss_absolute_tol;/* absolute tol for GMRES or tol for NSH solve */ 107 HYPRE_Int ss_rel_change; 108 109 /* -> SCHUR-NSH */ 110 HYPRE_Int ss_nsh_setup_max_iter;/* number of iterations for NSH inverse */ 111 HYPRE_Int ss_nsh_solve_max_iter;/* max number of iterations for NSH solve */ 112 HYPRE_Real ss_nsh_setup_tol;/* stop iteration tol for NSH inverse */ 113 HYPRE_Real ss_nsh_solve_tol;/* absolute tol for NSH solve */ 114 HYPRE_Int ss_nsh_max_row_nnz;/* max rows of nonzeros for NSH */ 115 HYPRE_Int ss_nsh_mr_col_version;/* MR column version setting in NSH */ 116 HYPRE_Int ss_nsh_mr_max_row_nnz;/* max rows for MR */ 117 HYPRE_Real *ss_nsh_droptol;/* droptol array for NSH */ 118 HYPRE_Int ss_nsh_mr_max_iter;/* max MR iteration */ 119 HYPRE_Real ss_nsh_mr_tol; 120 121 /* schur precond data */ 122 HYPRE_Int sp_ilu_type;/* ilu type is use ILU */ 123 HYPRE_Int sp_ilu_lfil;/* level of fill in for ILUK */ 124 HYPRE_Int sp_ilu_max_row_nnz;/* max rows for ILUT */ 125 /* droptol for ILUT or MR 126 * ILUT: [0], [1], [2] B, E&F, S respectively 127 * NSH: [0] for MR, [1] for NSH 128 */ 129 HYPRE_Real *sp_ilu_droptol;/* droptol array for ILUT */ 130 HYPRE_Int sp_print_level; 131 HYPRE_Int sp_max_iter;/* max precond iter or max MR iteration */ 132 HYPRE_Real sp_tol; 133 134 HYPRE_Int test_opt; 135 /* local reordering */ 136 HYPRE_Int reordering_type; 137 138 } hypre_ParILUData; 139 140 #define hypre_ParILUDataTestOption(ilu_data) ((ilu_data) -> test_opt) 141 142 #ifdef HYPRE_USING_CUDA 143 #define hypre_ParILUDataMatLMatrixDescription(ilu_data) ((ilu_data) -> matL_des) 144 #define hypre_ParILUDataMatUMatrixDescription(ilu_data) ((ilu_data) -> matU_des) 145 #define hypre_ParILUDataMatALILUSolveInfo(ilu_data) ((ilu_data) -> matAL_info) 146 #define hypre_ParILUDataMatAUILUSolveInfo(ilu_data) ((ilu_data) -> matAU_info) 147 #define hypre_ParILUDataMatBLILUSolveInfo(ilu_data) ((ilu_data) -> matBL_info) 148 #define hypre_ParILUDataMatBUILUSolveInfo(ilu_data) ((ilu_data) -> matBU_info) 149 #define hypre_ParILUDataMatSLILUSolveInfo(ilu_data) ((ilu_data) -> matSL_info) 150 #define hypre_ParILUDataMatSUILUSolveInfo(ilu_data) ((ilu_data) -> matSU_info) 151 #define hypre_ParILUDataILUSolveBuffer(ilu_data) ((ilu_data) -> ilu_solve_buffer) 152 #define hypre_ParILUDataILUSolvePolicy(ilu_data) ((ilu_data) -> ilu_solve_policy) 153 #define hypre_ParILUDataMatAILUDevice(ilu_data) ((ilu_data) -> matALU_d) 154 #define hypre_ParILUDataMatBILUDevice(ilu_data) ((ilu_data) -> matBLU_d) 155 #define hypre_ParILUDataMatSILUDevice(ilu_data) ((ilu_data) -> matSLU_d) 156 #define hypre_ParILUDataMatEDevice(ilu_data) ((ilu_data) -> matE_d) 157 #define hypre_ParILUDataMatFDevice(ilu_data) ((ilu_data) -> matF_d) 158 #define hypre_ParILUDataAperm(ilu_data) ((ilu_data) -> Aperm) 159 #define hypre_ParILUDataR(ilu_data) ((ilu_data) -> R) 160 #define hypre_ParILUDataP(ilu_data) ((ilu_data) -> P) 161 #define hypre_ParILUDataFTempUpper(ilu_data) ((ilu_data) -> Ftemp_upper) 162 #define hypre_ParILUDataUTempLower(ilu_data) ((ilu_data) -> Utemp_lower) 163 #define hypre_ParILUDataMatAFakeDiagonal(ilu_data) ((ilu_data) -> A_diag_fake) 164 #endif 165 166 #define hypre_ParILUDataGlobalSolver(ilu_data) ((ilu_data) -> global_solver) 167 #define hypre_ParILUDataMatA(ilu_data) ((ilu_data) -> matA) 168 #define hypre_ParILUDataMatL(ilu_data) ((ilu_data) -> matL) 169 #define hypre_ParILUDataMatD(ilu_data) ((ilu_data) -> matD) 170 #define hypre_ParILUDataMatU(ilu_data) ((ilu_data) -> matU) 171 #define hypre_ParILUDataMatLModified(ilu_data) ((ilu_data) -> matmL) 172 #define hypre_ParILUDataMatDModified(ilu_data) ((ilu_data) -> matmD) 173 #define hypre_ParILUDataMatUModified(ilu_data) ((ilu_data) -> matmU) 174 #define hypre_ParILUDataMatS(ilu_data) ((ilu_data) -> matS) 175 #define hypre_ParILUDataDroptol(ilu_data) ((ilu_data) -> droptol) 176 #define hypre_ParILUDataLfil(ilu_data) ((ilu_data) -> lfil) 177 #define hypre_ParILUDataMaxRowNnz(ilu_data) ((ilu_data) -> maxRowNnz) 178 #define hypre_ParILUDataCFMarkerArray(ilu_data) ((ilu_data) -> CF_marker_array) 179 #define hypre_ParILUDataPerm(ilu_data) ((ilu_data) -> perm) 180 #define hypre_ParILUDataPPerm(ilu_data) ((ilu_data) -> perm) 181 #define hypre_ParILUDataQPerm(ilu_data) ((ilu_data) -> qperm) 182 #define hypre_ParILUDataTolDDPQ(ilu_data) ((ilu_data) -> tol_ddPQ) 183 #define hypre_ParILUDataF(ilu_data) ((ilu_data) -> F) 184 #define hypre_ParILUDataU(ilu_data) ((ilu_data) -> U) 185 #define hypre_ParILUDataResidual(ilu_data) ((ilu_data) -> residual) 186 #define hypre_ParILUDataRelResNorms(ilu_data) ((ilu_data) -> rel_res_norms) 187 #define hypre_ParILUDataNumIterations(ilu_data) ((ilu_data) -> num_iterations) 188 #define hypre_ParILUDataL1Norms(ilu_data) ((ilu_data) -> l1_norms) 189 #define hypre_ParILUDataFinalRelResidualNorm(ilu_data) ((ilu_data) -> final_rel_residual_norm) 190 #define hypre_ParILUDataTol(ilu_data) ((ilu_data) -> tol) 191 #define hypre_ParILUDataOperatorComplexity(ilu_data) ((ilu_data) -> operator_complexity) 192 #define hypre_ParILUDataLogging(ilu_data) ((ilu_data) -> logging) 193 #define hypre_ParILUDataPrintLevel(ilu_data) ((ilu_data) -> print_level) 194 #define hypre_ParILUDataMaxIter(ilu_data) ((ilu_data) -> max_iter) 195 #define hypre_ParILUDataIluType(ilu_data) ((ilu_data) -> ilu_type) 196 #define hypre_ParILUDataNLU(ilu_data) ((ilu_data) -> nLU) 197 #define hypre_ParILUDataNI(ilu_data) ((ilu_data) -> nI) 198 #define hypre_ParILUDataUEnd(ilu_data) ((ilu_data) -> u_end) 199 #define hypre_ParILUDataXTemp(ilu_data) ((ilu_data) -> Xtemp) 200 #define hypre_ParILUDataYTemp(ilu_data) ((ilu_data) -> Ytemp) 201 #define hypre_ParILUDataUTemp(ilu_data) ((ilu_data) -> Utemp) 202 #define hypre_ParILUDataFTemp(ilu_data) ((ilu_data) -> Ftemp) 203 #define hypre_ParILUDataUExt(ilu_data) ((ilu_data) -> uext) 204 #define hypre_ParILUDataFExt(ilu_data) ((ilu_data) -> fext) 205 #define hypre_ParILUDataSchurSolver(ilu_data) ((ilu_data) -> schur_solver) 206 #define hypre_ParILUDataSchurPrecond(ilu_data) ((ilu_data) -> schur_precond) 207 #define hypre_ParILUDataRhs(ilu_data) ((ilu_data) -> rhs) 208 #define hypre_ParILUDataX(ilu_data) ((ilu_data) -> x) 209 #define hypre_ParILUDataReorderingType(ilu_data) ((ilu_data) -> reordering_type) 210 /* Schur System */ 211 #define hypre_ParILUDataSchurGMRESKDim(ilu_data) ((ilu_data) -> ss_kDim) 212 #define hypre_ParILUDataSchurGMRESMaxIter(ilu_data) ((ilu_data) -> ss_max_iter) 213 #define hypre_ParILUDataSchurGMRESTol(ilu_data) ((ilu_data) -> ss_tol) 214 #define hypre_ParILUDataSchurGMRESAbsoluteTol(ilu_data) ((ilu_data) -> ss_absolute_tol) 215 #define hypre_ParILUDataSchurGMRESRelChange(ilu_data) ((ilu_data) -> ss_rel_change) 216 #define hypre_ParILUDataSchurPrecondIluType(ilu_data) ((ilu_data) -> sp_ilu_type) 217 #define hypre_ParILUDataSchurPrecondIluLfil(ilu_data) ((ilu_data) -> sp_ilu_lfil) 218 #define hypre_ParILUDataSchurPrecondIluMaxRowNnz(ilu_data) ((ilu_data) -> sp_ilu_max_row_nnz) 219 #define hypre_ParILUDataSchurPrecondIluDroptol(ilu_data) ((ilu_data) -> sp_ilu_droptol) 220 #define hypre_ParILUDataSchurPrecondPrintLevel(ilu_data) ((ilu_data) -> sp_print_level) 221 #define hypre_ParILUDataSchurPrecondMaxIter(ilu_data) ((ilu_data) -> sp_max_iter) 222 #define hypre_ParILUDataSchurPrecondTol(ilu_data) ((ilu_data) -> sp_tol) 223 224 #define hypre_ParILUDataSchurNSHMaxNumIter(ilu_data) ((ilu_data) -> ss_nsh_setup_max_iter) 225 #define hypre_ParILUDataSchurNSHSolveMaxIter(ilu_data) ((ilu_data) -> ss_nsh_solve_max_iter) 226 #define hypre_ParILUDataSchurNSHTol(ilu_data) ((ilu_data) -> ss_nsh_setup_tol) 227 #define hypre_ParILUDataSchurNSHSolveTol(ilu_data) ((ilu_data) -> ss_nsh_solve_tol) 228 #define hypre_ParILUDataSchurNSHMaxRowNnz(ilu_data) ((ilu_data) -> ss_nsh_max_row_nnz) 229 #define hypre_ParILUDataSchurMRColVersion(ilu_data) ((ilu_data) -> ss_nsh_mr_col_version) 230 #define hypre_ParILUDataSchurMRMaxRowNnz(ilu_data) ((ilu_data) -> ss_nsh_mr_max_row_nnz) 231 #define hypre_ParILUDataSchurNSHDroptol(ilu_data) ((ilu_data) -> ss_nsh_droptol) 232 #define hypre_ParILUDataSchurMRMaxIter(ilu_data) ((ilu_data) -> ss_nsh_mr_max_iter) 233 #define hypre_ParILUDataSchurMRTol(ilu_data) ((ilu_data) -> ss_nsh_mr_tol) 234 235 #define hypre_ParILUDataSchurSolverLogging(ilu_data) ((ilu_data) -> ss_logging) 236 #define hypre_ParILUDataSchurSolverPrintLevel(ilu_data) ((ilu_data) -> ss_print_level) 237 238 #define FMRK -1 239 #define CMRK 1 240 #define UMRK 0 241 #define S_CMRK 2 242 243 #define FPT(i, bsize) (((i) % (bsize)) == FMRK) 244 #define CPT(i, bsize) (((i) % (bsize)) == CMRK) 245 246 #define MAT_TOL 1e-14 247 #define EXPAND_FACT 1.3 248 249 250 251 252 253 /* NSH data structure */ 254 255 typedef struct hypre_ParNSHData_struct 256 { 257 /* solver information */ 258 HYPRE_Int global_solver; 259 hypre_ParCSRMatrix *matA; 260 hypre_ParCSRMatrix *matM; 261 hypre_ParVector *F; 262 hypre_ParVector *U; 263 hypre_ParVector *residual; 264 HYPRE_Real *rel_res_norms; 265 HYPRE_Int num_iterations; 266 HYPRE_Real *l1_norms; 267 HYPRE_Real final_rel_residual_norm; 268 HYPRE_Real tol; 269 HYPRE_Real operator_complexity; 270 271 HYPRE_Int logging; 272 HYPRE_Int print_level; 273 HYPRE_Int max_iter; 274 275 /* common data slots */ 276 /* droptol[0]: droptol for MR 277 * droptol[1]: droptol for NSH 278 */ 279 HYPRE_Real *droptol; 280 HYPRE_Int own_droptol_data; 281 282 /* temp vectors for solve phase */ 283 hypre_ParVector *Utemp; 284 hypre_ParVector *Ftemp; 285 286 /* data slots for local MR */ 287 HYPRE_Int mr_max_iter; 288 HYPRE_Real mr_tol; 289 HYPRE_Int mr_max_row_nnz; 290 HYPRE_Int mr_col_version;/* global version or column version MR */ 291 292 /* data slots for global NSH */ 293 HYPRE_Int nsh_max_iter; 294 HYPRE_Real nsh_tol; 295 HYPRE_Int nsh_max_row_nnz; 296 }hypre_ParNSHData; 297 298 #define hypre_ParNSHDataGlobalSolver(nsh_data) ((nsh_data) -> global_solver) 299 #define hypre_ParNSHDataMatA(nsh_data) ((nsh_data) -> matA) 300 #define hypre_ParNSHDataMatM(nsh_data) ((nsh_data) -> matM) 301 #define hypre_ParNSHDataF(nsh_data) ((nsh_data) -> F) 302 #define hypre_ParNSHDataU(nsh_data) ((nsh_data) -> U) 303 #define hypre_ParNSHDataResidual(nsh_data) ((nsh_data) -> residual) 304 #define hypre_ParNSHDataRelResNorms(nsh_data) ((nsh_data) -> rel_res_norms) 305 #define hypre_ParNSHDataNumIterations(nsh_data) ((nsh_data) -> num_iterations) 306 #define hypre_ParNSHDataL1Norms(nsh_data) ((nsh_data) -> l1_norms) 307 #define hypre_ParNSHDataFinalRelResidualNorm(nsh_data) ((nsh_data) -> final_rel_residual_norm) 308 #define hypre_ParNSHDataTol(nsh_data) ((nsh_data) -> tol) 309 #define hypre_ParNSHDataOperatorComplexity(nsh_data) ((nsh_data) -> operator_complexity) 310 #define hypre_ParNSHDataLogging(nsh_data) ((nsh_data) -> logging) 311 #define hypre_ParNSHDataPrintLevel(nsh_data) ((nsh_data) -> print_level) 312 #define hypre_ParNSHDataMaxIter(nsh_data) ((nsh_data) -> max_iter) 313 #define hypre_ParNSHDataDroptol(nsh_data) ((nsh_data) -> droptol) 314 #define hypre_ParNSHDataOwnDroptolData(nsh_data) ((nsh_data) -> own_droptol_data) 315 #define hypre_ParNSHDataUTemp(nsh_data) ((nsh_data) -> Utemp) 316 #define hypre_ParNSHDataFTemp(nsh_data) ((nsh_data) -> Ftemp) 317 #define hypre_ParNSHDataMRMaxIter(nsh_data) ((nsh_data) -> mr_max_iter) 318 #define hypre_ParNSHDataMRTol(nsh_data) ((nsh_data) -> mr_tol) 319 #define hypre_ParNSHDataMRMaxRowNnz(nsh_data) ((nsh_data) -> mr_max_row_nnz) 320 #define hypre_ParNSHDataMRColVersion(nsh_data) ((nsh_data) -> mr_col_version) 321 #define hypre_ParNSHDataNSHMaxIter(nsh_data) ((nsh_data) -> nsh_max_iter) 322 #define hypre_ParNSHDataNSHTol(nsh_data) ((nsh_data) -> nsh_tol) 323 #define hypre_ParNSHDataNSHMaxRowNnz(nsh_data) ((nsh_data) -> nsh_max_row_nnz) 324 325 #define DIVIDE_TOL 1e-32 326 327 #ifdef HYPRE_USING_CUDA 328 HYPRE_Int hypre_ILUSolveCusparseLU(hypre_ParCSRMatrix *A, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, csrsv2Info_t matL_info, csrsv2Info_t matU_info, hypre_CSRMatrix *matLU_d, cusparseSolvePolicy_t ilu_solve_policy, void *ilu_solve_buffer, hypre_ParVector *f, hypre_ParVector *u, HYPRE_Int *perm, HYPRE_Int n, hypre_ParVector *ftemp, hypre_ParVector *utemp); 329 HYPRE_Int hypre_ILUSolveCusparseSchurGMRES(hypre_ParCSRMatrix *A, hypre_ParVector *f, hypre_ParVector *u, HYPRE_Int *perm, HYPRE_Int nLU, hypre_ParCSRMatrix *S, hypre_ParVector *ftemp, hypre_ParVector *utemp, HYPRE_Solver schur_solver, HYPRE_Solver schur_precond, hypre_ParVector *rhs, hypre_ParVector *x, HYPRE_Int *u_end, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, csrsv2Info_t matBL_info, csrsv2Info_t matBU_info, csrsv2Info_t matSL_info, csrsv2Info_t matSU_info, hypre_CSRMatrix *matBLU_d, hypre_CSRMatrix *matE_d, hypre_CSRMatrix *matF_d, cusparseSolvePolicy_t ilu_solve_policy, void *ilu_solve_buffer); 330 HYPRE_Int hypre_ILUSolveRAPGMRES(hypre_ParCSRMatrix *A, hypre_ParVector *f, hypre_ParVector *u, HYPRE_Int *perm, HYPRE_Int nLU, hypre_ParCSRMatrix *S, hypre_ParVector *ftemp, hypre_ParVector *utemp, hypre_ParVector *xtemp, hypre_ParVector *ytemp, HYPRE_Solver schur_solver, HYPRE_Solver schur_precond, hypre_ParVector *rhs, hypre_ParVector *x, HYPRE_Int *u_end, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, csrsv2Info_t matAL_info, csrsv2Info_t matAU_info, csrsv2Info_t matBL_info, csrsv2Info_t matBU_info, csrsv2Info_t matSL_info, csrsv2Info_t matSU_info, hypre_ParCSRMatrix *Aperm, hypre_CSRMatrix *matALU_d, hypre_CSRMatrix *matBLU_d, hypre_CSRMatrix *matE_d, hypre_CSRMatrix *matF_d, cusparseSolvePolicy_t ilu_solve_policy, void *ilu_solve_buffer, HYPRE_Int test_opt); 331 HYPRE_Int hypre_ParILUCusparseExtractDiagonalCSR(hypre_ParCSRMatrix *A, HYPRE_Int *perm, HYPRE_Int *rqperm, hypre_CSRMatrix **A_diagp); 332 HYPRE_Int hypre_ParILUCusparseILUExtractEBFC(hypre_CSRMatrix *A_diag, HYPRE_Int nLU, hypre_CSRMatrix **Bp, hypre_CSRMatrix **Cp, hypre_CSRMatrix **Ep, hypre_CSRMatrix **Fp); 333 HYPRE_Int HYPRE_ILUSetupCusparseCSRILU0(hypre_CSRMatrix *A, cusparseSolvePolicy_t ilu_solve_policy); 334 HYPRE_Int HYPRE_ILUSetupCusparseCSRILU0SetupSolve(hypre_CSRMatrix *A, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, cusparseSolvePolicy_t ilu_solve_policy, csrsv2Info_t *matL_infop, csrsv2Info_t *matU_infop, HYPRE_Int *buffer_sizep, void **bufferp); 335 HYPRE_Int hypre_ILUSetupILU0Device(hypre_ParCSRMatrix *A, HYPRE_Int *perm, HYPRE_Int *qperm, HYPRE_Int n, HYPRE_Int nLU, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, cusparseSolvePolicy_t ilu_solve_policy, void **bufferp, csrsv2Info_t *matBL_infop, csrsv2Info_t *matBU_infop, csrsv2Info_t *matSL_infop, csrsv2Info_t *matSU_infop, hypre_CSRMatrix **BLUptr, hypre_ParCSRMatrix **matSptr, hypre_CSRMatrix **Eptr, hypre_CSRMatrix **Fptr, HYPRE_Int **A_fake_diag_ip); 336 HYPRE_Int hypre_ILUSetupILUKDevice(hypre_ParCSRMatrix *A, HYPRE_Int lfil, HYPRE_Int *perm, HYPRE_Int *qperm, HYPRE_Int n, HYPRE_Int nLU, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, cusparseSolvePolicy_t ilu_solve_policy, void **bufferp, csrsv2Info_t *matBL_infop, csrsv2Info_t *matBU_infop, csrsv2Info_t *matSL_infop, csrsv2Info_t *matSU_infop, hypre_CSRMatrix **BLUptr, hypre_ParCSRMatrix **matSptr, hypre_CSRMatrix **Eptr, hypre_CSRMatrix **Fptr, HYPRE_Int **A_fake_diag_ip); 337 HYPRE_Int hypre_ILUSetupILUTDevice(hypre_ParCSRMatrix *A, HYPRE_Int lfil, HYPRE_Real *tol, HYPRE_Int *perm, HYPRE_Int *qperm, HYPRE_Int n, HYPRE_Int nLU, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, cusparseSolvePolicy_t ilu_solve_policy, void **bufferp, csrsv2Info_t *matBL_infop, csrsv2Info_t *matBU_infop, csrsv2Info_t *matSL_infop, csrsv2Info_t *matSU_infop, hypre_CSRMatrix **BLUptr, hypre_ParCSRMatrix **matSptr, hypre_CSRMatrix **Eptr, hypre_CSRMatrix **Fptr, HYPRE_Int **A_fake_diag_ip); 338 HYPRE_Int hypre_ParILURAPReorder(hypre_ParCSRMatrix *A, HYPRE_Int *perm, HYPRE_Int *rqperm, hypre_ParCSRMatrix **A_pq); 339 HYPRE_Int hypre_ILUSetupLDUtoCusparse(hypre_ParCSRMatrix *L, HYPRE_Real *D, hypre_ParCSRMatrix *U, hypre_ParCSRMatrix **LDUp); 340 HYPRE_Int hypre_ParILURAPBuildRP(hypre_ParCSRMatrix *A, hypre_ParCSRMatrix *BLUm, hypre_ParCSRMatrix* E, hypre_ParCSRMatrix *F, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, hypre_ParCSRMatrix **Rp, hypre_ParCSRMatrix **Pp); 341 HYPRE_Int hypre_ILUSetupRAPMILU0(hypre_ParCSRMatrix *A, hypre_ParCSRMatrix **ALUp, HYPRE_Int modified); 342 HYPRE_Int hypre_ILUSetupRAPILU0Device(hypre_ParCSRMatrix *A, HYPRE_Int *perm, HYPRE_Int n, HYPRE_Int nLU, cusparseMatDescr_t matL_des, cusparseMatDescr_t matU_des, cusparseSolvePolicy_t ilu_solve_policy, void **bufferp, csrsv2Info_t *matAL_infop, csrsv2Info_t *matAU_infop, csrsv2Info_t *matBL_infop, csrsv2Info_t *matBU_infop, csrsv2Info_t *matSL_infop, csrsv2Info_t *matSU_infop, hypre_ParCSRMatrix **Apermptr, hypre_ParCSRMatrix **matSptr, hypre_CSRMatrix **ALUptr, hypre_CSRMatrix **BLUptr, hypre_CSRMatrix **CLUptr, hypre_CSRMatrix **Eptr, hypre_CSRMatrix **Fptr, HYPRE_Int test_opt); 343 HYPRE_Int hypre_ParILUCusparseSchurGMRESDummySetup(void *a, void *b, void *c, void *d); 344 HYPRE_Int hypre_ParILUCusparseSchurGMRESDummySolve(void *ilu_vdata, void *ilu_vdata2, hypre_ParVector *f, hypre_ParVector *u); 345 HYPRE_Int hypre_ParILUCusparseSchurGMRESCommInfo(void *ilu_vdata, HYPRE_Int *my_id, HYPRE_Int *num_procs); 346 void *hypre_ParILUCusparseSchurGMRESMatvecCreate(void *ilu_vdata, void *x); 347 HYPRE_Int hypre_ParILUCusparseSchurGMRESMatvec(void *matvec_data, HYPRE_Complex alpha, void *ilu_vdata, void *x, HYPRE_Complex beta, void *y); 348 HYPRE_Int hypre_ParILUCusparseSchurGMRESMatvecDestroy(void *matvec_data ); 349 HYPRE_Int hypre_ParILURAPSchurGMRESDummySetup(void *a, void *b, void *c, void *d); 350 HYPRE_Int hypre_ParILURAPSchurGMRESSolve(void *ilu_vdata, void *ilu_vdata2, hypre_ParVector *f, hypre_ParVector *u); 351 void *hypre_ParILURAPSchurGMRESMatvecCreate(void *ilu_vdata, void *x); 352 HYPRE_Int hypre_ParILURAPSchurGMRESMatvec(void *matvec_data, HYPRE_Complex alpha, void *ilu_vdata, void *x, HYPRE_Complex beta, void *y); 353 HYPRE_Int hypre_ParILURAPSchurGMRESMatvecDestroy(void *matvec_data ); 354 #endif 355 356 #endif /* #ifndef hypre_ParILU_DATA_HEADER */ 357 358