135bd34faSBarry Smith /* 2e1222f9fSBarry Smith Private data structure for ILU/ICC/LU/Cholesky preconditioners. 335bd34faSBarry Smith */ 4a4963045SJacob Faibussowitsch #pragma once 535bd34faSBarry Smith 62065344dSHong Zhang #include <petsc/private/pcimpl.h> 735bd34faSBarry Smith 835bd34faSBarry Smith typedef struct { 935bd34faSBarry Smith Mat fact; /* factored matrix */ 1035bd34faSBarry Smith MatFactorInfo info; 1135bd34faSBarry Smith MatOrderingType ordering; /* matrix reordering */ 12ea799195SBarry Smith char *solvertype; 13879e8a4dSBarry Smith MatFactorType factortype; 143d1c1ea0SBarry Smith PetscReal actualfill; 153d1c1ea0SBarry Smith PetscBool inplace; /* flag indicating in-place factorization */ 163d1c1ea0SBarry Smith PetscBool reuseordering; /* reuses previous reordering computed */ 173d1c1ea0SBarry Smith PetscBool reusefill; /* reuse fill from previous LU */ 1835bd34faSBarry Smith } PC_Factor; 1935bd34faSBarry Smith 204ac6704cSBarry Smith PETSC_INTERN PetscErrorCode PCFactorInitialize(PC, MatFactorType); 215a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorGetMatrix_Factor(PC, Mat *); 226dd4cc0eSJed Brown 235a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetZeroPivot_Factor(PC, PetscReal); 24c7f610a1SBarry Smith PETSC_INTERN PetscErrorCode PCFactorGetZeroPivot_Factor(PC, PetscReal *); 255a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetShiftType_Factor(PC, MatFactorShiftType); 26c7f610a1SBarry Smith PETSC_INTERN PetscErrorCode PCFactorGetShiftType_Factor(PC, MatFactorShiftType *); 275a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetShiftAmount_Factor(PC, PetscReal); 28c7f610a1SBarry Smith PETSC_INTERN PetscErrorCode PCFactorGetShiftAmount_Factor(PC, PetscReal *); 295a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetDropTolerance_Factor(PC, PetscReal, PetscReal, PetscInt); 305a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetFill_Factor(PC, PetscReal); 315a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetMatOrderingType_Factor(PC, MatOrderingType); 322591b318SToby Isaac PETSC_INTERN PetscErrorCode PCFactorGetLevels_Factor(PC, PetscInt *); 335a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetLevels_Factor(PC, PetscInt); 3492e9c092SBarry Smith PETSC_INTERN PetscErrorCode PCFactorSetAllowDiagonalFill_Factor(PC, PetscBool); 3592e9c092SBarry Smith PETSC_INTERN PetscErrorCode PCFactorGetAllowDiagonalFill_Factor(PC, PetscBool *); 365a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetPivotInBlocks_Factor(PC, PetscBool); 37ea799195SBarry Smith PETSC_INTERN PetscErrorCode PCFactorSetMatSolverType_Factor(PC, MatSolverType); 383ca39a21SBarry Smith PETSC_INTERN PetscErrorCode PCFactorSetUpMatSolverType_Factor(PC); 39ea799195SBarry Smith PETSC_INTERN PetscErrorCode PCFactorGetMatSolverType_Factor(PC, MatSolverType *); 405a576424SJed Brown PETSC_INTERN PetscErrorCode PCFactorSetColumnPivot_Factor(PC, PetscReal); 41*ce78bad3SBarry Smith PETSC_INTERN PetscErrorCode PCSetFromOptions_Factor(PC, PetscOptionItems PetscOptionsObject); 425a576424SJed Brown PETSC_INTERN PetscErrorCode PCView_Factor(PC, PetscViewer); 434ac6704cSBarry Smith PETSC_INTERN PetscErrorCode PCFactorSetDefaultOrdering_Factor(PC); 442e956fe4SStefano Zampini PETSC_INTERN PetscErrorCode PCFactorClearComposedFunctions(PC); 45