| /petsc/include/ |
| H A D | petscpc.h | 11 /* SUBMANSEC = PC */ 44 PETSC_EXTERN PetscErrorCode PCCreate(MPI_Comm, PC *); 45 PETSC_EXTERN PetscErrorCode PCSetType(PC, PCType); 46 PETSC_EXTERN PetscErrorCode PCGetType(PC, PCType *); 47 PETSC_EXTERN PetscErrorCode PCSetUp(PC); 49 PETSC_EXTERN PetscErrorCode PCSetKSPNestLevel(PC, PetscInt); 50 PETSC_EXTERN PetscErrorCode PCGetKSPNestLevel(PC, PetscInt *); 52 PETSC_EXTERN PetscErrorCode PCSetFailedReason(PC, PCFailedReason); 53 PETSC_EXTERN PetscErrorCode PCGetFailedReason(PC, PCFailedReason *); 54 …GetFailedReason()", ) static inline PetscErrorCode PCGetSetUpFailedReason(PC pc, PCFailedReason *r… in PCGetSetUpFailedReason() argument [all …]
|
| /petsc/src/ksp/pc/impls/shell/ |
| H A D | shellpc.c | 11 PetscErrorCode (*destroy)(PC); 12 PetscErrorCode (*setup)(PC); 13 PetscErrorCode (*apply)(PC, Vec, Vec); 14 PetscErrorCode (*matapply)(PC, Mat, Mat); 15 PetscErrorCode (*applysymmetricleft)(PC, Vec, Vec); 16 PetscErrorCode (*applysymmetricright)(PC, Vec, Vec); 17 PetscErrorCode (*applyBA)(PC, PCSide, Vec, Vec, Vec); 18 PetscErrorCode (*presolve)(PC, KSP, Vec, Vec); 19 PetscErrorCode (*postsolve)(PC, KSP, Vec, Vec); 20 PetscErrorCode (*view)(PC, PetscViewer); [all …]
|
| /petsc/src/ksp/pc/impls/shell/ftn-custom/ |
| H A D | zshellpcf.c | 32 static PetscErrorCode ourshellapply(PC pc, Vec x, Vec y) in ourshellapply() argument 34 …FortranVoidFunction((*(void (*)(PC *, Vec *, Vec *, PetscErrorCode *))(((PetscObject)pc)->fortran_… in ourshellapply() 38 static PetscErrorCode ourshellapplysymmetricleft(PC pc, Vec x, Vec y) in ourshellapplysymmetricleft() argument 40 …FortranVoidFunction((*(void (*)(PC *, Vec *, Vec *, PetscErrorCode *))(((PetscObject)pc)->fortran_… in ourshellapplysymmetricleft() 44 static PetscErrorCode ourshellapplysymmetricright(PC pc, Vec x, Vec y) in ourshellapplysymmetricright() argument 46 …FortranVoidFunction((*(void (*)(PC *, Vec *, Vec *, PetscErrorCode *))(((PetscObject)pc)->fortran_… in ourshellapplysymmetricright() 50 static PetscErrorCode ourshellapplyctx(PC pc, Vec x, Vec y) in ourshellapplyctx() argument 53 PetscCall(PCShellGetContext(pc, &ctx)); in ourshellapplyctx() 54 …ranVoidFunction((*(void (*)(PC *, void *, Vec *, Vec *, PetscErrorCode *))(((PetscObject)pc)->fort… in ourshellapplyctx() 58 static PetscErrorCode ourshellapplyba(PC pc, PCSide side, Vec x, Vec y, Vec work) in ourshellapplyba() argument [all …]
|
| /petsc/src/ksp/pc/interface/ |
| H A D | precon.c | 2 The PC (preconditioner) interface routines, callable by users. 14 PETSC_INTERN PetscErrorCode PCGetDefaultType_Private(PC pc, const char *type[]) in PCGetDefaultType_Private() argument 20 PetscCallMPI(MPI_Comm_size(PetscObjectComm((PetscObject)pc), &size)); in PCGetDefaultType_Private() 21 if (pc->pmat) { in PCGetDefaultType_Private() 22 PetscCall(MatHasOperation(pc->pmat, MATOP_GET_DIAGONAL_BLOCK, &hasopblock)); in PCGetDefaultType_Private() 23 PetscCall(MatHasOperation(pc->pmat, MATOP_SOLVE, &hasopsolve)); in PCGetDefaultType_Private() 25 PetscCall(MatGetFactorAvailable(pc->pmat, "petsc", MAT_FACTOR_ICC, &flg1)); in PCGetDefaultType_Private() 26 PetscCall(MatGetFactorAvailable(pc->pmat, "petsc", MAT_FACTOR_ILU, &flg2)); in PCGetDefaultType_Private() 27 PetscCall(MatIsSymmetricKnown(pc->pmat, &set, &flg3)); in PCGetDefaultType_Private() 28 …PetscCall(PetscObjectTypeCompareAny((PetscObject)pc->pmat, &isnormal, MATNORMAL, MATNORMALHERMITIA… in PCGetDefaultType_Private() [all …]
|
| H A D | pcset.c | 2 Routines to set PC methods and options. 10 Contains the list of registered PC routines 15 PCSetType - Builds `PC` for a particular preconditioner type 20 + pc - the preconditioner context 24 . -pc_type <type> - Sets `PC` type 28 then set the `PC` type from the options database rather than by using 46 PetscErrorCode PCSetType(PC pc, PCType type) in PCSetType() argument 49 PetscErrorCode (*r)(PC); in PCSetType() 52 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCSetType() 55 PetscCall(PetscObjectTypeCompare((PetscObject)pc, type, &match)); in PCSetType() [all …]
|
| H A D | pcregis.c | 3 PETSC_EXTERN PetscErrorCode PCCreate_Jacobi(PC); 4 PETSC_EXTERN PetscErrorCode PCCreate_BJacobi(PC); 5 PETSC_EXTERN PetscErrorCode PCCreate_PBJacobi(PC); 6 PETSC_EXTERN PetscErrorCode PCCreate_VPBJacobi(PC); 7 PETSC_EXTERN PetscErrorCode PCCreate_ILU(PC); 8 PETSC_EXTERN PetscErrorCode PCCreate_None(PC); 9 PETSC_EXTERN PetscErrorCode PCCreate_LU(PC); 10 PETSC_EXTERN PetscErrorCode PCCreate_QR(PC); 11 PETSC_EXTERN PetscErrorCode PCCreate_SOR(PC); 12 PETSC_EXTERN PetscErrorCode PCCreate_Shell(PC); [all …]
|
| /petsc/src/ksp/pc/impls/factor/ |
| H A D | factor.c | 1 #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ 7 PetscErrorCode PCFactorSetDefaultOrdering_Factor(PC pc) in PCFactorSetDefaultOrdering_Factor() argument 13 if (pc->pmat) { in PCFactorSetDefaultOrdering_Factor() 14 PetscCall(PCGetOptionsPrefix(pc, &prefix)); in PCFactorSetDefaultOrdering_Factor() 15 PetscCall(MatSetOptionsPrefixFactor(pc->pmat, prefix)); in PCFactorSetDefaultOrdering_Factor() 16 PC_Factor *fact = (PC_Factor *)pc->data; in PCFactorSetDefaultOrdering_Factor() 17 …PetscCall(MatSolverTypeGet(fact->solvertype, ((PetscObject)pc->pmat)->type_name, fact->factortype,… in PCFactorSetDefaultOrdering_Factor() 22 PetscCall(MatGetFactor(pc->pmat, fact->solvertype, fact->factortype, &fact->fact)); in PCFactorSetDefaultOrdering_Factor() 30 PetscCall(MatGetFactor(pc->pmat, fact->solvertype, fact->factortype, &B)); in PCFactorSetDefaultOrdering_Factor() 49 static PetscErrorCode PCFactorSetReuseOrdering_Factor(PC pc, PetscBool flag) in PCFactorSetReuseOrdering_Factor() argument [all …]
|
| H A D | factimpl.c | 1 #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ 3 PetscErrorCode PCFactorSetUpMatSolverType_Factor(PC pc) in PCFactorSetUpMatSolverType_Factor() argument 5 PC_Factor *icc = (PC_Factor *)pc->data; in PCFactorSetUpMatSolverType_Factor() 8 …PetscCheck(pc->pmat, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "You can only cal… in PCFactorSetUpMatSolverType_Factor() 9 if (!icc->fact) PetscCall(MatGetFactor(pc->pmat, icc->solvertype, icc->factortype, &icc->fact)); in PCFactorSetUpMatSolverType_Factor() 10 …PetscCheck(icc->fact, PetscObjectComm((PetscObject)pc->pmat), PETSC_ERR_SUP, "MatFactor type %s no… in PCFactorSetUpMatSolverType_Factor() 11 MatFactorTypes[icc->factortype], ((PetscObject)pc->pmat)->type_name, icc->solvertype); in PCFactorSetUpMatSolverType_Factor() 15 PetscErrorCode PCFactorSetZeroPivot_Factor(PC pc, PetscReal z) in PCFactorSetZeroPivot_Factor() argument 17 PC_Factor *ilu = (PC_Factor *)pc->data; in PCFactorSetZeroPivot_Factor() 24 PetscErrorCode PCFactorSetShiftType_Factor(PC pc, MatFactorShiftType shifttype) in PCFactorSetShiftType_Factor() argument [all …]
|
| /petsc/src/ksp/pc/impls/composite/ |
| H A D | composite.c | 9 PC pc; member 23 static PetscErrorCode PCApply_Composite_Multiplicative(PC pc, Vec x, Vec y) in PCApply_Composite_Multiplicative() argument 25 PC_Composite *jac = (PC_Composite *)pc->data; in PCApply_Composite_Multiplicative() 27 Mat mat = pc->pmat; in PCApply_Composite_Multiplicative() 30 …PetscCheck(next, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "No composite precond… in PCApply_Composite_Multiplicative() 34 PetscCall(PCSetReusePreconditioner(next->pc, pc->reusepreconditioner)); in PCApply_Composite_Multiplicative() 42 if (pc->useAmat) mat = pc->mat; in PCApply_Composite_Multiplicative() 43 PetscCall(PCApply(next->pc, x, y)); /* y <- B x */ in PCApply_Composite_Multiplicative() 48 PetscCall(PCApply(next->pc, jac->work2, jac->work1)); /* work1 <- C work2 */ in PCApply_Composite_Multiplicative() 56 PetscCall(PCApply(next->pc, jac->work2, jac->work1)); in PCApply_Composite_Multiplicative() [all …]
|
| /petsc/src/ksp/pc/impls/eisens/ |
| H A D | eisen.c | 18 PC pc; in PCMult_Eisenstat() local 22 PetscCall(MatShellGetContext(mat, &pc)); in PCMult_Eisenstat() 23 eis = (PC_Eisenstat *)pc->data; in PCMult_Eisenstat() 25 PetscCall(MatFactorGetError(eis->A, (MatFactorError *)&pc->failedreason)); in PCMult_Eisenstat() 31 PC pc; in PCNorm_Eisenstat() local 35 PetscCall(MatShellGetContext(mat, &pc)); in PCNorm_Eisenstat() 36 eis = (PC_Eisenstat *)pc->data; in PCNorm_Eisenstat() 41 static PetscErrorCode PCApply_Eisenstat(PC pc, Vec x, Vec y) in PCApply_Eisenstat() argument 43 PC_Eisenstat *eis = (PC_Eisenstat *)pc->data; in PCApply_Eisenstat() 48 PetscCall(MatHasOperation(pc->pmat, MATOP_MULT_DIAGONAL_BLOCK, &hasop)); in PCApply_Eisenstat() [all …]
|
| /petsc/src/ksp/pc/impls/mat/ |
| H A D | pcmat.c | 18 static PetscErrorCode PCApply_Mat(PC pc, Vec x, Vec y) in PCApply_Mat() argument 20 PC_Mat *pcmat = (PC_Mat *)pc->data; in PCApply_Mat() 25 PetscCall(MatMult(pc->pmat, x, y)); in PCApply_Mat() 28 PetscCall(MatMultTranspose(pc->pmat, x, y)); in PCApply_Mat() 31 PetscCall(MatSolve(pc->pmat, x, y)); in PCApply_Mat() 34 PetscCall(MatSolveTranspose(pc->pmat, x, y)); in PCApply_Mat() 37 PetscCall(MatMultHermitianTranspose(pc->pmat, x, y)); in PCApply_Mat() 40 …SETERRQ(PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_INCOMP, "Unsupported %s case", PCMatOpType… in PCApply_Mat() 45 static PetscErrorCode PCSetUp_Mat(PC pc) in PCSetUp_Mat() argument 47 PC_Mat *pcmat = (PC_Mat *)pc->data; in PCSetUp_Mat() [all …]
|
| /petsc/src/ksp/pc/impls/jacobi/ |
| H A D | jacobi.c | 2 This file implements a Jacobi preconditioner in PETSc as part of PC. 66 static PetscErrorCode PCReset_Jacobi(PC); 68 static PetscErrorCode PCJacobiSetType_Jacobi(PC pc, PCJacobiType type) in PCJacobiSetType_Jacobi() argument 70 PC_Jacobi *j = (PC_Jacobi *)pc->data; in PCJacobiSetType_Jacobi() 74 PetscCall(PCJacobiGetType(pc, &old_type)); in PCJacobiSetType_Jacobi() 76 PetscCall(PCReset_Jacobi(pc)); in PCJacobiSetType_Jacobi() 81 static PetscErrorCode PCJacobiGetUseAbs_Jacobi(PC pc, PetscBool *flg) in PCJacobiGetUseAbs_Jacobi() argument 83 PC_Jacobi *j = (PC_Jacobi *)pc->data; in PCJacobiGetUseAbs_Jacobi() 90 static PetscErrorCode PCJacobiSetUseAbs_Jacobi(PC pc, PetscBool flg) in PCJacobiSetUseAbs_Jacobi() argument 92 PC_Jacobi *j = (PC_Jacobi *)pc->data; in PCJacobiSetUseAbs_Jacobi() [all …]
|
| /petsc/src/ksp/pc/impls/galerkin/ |
| H A D | galerkin.c | 11 PetscErrorCode (*computeasub)(PC, Mat, Mat, Mat *, void *); 15 static PetscErrorCode PCApply_Galerkin(PC pc, Vec x, Vec y) in PCApply_Galerkin() argument 17 PC_Galerkin *jac = (PC_Galerkin *)pc->data; in PCApply_Galerkin() 26 PetscCall(KSPCheckSolve(jac->ksp, pc, jac->x)); in PCApply_Galerkin() 35 static PetscErrorCode PCSetUp_Galerkin(PC pc) in PCSetUp_Galerkin() argument 37 PC_Galerkin *jac = (PC_Galerkin *)pc->data; in PCSetUp_Galerkin() 44 if (!pc->setupcalled) { in PCSetUp_Galerkin() 45 PetscCall((*jac->computeasub)(pc, pc->pmat, NULL, &Ap, jac->computeasub_ctx)); in PCSetUp_Galerkin() 50 PetscCall((*jac->computeasub)(pc, pc->pmat, Ap, NULL, jac->computeasub_ctx)); in PCSetUp_Galerkin() 56 …PetscCheck(a, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set operator of PC… in PCSetUp_Galerkin() [all …]
|
| /petsc/src/ksp/pc/impls/factor/cholesky/ |
| H A D | cholesky.c | 6 #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ 13 static PetscErrorCode PCSetFromOptions_Cholesky(PC pc, PetscOptionItems PetscOptionsObject) in PCSetFromOptions_Cholesky() argument 17 PetscCall(PCSetFromOptions_Factor(pc, PetscOptionsObject)); in PCSetFromOptions_Cholesky() 22 static PetscErrorCode PCSetUp_Cholesky(PC pc) in PCSetUp_Cholesky() argument 25 PC_Cholesky *dir = (PC_Cholesky *)pc->data; in PCSetUp_Cholesky() 31 pc->failedreason = PC_NOERROR; in PCSetUp_Cholesky() 32 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_Cholesky() 34 PetscCall(PCGetOptionsPrefix(pc, &prefix)); in PCSetUp_Cholesky() 35 PetscCall(MatSetOptionsPrefixFactor(pc->pmat, prefix)); in PCSetUp_Cholesky() 37 PetscCall(MatSetErrorIfFailure(pc->pmat, pc->erroriffailure)); in PCSetUp_Cholesky() [all …]
|
| /petsc/src/ksp/pc/impls/ksp/ |
| H A D | pcksp.c | 10 static PetscErrorCode PCKSPCreateKSP_KSP(PC pc) in PCKSPCreateKSP_KSP() argument 13 PC_KSP *jac = (PC_KSP *)pc->data; in PCKSPCreateKSP_KSP() 17 PetscCall(KSPCreate(PetscObjectComm((PetscObject)pc), &jac->ksp)); in PCKSPCreateKSP_KSP() 18 PetscCall(KSPSetNestLevel(jac->ksp, pc->kspnestlevel)); in PCKSPCreateKSP_KSP() 19 PetscCall(KSPSetErrorIfNotConverged(jac->ksp, pc->erroriffailure)); in PCKSPCreateKSP_KSP() 20 PetscCall(PetscObjectIncrementTabLevel((PetscObject)jac->ksp, (PetscObject)pc, 1)); in PCKSPCreateKSP_KSP() 21 PetscCall(PCGetOptionsPrefix(pc, &prefix)); in PCKSPCreateKSP_KSP() 24 PetscCall(PCGetDM(pc, &dm)); in PCKSPCreateKSP_KSP() 32 static PetscErrorCode PCApply_KSP(PC pc, Vec x, Vec y) in PCApply_KSP() argument 35 PC_KSP *jac = (PC_KSP *)pc->data; in PCApply_KSP() [all …]
|
| /petsc/src/ksp/pc/impls/sor/ |
| H A D | sor.c | 14 static PetscErrorCode PCDestroy_SOR(PC pc) in PCDestroy_SOR() argument 17 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORSetSymmetric_C", NULL)); in PCDestroy_SOR() 18 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORSetOmega_C", NULL)); in PCDestroy_SOR() 19 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORSetIterations_C", NULL)); in PCDestroy_SOR() 20 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORGetSymmetric_C", NULL)); in PCDestroy_SOR() 21 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORGetOmega_C", NULL)); in PCDestroy_SOR() 22 PetscCall(PetscObjectComposeFunction((PetscObject)pc, "PCSORGetIterations_C", NULL)); in PCDestroy_SOR() 23 PetscCall(PetscFree(pc->data)); in PCDestroy_SOR() 27 static PetscErrorCode PCApply_SOR(PC pc, Vec x, Vec y) in PCApply_SOR() argument 29 PC_SOR *jac = (PC_SOR *)pc->data; in PCApply_SOR() [all …]
|
| /petsc/src/ksp/pc/impls/lmvm/ |
| H A D | lmvmpc.c | 22 + pc - The preconditioner 34 PetscErrorCode PCLMVMSetUpdateVec(PC pc, Vec X) in PCLMVMSetUpdateVec() argument 40 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCLMVMSetUpdateVec() 42 PetscCall(PetscObjectTypeCompare((PetscObject)pc, PCLMVM, &same)); in PCLMVMSetUpdateVec() 44 ctx = (PC_LMVM *)pc->data; in PCLMVMSetUpdateVec() 56 + pc - An `PCLMVM` preconditioner 63 PetscErrorCode PCLMVMSetMatLMVM(PC pc, Mat B) in PCLMVMSetMatLMVM() argument 69 PetscValidHeaderSpecific(pc, PC_CLASSID, 1); in PCLMVMSetMatLMVM() 71 PetscCall(PetscObjectTypeCompare((PetscObject)pc, PCLMVM, &same)); in PCLMVMSetMatLMVM() 74 …PetscCheck(same, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONG, "Matrix must be an MATLMVM… in PCLMVMSetMatLMVM() [all …]
|
| /petsc/src/ksp/pc/impls/factor/qr/ |
| H A D | qr.c | 6 #include <../src/ksp/pc/impls/factor/qr/qr.h> /*I "petscpc.h" I*/ 8 static PetscErrorCode PCSetUp_QR(PC pc) in PCSetUp_QR() argument 10 PC_QR *dir = (PC_QR *)pc->data; in PCSetUp_QR() 16 PetscCall(PCGetOptionsPrefix(pc, &prefix)); in PCSetUp_QR() 17 PetscCall(MatSetOptionsPrefix(pc->pmat, prefix)); in PCSetUp_QR() 18 pc->failedreason = PC_NOERROR; in PCSetUp_QR() 19 if (dir->hdr.reusefill && pc->setupcalled) ((PC_Factor *)dir)->info.fill = dir->hdr.actualfill; in PCSetUp_QR() 21 PetscCall(MatSetErrorIfFailure(pc->pmat, pc->erroriffailure)); in PCSetUp_QR() 25 PetscCall(MatGetFactorType(pc->pmat, &ftype)); in PCSetUp_QR() 27 PetscCall(MatQRFactor(pc->pmat, dir->col, &((PC_Factor *)dir)->info)); in PCSetUp_QR() [all …]
|
| /petsc/src/ksp/pc/impls/factor/icc/ |
| H A D | icc.c | 1 #include <../src/ksp/pc/impls/factor/icc/icc.h> /*I "petscpc.h" I*/ 3 static PetscErrorCode PCSetUp_ICC(PC pc) in PCSetUp_ICC() argument 5 PC_ICC *icc = (PC_ICC *)pc->data; in PCSetUp_ICC() 14 pc->failedreason = PC_NOERROR; in PCSetUp_ICC() 16 PetscCall(PCGetOptionsPrefix(pc, &prefix)); in PCSetUp_ICC() 17 PetscCall(MatSetOptionsPrefixFactor(pc->pmat, prefix)); in PCSetUp_ICC() 19 PetscCall(MatSetErrorIfFailure(pc->pmat, pc->erroriffailure)); in PCSetUp_ICC() 20 if (!pc->setupcalled) { in PCSetUp_ICC() 21 PetscCall(PCFactorSetUpMatSolverType(pc)); in PCSetUp_ICC() 24 PetscCall(PCFactorSetDefaultOrdering_Factor(pc)); in PCSetUp_ICC() [all …]
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_pc_py.py | 11 def setup(self, pc): argument 14 def reset(self, pc): argument 17 def apply(self, pc, x, y): argument 20 def applyT(self, pc, x, y): argument 21 self.apply(pc, x, y) 23 def applyS(self, pc, x, y): argument 24 self.apply(pc, x, y) 26 def applySL(self, pc, x, y): argument 27 self.applyS(pc, x, y) 29 def applySR(self, pc, x, y): argument [all …]
|
| /petsc/src/ksp/pc/impls/redundant/ |
| H A D | redundant.c | 9 PC pc; /* actual preconditioner used on each processor */ member 10 … /* vectors of a subcommunicator to hold parallel vectors of PetscObjectComm((PetscObject)pc) */ 21 static PetscErrorCode PCFactorSetShiftType_Redundant(PC pc, MatFactorShiftType shifttype) in PCFactorSetShiftType_Redundant() argument 23 PC_Redundant *red = (PC_Redundant *)pc->data; in PCFactorSetShiftType_Redundant() 27 PC pc; in PCFactorSetShiftType_Redundant() local 28 PetscCall(KSPGetPC(red->ksp, &pc)); in PCFactorSetShiftType_Redundant() 29 PetscCall(PCFactorSetShiftType(pc, shifttype)); in PCFactorSetShiftType_Redundant() 37 static PetscErrorCode PCView_Redundant(PC pc, PetscViewer viewer) in PCView_Redundant() argument 39 PC_Redundant *red = (PC_Redundant *)pc->data; in PCView_Redundant() 51 PetscCall(PetscViewerGetSubViewer(viewer, ((PetscObject)red->pc)->comm, &subviewer)); in PCView_Redundant() [all …]
|
| /petsc/src/ksp/pc/impls/factor/ilu/ |
| H A D | ilu.c | 4 #include <../src/ksp/pc/impls/factor/ilu/ilu.h> /*I "petscpc.h" I*/ 6 static PetscErrorCode PCFactorReorderForNonzeroDiagonal_ILU(PC pc, PetscReal z) in PCFactorReorderForNonzeroDiagonal_ILU() argument 8 PC_ILU *ilu = (PC_ILU *)pc->data; in PCFactorReorderForNonzeroDiagonal_ILU() 17 static PetscErrorCode PCReset_ILU(PC pc) in PCReset_ILU() argument 19 PC_ILU *ilu = (PC_ILU *)pc->data; in PCReset_ILU() 28 static PetscErrorCode PCFactorSetDropTolerance_ILU(PC pc, PetscReal dt, PetscReal dtcol, PetscInt d… in PCFactorSetDropTolerance_ILU() argument 30 PC_ILU *ilu = (PC_ILU *)pc->data; in PCFactorSetDropTolerance_ILU() 33 …pc->setupcalled || !(((PC_Factor *)ilu)->info.dt != dt || ((PC_Factor *)ilu)->info.dtcol != dtcol … in PCFactorSetDropTolerance_ILU() 41 static PetscErrorCode PCSetFromOptions_ILU(PC pc, PetscOptionItems PetscOptionsObject) in PCSetFromOptions_ILU() argument 45 PC_ILU *ilu = (PC_ILU *)pc->data; in PCSetFromOptions_ILU() [all …]
|
| /petsc/include/petsc/private/ |
| H A D | pcbddcprivateimpl.h | 7 PETSC_INTERN PetscErrorCode PCBDDCAnalyzeInterface(PC); 8 PETSC_INTERN PetscErrorCode PCBDDCConstraintsSetUp(PC); 11 PETSC_EXTERN PetscErrorCode PCBDDCLoadOrViewCustomization(PC, PetscBool, const char *); 14 PETSC_EXTERN PetscErrorCode PCBDDCResetTopography(PC); 15 PETSC_EXTERN PetscErrorCode PCBDDCResetSolvers(PC); 16 PETSC_EXTERN PetscErrorCode PCBDDCResetCustomization(PC); 36 PETSC_INTERN PetscErrorCode PCBDDCScalingSetUp(PC); 37 PETSC_INTERN PetscErrorCode PCBDDCScalingDestroy(PC); 38 PETSC_INTERN PetscErrorCode PCBDDCScalingRestriction(PC, Vec, Vec); 39 PETSC_INTERN PetscErrorCode PCBDDCScalingExtension(PC, Vec, Vec); [all …]
|
| /petsc/src/ksp/pc/impls/factor/lu/ |
| H A D | lu.c | 7 #include <../src/ksp/pc/impls/factor/lu/lu.h> /*I "petscpc.h" I*/ 9 static PetscErrorCode PCFactorReorderForNonzeroDiagonal_LU(PC pc, PetscReal z) in PCFactorReorderForNonzeroDiagonal_LU() argument 11 PC_LU *lu = (PC_LU *)pc->data; in PCFactorReorderForNonzeroDiagonal_LU() 20 static PetscErrorCode PCSetFromOptions_LU(PC pc, PetscOptionItems PetscOptionsObject) in PCSetFromOptions_LU() argument 22 PC_LU *lu = (PC_LU *)pc->data; in PCSetFromOptions_LU() 28 PetscCall(PCSetFromOptions_Factor(pc, PetscOptionsObject)); in PCSetFromOptions_LU() 34 PetscCall(PCFactorReorderForNonzeroDiagonal(pc, tol)); in PCSetFromOptions_LU() 40 static PetscErrorCode PCSetUp_LU(PC pc) in PCSetUp_LU() argument 42 PC_LU *dir = (PC_LU *)pc->data; in PCSetUp_LU() 48 pc->failedreason = PC_NOERROR; in PCSetUp_LU() [all …]
|
| /petsc/src/ksp/pc/impls/hmg/ |
| H A D | hmg.c | 8 …PC innerpc; /* A MG inner PC (Hypre or PCGAMG) to setup interpolations and coarse ope… 90 static PetscErrorCode PCSetUp_HMG(PC pc) in PCSetUp_HMG() argument 93 PC_MG *mg = (PC_MG *)pc->data; in PCSetUp_HMG() 104 PetscCall(PetscObjectGetComm((PetscObject)pc, &comm)); in PCSetUp_HMG() 105 if (pc->setupcalled) { in PCSetUp_HMG() 110 PetscCall(PCMGGetGalerkin(pc, &galerkin)); in PCSetUp_HMG() 111 …if (galerkin == PC_MG_GALERKIN_NONE || pc->flag != SAME_NONZERO_PATTERN) pc->setupcalled = PETSC_F… in PCSetUp_HMG() 112 PetscCall(PCMGSetGalerkin(pc, PC_MG_GALERKIN_PMAT)); in PCSetUp_HMG() 113 PetscCall(PCSetUp_MG(pc)); in PCSetUp_HMG() 116 PetscCall(PCReset_MG(pc)); in PCSetUp_HMG() [all …]
|