Lines Matching refs:dir
42 PC_LU *dir = (PC_LU *)pc->data; in PCSetUp_LU() local
49 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_LU()
55 if (dir->hdr.inplace) { in PCSetUp_LU()
60 if (dir->row && dir->col && dir->row != dir->col) PetscCall(ISDestroy(&dir->row)); in PCSetUp_LU()
61 PetscCall(ISDestroy(&dir->col)); in PCSetUp_LU()
64 PetscCall(MatGetOrdering(pc->pmat, ((PC_Factor *)dir)->ordering, &dir->row, &dir->col)); in PCSetUp_LU()
65 PetscCall(MatLUFactor(pc->pmat, dir->row, dir->col, &((PC_Factor *)dir)->info)); in PCSetUp_LU()
72 ((PC_Factor *)dir)->fact = pc->pmat; in PCSetUp_LU()
80 PetscCall(MatFactorGetCanUseOrdering(((PC_Factor *)dir)->fact, &canuseordering)); in PCSetUp_LU()
85 PetscCall(PetscStrcmp(((PC_Factor *)dir)->ordering, MATORDERINGEXTERNAL, &external)); in PCSetUp_LU()
87 PetscCall(MatGetOrdering(pc->pmat, ((PC_Factor *)dir)->ordering, &dir->row, &dir->col)); in PCSetUp_LU()
88 …if (dir->nonzerosalongdiagonal) PetscCall(MatReorderForNonzeroDiagonal(pc->pmat, dir->nonzerosalon… in PCSetUp_LU()
91 …PetscCall(MatLUFactorSymbolic(((PC_Factor *)dir)->fact, pc->pmat, dir->row, dir->col, &((PC_Factor… in PCSetUp_LU()
92 PetscCall(MatGetInfo(((PC_Factor *)dir)->fact, MAT_LOCAL, &info)); in PCSetUp_LU()
93 dir->hdr.actualfill = info.fill_ratio_needed; in PCSetUp_LU()
97 PetscCall(MatDestroy(&((PC_Factor *)dir)->fact)); in PCSetUp_LU()
99 if (!dir->hdr.reuseordering) { in PCSetUp_LU()
100 PetscCall(MatFactorGetCanUseOrdering(((PC_Factor *)dir)->fact, &canuseordering)); in PCSetUp_LU()
104 if (dir->row && dir->col && dir->row != dir->col) PetscCall(ISDestroy(&dir->row)); in PCSetUp_LU()
105 PetscCall(ISDestroy(&dir->col)); in PCSetUp_LU()
107 PetscCall(PetscStrcmp(((PC_Factor *)dir)->ordering, MATORDERINGEXTERNAL, &external)); in PCSetUp_LU()
109 PetscCall(MatGetOrdering(pc->pmat, ((PC_Factor *)dir)->ordering, &dir->row, &dir->col)); in PCSetUp_LU()
110 …if (dir->nonzerosalongdiagonal) PetscCall(MatReorderForNonzeroDiagonal(pc->pmat, dir->nonzerosalon… in PCSetUp_LU()
114 …PetscCall(MatLUFactorSymbolic(((PC_Factor *)dir)->fact, pc->pmat, dir->row, dir->col, &((PC_Factor… in PCSetUp_LU()
115 PetscCall(MatGetInfo(((PC_Factor *)dir)->fact, MAT_LOCAL, &info)); in PCSetUp_LU()
116 dir->hdr.actualfill = info.fill_ratio_needed; in PCSetUp_LU()
118 PetscCall(MatFactorGetError(((PC_Factor *)dir)->fact, &err)); in PCSetUp_LU()
120 PetscCall(MatFactorClearError(((PC_Factor *)dir)->fact)); in PCSetUp_LU()
124 PetscCall(MatFactorGetError(((PC_Factor *)dir)->fact, &err)); in PCSetUp_LU()
130 PetscCall(MatLUFactorNumeric(((PC_Factor *)dir)->fact, pc->pmat, &((PC_Factor *)dir)->info)); in PCSetUp_LU()
131 PetscCall(MatFactorGetError(((PC_Factor *)dir)->fact, &err)); in PCSetUp_LU()
140 PetscCall(MatFactorGetSolverType(((PC_Factor *)dir)->fact, &solverpackage)); in PCSetUp_LU()
148 PC_LU *dir = (PC_LU *)pc->data; in PCReset_LU() local
151 …if (!dir->hdr.inplace && ((PC_Factor *)dir)->fact) PetscCall(MatDestroy(&((PC_Factor *)dir)->fact)… in PCReset_LU()
152 if (dir->row && dir->col && dir->row != dir->col) PetscCall(ISDestroy(&dir->row)); in PCReset_LU()
153 PetscCall(ISDestroy(&dir->col)); in PCReset_LU()
159 PC_LU *dir = (PC_LU *)pc->data; in PCDestroy_LU() local
163 PetscCall(PetscFree(((PC_Factor *)dir)->ordering)); in PCDestroy_LU()
164 PetscCall(PetscFree(((PC_Factor *)dir)->solvertype)); in PCDestroy_LU()
172 PC_LU *dir = (PC_LU *)pc->data; in PCApply_LU() local
175 if (dir->hdr.inplace) { in PCApply_LU()
178 PetscCall(MatSolve(((PC_Factor *)dir)->fact, x, y)); in PCApply_LU()
185 PC_LU *dir = (PC_LU *)pc->data; in PCMatApply_LU() local
188 if (dir->hdr.inplace) { in PCMatApply_LU()
191 PetscCall(MatMatSolve(((PC_Factor *)dir)->fact, X, Y)); in PCMatApply_LU()
198 PC_LU *dir = (PC_LU *)pc->data; in PCApplyTranspose_LU() local
201 if (dir->hdr.inplace) { in PCApplyTranspose_LU()
204 PetscCall(MatSolveTranspose(((PC_Factor *)dir)->fact, x, y)); in PCApplyTranspose_LU()
211 PC_LU *dir = (PC_LU *)pc->data; in PCMatApplyTranspose_LU() local
214 if (dir->hdr.inplace) { in PCMatApplyTranspose_LU()
217 PetscCall(MatMatSolveTranspose(((PC_Factor *)dir)->fact, X, Y)); in PCMatApplyTranspose_LU()
262 PC_LU *dir; in PCCreate_LU() local
265 PetscCall(PetscNew(&dir)); in PCCreate_LU()
266 pc->data = (void *)dir; in PCCreate_LU()
268 dir->nonzerosalongdiagonal = PETSC_FALSE; in PCCreate_LU()
270 ((PC_Factor *)dir)->info.fill = 5.0; in PCCreate_LU()
271 …((PC_Factor *)dir)->info.dtcol = 1.e-6; /* default to pivoting; this is only thing PETSc LU su… in PCCreate_LU()
272 ((PC_Factor *)dir)->info.shifttype = (PetscReal)MAT_SHIFT_NONE; in PCCreate_LU()
273 dir->col = NULL; in PCCreate_LU()
274 dir->row = NULL; in PCCreate_LU()