1 /* 2 Private data structure for ILU/ICC/LU/Cholesky preconditioners. 3 */ 4 #if !defined(__FACTOR_H) 5 #define __FACTOR_H 6 7 #include <petsc/private/pcimpl.h> 8 9 typedef struct { 10 Mat fact; /* factored matrix */ 11 MatFactorInfo info; 12 MatOrderingType ordering; /* matrix reordering */ 13 char *solvertype; 14 MatFactorType factortype; 15 PetscReal actualfill; 16 PetscBool inplace; /* flag indicating in-place factorization */ 17 PetscBool reuseordering; /* reuses previous reordering computed */ 18 PetscBool reusefill; /* reuse fill from previous LU */ 19 } PC_Factor; 20 21 PETSC_INTERN PetscErrorCode PCFactorInitialize(PC, MatFactorType); 22 PETSC_INTERN PetscErrorCode PCFactorGetMatrix_Factor(PC, Mat *); 23 24 PETSC_INTERN PetscErrorCode PCFactorSetZeroPivot_Factor(PC, PetscReal); 25 PETSC_INTERN PetscErrorCode PCFactorGetZeroPivot_Factor(PC, PetscReal *); 26 PETSC_INTERN PetscErrorCode PCFactorSetShiftType_Factor(PC, MatFactorShiftType); 27 PETSC_INTERN PetscErrorCode PCFactorGetShiftType_Factor(PC, MatFactorShiftType *); 28 PETSC_INTERN PetscErrorCode PCFactorSetShiftAmount_Factor(PC, PetscReal); 29 PETSC_INTERN PetscErrorCode PCFactorGetShiftAmount_Factor(PC, PetscReal *); 30 PETSC_INTERN PetscErrorCode PCFactorSetDropTolerance_Factor(PC, PetscReal, PetscReal, PetscInt); 31 PETSC_INTERN PetscErrorCode PCFactorSetFill_Factor(PC, PetscReal); 32 PETSC_INTERN PetscErrorCode PCFactorSetMatOrderingType_Factor(PC, MatOrderingType); 33 PETSC_INTERN PetscErrorCode PCFactorGetLevels_Factor(PC, PetscInt *); 34 PETSC_INTERN PetscErrorCode PCFactorSetLevels_Factor(PC, PetscInt); 35 PETSC_INTERN PetscErrorCode PCFactorSetAllowDiagonalFill_Factor(PC, PetscBool); 36 PETSC_INTERN PetscErrorCode PCFactorGetAllowDiagonalFill_Factor(PC, PetscBool *); 37 PETSC_INTERN PetscErrorCode PCFactorSetPivotInBlocks_Factor(PC, PetscBool); 38 PETSC_INTERN PetscErrorCode PCFactorSetMatSolverType_Factor(PC, MatSolverType); 39 PETSC_INTERN PetscErrorCode PCFactorSetUpMatSolverType_Factor(PC); 40 PETSC_INTERN PetscErrorCode PCFactorGetMatSolverType_Factor(PC, MatSolverType *); 41 PETSC_INTERN PetscErrorCode PCFactorSetColumnPivot_Factor(PC, PetscReal); 42 PETSC_INTERN PetscErrorCode PCSetFromOptions_Factor(PC, PetscOptionItems *PetscOptionsObject); 43 PETSC_INTERN PetscErrorCode PCView_Factor(PC, PetscViewer); 44 PETSC_INTERN PetscErrorCode PCFactorSetDefaultOrdering_Factor(PC); 45 PETSC_INTERN PetscErrorCode PCFactorClearComposedFunctions(PC); 46 47 #endif 48