15e8efad8SHong Zhang 2c6db04a5SJed Brown #include <../src/ksp/pc/impls/factor/factor.h> /*I "petscpc.h" I*/ 35e8efad8SHong Zhang 43d1c1ea0SBarry Smith static PetscErrorCode PCFactorSetReuseOrdering_Factor(PC pc,PetscBool flag) 53d1c1ea0SBarry Smith { 63d1c1ea0SBarry Smith PC_Factor *lu = (PC_Factor*)pc->data; 73d1c1ea0SBarry Smith 83d1c1ea0SBarry Smith PetscFunctionBegin; 93d1c1ea0SBarry Smith lu->reuseordering = flag; 103d1c1ea0SBarry Smith PetscFunctionReturn(0); 113d1c1ea0SBarry Smith } 123d1c1ea0SBarry Smith 133d1c1ea0SBarry Smith static PetscErrorCode PCFactorSetReuseFill_Factor(PC pc,PetscBool flag) 143d1c1ea0SBarry Smith { 153d1c1ea0SBarry Smith PC_Factor *lu = (PC_Factor*)pc->data; 163d1c1ea0SBarry Smith 173d1c1ea0SBarry Smith PetscFunctionBegin; 183d1c1ea0SBarry Smith lu->reusefill = flag; 193d1c1ea0SBarry Smith PetscFunctionReturn(0); 203d1c1ea0SBarry Smith } 213d1c1ea0SBarry Smith 223d1c1ea0SBarry Smith static PetscErrorCode PCFactorSetUseInPlace_Factor(PC pc,PetscBool flg) 233d1c1ea0SBarry Smith { 243d1c1ea0SBarry Smith PC_Factor *dir = (PC_Factor*)pc->data; 253d1c1ea0SBarry Smith 263d1c1ea0SBarry Smith PetscFunctionBegin; 273d1c1ea0SBarry Smith dir->inplace = flg; 283d1c1ea0SBarry Smith PetscFunctionReturn(0); 293d1c1ea0SBarry Smith } 303d1c1ea0SBarry Smith 313d1c1ea0SBarry Smith static PetscErrorCode PCFactorGetUseInPlace_Factor(PC pc,PetscBool *flg) 323d1c1ea0SBarry Smith { 333d1c1ea0SBarry Smith PC_Factor *dir = (PC_Factor*)pc->data; 343d1c1ea0SBarry Smith 353d1c1ea0SBarry Smith PetscFunctionBegin; 363d1c1ea0SBarry Smith *flg = dir->inplace; 373d1c1ea0SBarry Smith PetscFunctionReturn(0); 383d1c1ea0SBarry Smith } 393d1c1ea0SBarry Smith 40f8260c8fSBarry Smith /*@ 413ca39a21SBarry Smith PCFactorSetUpMatSolverType - Can be called after KSPSetOperators() or PCSetOperators(), causes MatGetFactor() to be called so then one may 42f8260c8fSBarry Smith set the options for that particular factorization object. 43f8260c8fSBarry Smith 44f8260c8fSBarry Smith Input Parameter: 45f8260c8fSBarry Smith . pc - the preconditioner context 46f8260c8fSBarry Smith 47f8260c8fSBarry Smith Notes: After you have called this function (which has to be after the KSPSetOperators() or PCSetOperators()) you can call PCFactorGetMatrix() and then set factor options on that matrix. 48f8260c8fSBarry Smith 493ca39a21SBarry Smith .seealso: PCFactorSetMatSolverType(), PCFactorGetMatrix() 50f8260c8fSBarry Smith 512bd2b0e6SSatish Balay Level: intermediate 522bd2b0e6SSatish Balay 53f8260c8fSBarry Smith @*/ 543ca39a21SBarry Smith PetscErrorCode PCFactorSetUpMatSolverType(PC pc) 55f8260c8fSBarry Smith { 56f8260c8fSBarry Smith PetscErrorCode ierr; 57f8260c8fSBarry Smith 58f8260c8fSBarry Smith PetscFunctionBegin; 59f8260c8fSBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 603ca39a21SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetUpMatSolverType_C",(PC),(pc));CHKERRQ(ierr); 61b3a44c85SBarry Smith PetscFunctionReturn(0); 62f8260c8fSBarry Smith } 63f8260c8fSBarry Smith 64ee45ca4aSHong Zhang /*@ 65ee45ca4aSHong Zhang PCFactorSetZeroPivot - Sets the size at which smaller pivots are declared to be zero 66ee45ca4aSHong Zhang 67ad4df100SBarry Smith Logically Collective on PC 68ee45ca4aSHong Zhang 69ee45ca4aSHong Zhang Input Parameters: 70afaefe49SHong Zhang + pc - the preconditioner context 71afaefe49SHong Zhang - zero - all pivots smaller than this will be considered zero 72ee45ca4aSHong Zhang 73ee45ca4aSHong Zhang Options Database Key: 74ee45ca4aSHong Zhang . -pc_factor_zeropivot <zero> - Sets tolerance for what is considered a zero pivot 75ee45ca4aSHong Zhang 76ee45ca4aSHong Zhang Level: intermediate 77ee45ca4aSHong Zhang 78ee45ca4aSHong Zhang .keywords: PC, set, factorization, direct, fill 79ee45ca4aSHong Zhang 80daa17b54SHong Zhang .seealso: PCFactorSetShiftType(), PCFactorSetShiftAmount() 81ee45ca4aSHong Zhang @*/ 827087cfbeSBarry Smith PetscErrorCode PCFactorSetZeroPivot(PC pc,PetscReal zero) 83ee45ca4aSHong Zhang { 844ac538c5SBarry Smith PetscErrorCode ierr; 85afaefe49SHong Zhang 86ee45ca4aSHong Zhang PetscFunctionBegin; 870700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 88c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,zero,2); 894ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetZeroPivot_C",(PC,PetscReal),(pc,zero));CHKERRQ(ierr); 90ee45ca4aSHong Zhang PetscFunctionReturn(0); 91ee45ca4aSHong Zhang } 92ee45ca4aSHong Zhang 93915743fcSHong Zhang /*@ 94915743fcSHong Zhang PCFactorSetShiftType - adds a particular type of quantity to the diagonal of the matrix during 95915743fcSHong Zhang numerical factorization, thus the matrix has nonzero pivots 96915743fcSHong Zhang 97ad4df100SBarry Smith Logically Collective on PC 98915743fcSHong Zhang 99915743fcSHong Zhang Input Parameters: 100915743fcSHong Zhang + pc - the preconditioner context 101915743fcSHong Zhang - shifttype - type of shift; one of MAT_SHIFT_NONE, MAT_SHIFT_NONZERO, MAT_SHIFT_POSITIVE_DEFINITE, MAT_SHIFT_INBLOCKS 102915743fcSHong Zhang 103915743fcSHong Zhang Options Database Key: 104915743fcSHong Zhang . -pc_factor_shift_type <shifttype> - Sets shift type or PETSC_DECIDE for the default; use '-help' for a list of available types 105915743fcSHong Zhang 106915743fcSHong Zhang Level: intermediate 107915743fcSHong Zhang 108915743fcSHong Zhang .keywords: PC, set, factorization, 109915743fcSHong Zhang 110915743fcSHong Zhang .seealso: PCFactorSetZeroPivot(), PCFactorSetShiftAmount() 111915743fcSHong Zhang @*/ 1127087cfbeSBarry Smith PetscErrorCode PCFactorSetShiftType(PC pc,MatFactorShiftType shifttype) 113d90ac83dSHong Zhang { 1144ac538c5SBarry Smith PetscErrorCode ierr; 115d90ac83dSHong Zhang 116d90ac83dSHong Zhang PetscFunctionBegin; 1170700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 118c5eb9154SBarry Smith PetscValidLogicalCollectiveEnum(pc,shifttype,2); 1194ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetShiftType_C",(PC,MatFactorShiftType),(pc,shifttype));CHKERRQ(ierr); 120d90ac83dSHong Zhang PetscFunctionReturn(0); 121d90ac83dSHong Zhang } 122d90ac83dSHong Zhang 123915743fcSHong Zhang /*@ 124915743fcSHong Zhang PCFactorSetShiftAmount - adds a quantity to the diagonal of the matrix during 125915743fcSHong Zhang numerical factorization, thus the matrix has nonzero pivots 126915743fcSHong Zhang 127ad4df100SBarry Smith Logically Collective on PC 128915743fcSHong Zhang 129915743fcSHong Zhang Input Parameters: 130915743fcSHong Zhang + pc - the preconditioner context 131915743fcSHong Zhang - shiftamount - amount of shift 132915743fcSHong Zhang 133915743fcSHong Zhang Options Database Key: 134915743fcSHong Zhang . -pc_factor_shift_amount <shiftamount> - Sets shift amount or PETSC_DECIDE for the default 135915743fcSHong Zhang 136915743fcSHong Zhang Level: intermediate 137915743fcSHong Zhang 138915743fcSHong Zhang .keywords: PC, set, factorization, 139915743fcSHong Zhang 140915743fcSHong Zhang .seealso: PCFactorSetZeroPivot(), PCFactorSetShiftType() 141915743fcSHong Zhang @*/ 1427087cfbeSBarry Smith PetscErrorCode PCFactorSetShiftAmount(PC pc,PetscReal shiftamount) 143d90ac83dSHong Zhang { 1444ac538c5SBarry Smith PetscErrorCode ierr; 145d90ac83dSHong Zhang 146d90ac83dSHong Zhang PetscFunctionBegin; 1470700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 148c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,shiftamount,2); 1494ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetShiftAmount_C",(PC,PetscReal),(pc,shiftamount));CHKERRQ(ierr); 150d90ac83dSHong Zhang PetscFunctionReturn(0); 151d90ac83dSHong Zhang } 152d90ac83dSHong Zhang 15378fc6b22SHong Zhang /* 154b7c853c4SBarry Smith PCFactorSetDropTolerance - The preconditioner will use an ILU 15578fc6b22SHong Zhang based on a drop tolerance. (Under development) 15685317021SBarry Smith 157ad4df100SBarry Smith Logically Collective on PC 15885317021SBarry Smith 15985317021SBarry Smith Input Parameters: 16085317021SBarry Smith + pc - the preconditioner context 16185317021SBarry Smith . dt - the drop tolerance, try from 1.e-10 to .1 16285317021SBarry Smith . dtcol - tolerance for column pivot, good values [0.1 to 0.01] 16385317021SBarry Smith - maxrowcount - the max number of nonzeros allowed in a row, best value 16485317021SBarry Smith depends on the number of nonzeros in row of original matrix 16585317021SBarry Smith 16685317021SBarry Smith Options Database Key: 167b7c853c4SBarry Smith . -pc_factor_drop_tolerance <dt,dtcol,maxrowcount> - Sets drop tolerance 16885317021SBarry Smith 16985317021SBarry Smith Level: intermediate 17085317021SBarry Smith 17185317021SBarry Smith There are NO default values for the 3 parameters, you must set them with reasonable values for your 17285317021SBarry Smith matrix. We don't know how to compute reasonable values. 17385317021SBarry Smith 17485317021SBarry Smith .keywords: PC, levels, reordering, factorization, incomplete, ILU 17578fc6b22SHong Zhang */ 1767087cfbeSBarry Smith PetscErrorCode PCFactorSetDropTolerance(PC pc,PetscReal dt,PetscReal dtcol,PetscInt maxrowcount) 17785317021SBarry Smith { 1784ac538c5SBarry Smith PetscErrorCode ierr; 17985317021SBarry Smith 18085317021SBarry Smith PetscFunctionBegin; 1810700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 182c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,dtcol,2); 183c5eb9154SBarry Smith PetscValidLogicalCollectiveInt(pc,maxrowcount,3); 1844ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetDropTolerance_C",(PC,PetscReal,PetscReal,PetscInt),(pc,dt,dtcol,maxrowcount));CHKERRQ(ierr); 18585317021SBarry Smith PetscFunctionReturn(0); 18685317021SBarry Smith } 18785317021SBarry Smith 188c7f610a1SBarry Smith /*@ 189c7f610a1SBarry Smith PCFactorGetZeroPivot - Gets the tolerance used to define a zero privot 190c7f610a1SBarry Smith 191c7f610a1SBarry Smith Not Collective 192c7f610a1SBarry Smith 193c7f610a1SBarry Smith Input Parameters: 194c7f610a1SBarry Smith . pc - the preconditioner context 195c7f610a1SBarry Smith 196c7f610a1SBarry Smith Output Parameter: 197c7f610a1SBarry Smith . pivot - the tolerance 198c7f610a1SBarry Smith 199c7f610a1SBarry Smith Level: intermediate 200c7f610a1SBarry Smith 201c7f610a1SBarry Smith 202c7f610a1SBarry Smith .seealso: PCFactorSetZeroPivot() 203c7f610a1SBarry Smith @*/ 204c7f610a1SBarry Smith PetscErrorCode PCFactorGetZeroPivot(PC pc,PetscReal *pivot) 205c7f610a1SBarry Smith { 206c7f610a1SBarry Smith PetscErrorCode ierr; 207c7f610a1SBarry Smith 208c7f610a1SBarry Smith PetscFunctionBegin; 209c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 210c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetZeroPivot_C",(PC,PetscReal*),(pc,pivot));CHKERRQ(ierr); 211c7f610a1SBarry Smith PetscFunctionReturn(0); 212c7f610a1SBarry Smith } 213c7f610a1SBarry Smith 214c7f610a1SBarry Smith /*@ 215c7f610a1SBarry Smith PCFactorGetShiftAmount - Gets the tolerance used to define a zero privot 216c7f610a1SBarry Smith 217c7f610a1SBarry Smith Not Collective 218c7f610a1SBarry Smith 219c7f610a1SBarry Smith Input Parameters: 220c7f610a1SBarry Smith . pc - the preconditioner context 221c7f610a1SBarry Smith 222c7f610a1SBarry Smith Output Parameter: 223c7f610a1SBarry Smith . shift - how much to shift the diagonal entry 224c7f610a1SBarry Smith 225c7f610a1SBarry Smith Level: intermediate 226c7f610a1SBarry Smith 227c7f610a1SBarry Smith 228c7f610a1SBarry Smith .seealso: PCFactorSetShiftAmount(), PCFactorSetShiftType(), PCFactorGetShiftType() 229c7f610a1SBarry Smith @*/ 230c7f610a1SBarry Smith PetscErrorCode PCFactorGetShiftAmount(PC pc,PetscReal *shift) 231c7f610a1SBarry Smith { 232c7f610a1SBarry Smith PetscErrorCode ierr; 233c7f610a1SBarry Smith 234c7f610a1SBarry Smith PetscFunctionBegin; 235c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 236c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetShiftAmount_C",(PC,PetscReal*),(pc,shift));CHKERRQ(ierr); 237c7f610a1SBarry Smith PetscFunctionReturn(0); 238c7f610a1SBarry Smith } 239c7f610a1SBarry Smith 240c7f610a1SBarry Smith /*@ 241c7f610a1SBarry Smith PCFactorGetShiftType - Gets the type of shift, if any, done when a zero pivot is detected 242c7f610a1SBarry Smith 243c7f610a1SBarry Smith Not Collective 244c7f610a1SBarry Smith 245c7f610a1SBarry Smith Input Parameters: 246c7f610a1SBarry Smith . pc - the preconditioner context 247c7f610a1SBarry Smith 248c7f610a1SBarry Smith Output Parameter: 249c7f610a1SBarry Smith . type - one of MAT_SHIFT_NONE, MAT_SHIFT_NONZERO, MAT_SHIFT_POSITIVE_DEFINITE, or MAT_SHIFT_INBLOCKS 250c7f610a1SBarry Smith 251c7f610a1SBarry Smith Level: intermediate 252c7f610a1SBarry Smith 253c7f610a1SBarry Smith 254c7f610a1SBarry Smith .seealso: PCFactorSetShiftType(), MatFactorShiftType, PCFactorSetShiftAmount(), PCFactorGetShiftAmount() 255c7f610a1SBarry Smith @*/ 256c7f610a1SBarry Smith PetscErrorCode PCFactorGetShiftType(PC pc,MatFactorShiftType *type) 257c7f610a1SBarry Smith { 258c7f610a1SBarry Smith PetscErrorCode ierr; 259c7f610a1SBarry Smith 260c7f610a1SBarry Smith PetscFunctionBegin; 261c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 262c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetShiftType_C",(PC,MatFactorShiftType*),(pc,type));CHKERRQ(ierr); 263c7f610a1SBarry Smith PetscFunctionReturn(0); 264c7f610a1SBarry Smith } 265c7f610a1SBarry Smith 2662591b318SToby Isaac /*@ 2672591b318SToby Isaac PCFactorGetLevels - Gets the number of levels of fill to use. 2682591b318SToby Isaac 2692591b318SToby Isaac Logically Collective on PC 2702591b318SToby Isaac 2712591b318SToby Isaac Input Parameters: 2722591b318SToby Isaac . pc - the preconditioner context 2732591b318SToby Isaac 2742591b318SToby Isaac Output Parameter: 2752591b318SToby Isaac . levels - number of levels of fill 2762591b318SToby Isaac 2772591b318SToby Isaac Level: intermediate 2782591b318SToby Isaac 2792591b318SToby Isaac .keywords: PC, levels, fill, factorization, incomplete, ILU 2802591b318SToby Isaac @*/ 2812591b318SToby Isaac PetscErrorCode PCFactorGetLevels(PC pc,PetscInt *levels) 2822591b318SToby Isaac { 2832591b318SToby Isaac PetscErrorCode ierr; 2842591b318SToby Isaac 2852591b318SToby Isaac PetscFunctionBegin; 2862591b318SToby Isaac PetscValidHeaderSpecific(pc,PC_CLASSID,1); 287c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetLevels_C",(PC,PetscInt*),(pc,levels));CHKERRQ(ierr); 2882591b318SToby Isaac PetscFunctionReturn(0); 2892591b318SToby Isaac } 2902591b318SToby Isaac 29185317021SBarry Smith /*@ 29285317021SBarry Smith PCFactorSetLevels - Sets the number of levels of fill to use. 29385317021SBarry Smith 294ad4df100SBarry Smith Logically Collective on PC 29585317021SBarry Smith 29685317021SBarry Smith Input Parameters: 29785317021SBarry Smith + pc - the preconditioner context 29885317021SBarry Smith - levels - number of levels of fill 29985317021SBarry Smith 30085317021SBarry Smith Options Database Key: 30185317021SBarry Smith . -pc_factor_levels <levels> - Sets fill level 30285317021SBarry Smith 30385317021SBarry Smith Level: intermediate 30485317021SBarry Smith 30585317021SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 30685317021SBarry Smith @*/ 3077087cfbeSBarry Smith PetscErrorCode PCFactorSetLevels(PC pc,PetscInt levels) 30885317021SBarry Smith { 3094ac538c5SBarry Smith PetscErrorCode ierr; 31085317021SBarry Smith 31185317021SBarry Smith PetscFunctionBegin; 3120700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 313ce94432eSBarry Smith if (levels < 0) SETERRQ(PetscObjectComm((PetscObject)pc),PETSC_ERR_ARG_OUTOFRANGE,"negative levels"); 314c5eb9154SBarry Smith PetscValidLogicalCollectiveInt(pc,levels,2); 3154ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetLevels_C",(PC,PetscInt),(pc,levels));CHKERRQ(ierr); 31685317021SBarry Smith PetscFunctionReturn(0); 31785317021SBarry Smith } 31885317021SBarry Smith 31985317021SBarry Smith /*@ 32085317021SBarry Smith PCFactorSetAllowDiagonalFill - Causes all diagonal matrix entries to be 32185317021SBarry Smith treated as level 0 fill even if there is no non-zero location. 32285317021SBarry Smith 323ad4df100SBarry Smith Logically Collective on PC 32485317021SBarry Smith 32585317021SBarry Smith Input Parameters: 32685317021SBarry Smith + pc - the preconditioner context 32792e9c092SBarry Smith - flg - PETSC_TRUE to turn on, PETSC_FALSE to turn off 32885317021SBarry Smith 32985317021SBarry Smith Options Database Key: 33085317021SBarry Smith . -pc_factor_diagonal_fill 33185317021SBarry Smith 33285317021SBarry Smith Notes: 33385317021SBarry Smith Does not apply with 0 fill. 33485317021SBarry Smith 33585317021SBarry Smith Level: intermediate 33685317021SBarry Smith 33785317021SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 33892e9c092SBarry Smith 33992e9c092SBarry Smith .seealso: PCFactorGetAllowDiagonalFill() 34092e9c092SBarry Smith 34185317021SBarry Smith @*/ 34292e9c092SBarry Smith PetscErrorCode PCFactorSetAllowDiagonalFill(PC pc,PetscBool flg) 34385317021SBarry Smith { 3444ac538c5SBarry Smith PetscErrorCode ierr; 34585317021SBarry Smith 34685317021SBarry Smith PetscFunctionBegin; 3470700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 34892e9c092SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetAllowDiagonalFill_C",(PC,PetscBool),(pc,flg));CHKERRQ(ierr); 34992e9c092SBarry Smith PetscFunctionReturn(0); 35092e9c092SBarry Smith } 35192e9c092SBarry Smith 35292e9c092SBarry Smith /*@ 35392e9c092SBarry Smith PCFactorGetAllowDiagonalFill - Determines if all diagonal matrix entries are 35492e9c092SBarry Smith treated as level 0 fill even if there is no non-zero location. 35592e9c092SBarry Smith 35692e9c092SBarry Smith Logically Collective on PC 35792e9c092SBarry Smith 35892e9c092SBarry Smith Input Parameter: 35992e9c092SBarry Smith . pc - the preconditioner context 36092e9c092SBarry Smith 36192e9c092SBarry Smith Output Parameter: 36292e9c092SBarry Smith . flg - PETSC_TRUE to turn on, PETSC_FALSE to turn off 36392e9c092SBarry Smith 36492e9c092SBarry Smith Options Database Key: 36592e9c092SBarry Smith . -pc_factor_diagonal_fill 36692e9c092SBarry Smith 36792e9c092SBarry Smith Notes: 36892e9c092SBarry Smith Does not apply with 0 fill. 36992e9c092SBarry Smith 37092e9c092SBarry Smith Level: intermediate 37192e9c092SBarry Smith 37292e9c092SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 37392e9c092SBarry Smith 37492e9c092SBarry Smith .seealso: PCFactorSetAllowDiagonalFill() 37592e9c092SBarry Smith 37692e9c092SBarry Smith @*/ 37792e9c092SBarry Smith PetscErrorCode PCFactorGetAllowDiagonalFill(PC pc,PetscBool *flg) 37892e9c092SBarry Smith { 37992e9c092SBarry Smith PetscErrorCode ierr; 38092e9c092SBarry Smith 38192e9c092SBarry Smith PetscFunctionBegin; 38292e9c092SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 383c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetAllowDiagonalFill_C",(PC,PetscBool*),(pc,flg));CHKERRQ(ierr); 38485317021SBarry Smith PetscFunctionReturn(0); 38585317021SBarry Smith } 38685317021SBarry Smith 38785317021SBarry Smith /*@ 38885317021SBarry Smith PCFactorReorderForNonzeroDiagonal - reorders rows/columns of matrix to remove zeros from diagonal 38985317021SBarry Smith 390ad4df100SBarry Smith Logically Collective on PC 39185317021SBarry Smith 39285317021SBarry Smith Input Parameters: 39385317021SBarry Smith + pc - the preconditioner context 39485317021SBarry Smith - tol - diagonal entries smaller than this in absolute value are considered zero 39585317021SBarry Smith 39685317021SBarry Smith Options Database Key: 39792e9c092SBarry Smith . -pc_factor_nonzeros_along_diagonal <tol> 39885317021SBarry Smith 39985317021SBarry Smith Level: intermediate 40085317021SBarry Smith 40185317021SBarry Smith .keywords: PC, set, factorization, direct, fill 40285317021SBarry Smith 40385317021SBarry Smith .seealso: PCFactorSetFill(), PCFactorSetShiftNonzero(), PCFactorSetZeroPivot(), MatReorderForNonzeroDiagonal() 40485317021SBarry Smith @*/ 4057087cfbeSBarry Smith PetscErrorCode PCFactorReorderForNonzeroDiagonal(PC pc,PetscReal rtol) 40685317021SBarry Smith { 4074ac538c5SBarry Smith PetscErrorCode ierr; 40885317021SBarry Smith 40985317021SBarry Smith PetscFunctionBegin; 4100700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 411c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,rtol,2); 4124ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorReorderForNonzeroDiagonal_C",(PC,PetscReal),(pc,rtol));CHKERRQ(ierr); 41385317021SBarry Smith PetscFunctionReturn(0); 41485317021SBarry Smith } 41585317021SBarry Smith 416bf6011e8SBarry Smith /*@C 4173ca39a21SBarry Smith PCFactorSetMatSolverType - sets the software that is used to perform the factorization 41885317021SBarry Smith 419ad4df100SBarry Smith Logically Collective on PC 42085317021SBarry Smith 42185317021SBarry Smith Input Parameters: 42285317021SBarry Smith + pc - the preconditioner context 423f60c3dc2SHong Zhang - stype - for example, superlu, superlu_dist 42485317021SBarry Smith 42585317021SBarry Smith Options Database Key: 4263ca39a21SBarry Smith . -pc_factor_mat_solver_type <stype> - petsc, superlu, superlu_dist, mumps, cusparse 42785317021SBarry Smith 42885317021SBarry Smith Level: intermediate 42985317021SBarry Smith 43085317021SBarry Smith Note: 43185317021SBarry Smith By default this will use the PETSc factorization if it exists 43285317021SBarry Smith 43385317021SBarry Smith 43485317021SBarry Smith .keywords: PC, set, factorization, direct, fill 43585317021SBarry Smith 4363ca39a21SBarry Smith .seealso: MatGetFactor(), MatSolverType, PCFactorGetMatSolverType() 43785317021SBarry Smith 43885317021SBarry Smith @*/ 439*ea799195SBarry Smith PetscErrorCode PCFactorSetMatSolverType(PC pc,MatSolverType stype) 44085317021SBarry Smith { 4414ac538c5SBarry Smith PetscErrorCode ierr; 44285317021SBarry Smith 44385317021SBarry Smith PetscFunctionBegin; 4440700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 445*ea799195SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetMatSolverType_C",(PC,MatSolverType),(pc,stype));CHKERRQ(ierr); 44685317021SBarry Smith PetscFunctionReturn(0); 44785317021SBarry Smith } 44885317021SBarry Smith 449bf6011e8SBarry Smith /*@C 4503ca39a21SBarry Smith PCFactorGetMatSolverType - gets the software that is used to perform the factorization 4517112b564SBarry Smith 452c5eb9154SBarry Smith Not Collective 4537112b564SBarry Smith 4547112b564SBarry Smith Input Parameter: 4557112b564SBarry Smith . pc - the preconditioner context 4567112b564SBarry Smith 4577112b564SBarry Smith Output Parameter: 4580298fd71SBarry Smith . stype - for example, superlu, superlu_dist (NULL if the PC does not have a solver package) 4597112b564SBarry Smith 4607112b564SBarry Smith Level: intermediate 4617112b564SBarry Smith 4627112b564SBarry Smith 4637112b564SBarry Smith .keywords: PC, set, factorization, direct, fill 4647112b564SBarry Smith 4653ca39a21SBarry Smith .seealso: MatGetFactor(), MatSolverType, PCFactorGetMatSolverType() 4667112b564SBarry Smith 4677112b564SBarry Smith @*/ 468*ea799195SBarry Smith PetscErrorCode PCFactorGetMatSolverType(PC pc,MatSolverType *stype) 4697112b564SBarry Smith { 470*ea799195SBarry Smith PetscErrorCode ierr,(*f)(PC,MatSolverType*); 4717112b564SBarry Smith 4727112b564SBarry Smith PetscFunctionBegin; 4730700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 4743ca39a21SBarry Smith ierr = PetscObjectQueryFunction((PetscObject)pc,"PCFactorGetMatSolverType_C",&f);CHKERRQ(ierr); 4758b5c83b4SJed Brown if (f) { 4768b5c83b4SJed Brown ierr = (*f)(pc,stype);CHKERRQ(ierr); 4778b5c83b4SJed Brown } else { 4780298fd71SBarry Smith *stype = NULL; 4798b5c83b4SJed Brown } 4807112b564SBarry Smith PetscFunctionReturn(0); 4817112b564SBarry Smith } 4827112b564SBarry Smith 48385317021SBarry Smith /*@ 48485317021SBarry Smith PCFactorSetFill - Indicate the amount of fill you expect in the factored matrix, 48585317021SBarry Smith fill = number nonzeros in factor/number nonzeros in original matrix. 48685317021SBarry Smith 487c5eb9154SBarry Smith Not Collective, each process can expect a different amount of fill 48885317021SBarry Smith 48985317021SBarry Smith Input Parameters: 49085317021SBarry Smith + pc - the preconditioner context 49185317021SBarry Smith - fill - amount of expected fill 49285317021SBarry Smith 49385317021SBarry Smith Options Database Key: 49485317021SBarry Smith . -pc_factor_fill <fill> - Sets fill amount 49585317021SBarry Smith 49685317021SBarry Smith Level: intermediate 49785317021SBarry Smith 49885317021SBarry Smith Note: 49985317021SBarry Smith For sparse matrix factorizations it is difficult to predict how much 50085317021SBarry Smith fill to expect. By running with the option -info PETSc will print the 50185317021SBarry Smith actual amount of fill used; allowing you to set the value accurately for 50285317021SBarry Smith future runs. Default PETSc uses a value of 5.0 50385317021SBarry Smith 50401a79839SBarry Smith This parameter has NOTHING to do with the levels-of-fill of ILU(). That is set with PCFactorSetLevels() or -pc_factor_levels. 50501a79839SBarry Smith 50601a79839SBarry Smith 50785317021SBarry Smith .keywords: PC, set, factorization, direct, fill 50885317021SBarry Smith 50985317021SBarry Smith @*/ 5107087cfbeSBarry Smith PetscErrorCode PCFactorSetFill(PC pc,PetscReal fill) 51185317021SBarry Smith { 5124ac538c5SBarry Smith PetscErrorCode ierr; 51385317021SBarry Smith 51485317021SBarry Smith PetscFunctionBegin; 5150700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 516ce94432eSBarry Smith if (fill < 1.0) SETERRQ(PetscObjectComm((PetscObject)pc),PETSC_ERR_ARG_OUTOFRANGE,"Fill factor cannot be less then 1.0"); 5174ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetFill_C",(PC,PetscReal),(pc,fill));CHKERRQ(ierr); 51885317021SBarry Smith PetscFunctionReturn(0); 51985317021SBarry Smith } 52085317021SBarry Smith 52185317021SBarry Smith /*@ 52285317021SBarry Smith PCFactorSetUseInPlace - Tells the system to do an in-place factorization. 52385317021SBarry Smith For dense matrices, this enables the solution of much larger problems. 52485317021SBarry Smith For sparse matrices the factorization cannot be done truly in-place 52585317021SBarry Smith so this does not save memory during the factorization, but after the matrix 52685317021SBarry Smith is factored, the original unfactored matrix is freed, thus recovering that 52785317021SBarry Smith space. 52885317021SBarry Smith 529ad4df100SBarry Smith Logically Collective on PC 53085317021SBarry Smith 53185317021SBarry Smith Input Parameters: 5328e37d05fSBarry Smith + pc - the preconditioner context 5338e37d05fSBarry Smith - flg - PETSC_TRUE to enable, PETSC_FALSE to disable 53485317021SBarry Smith 53585317021SBarry Smith Options Database Key: 5368e37d05fSBarry Smith . -pc_factor_in_place <true,false>- Activate/deactivate in-place factorization 53785317021SBarry Smith 53885317021SBarry Smith Notes: 53985317021SBarry Smith PCFactorSetUseInplace() can only be used with the KSP method KSPPREONLY or when 54085317021SBarry Smith a different matrix is provided for the multiply and the preconditioner in 54185317021SBarry Smith a call to KSPSetOperators(). 54285317021SBarry Smith This is because the Krylov space methods require an application of the 54385317021SBarry Smith matrix multiplication, which is not possible here because the matrix has 54485317021SBarry Smith been factored in-place, replacing the original matrix. 54585317021SBarry Smith 54685317021SBarry Smith Level: intermediate 54785317021SBarry Smith 54885317021SBarry Smith .keywords: PC, set, factorization, direct, inplace, in-place, LU 54985317021SBarry Smith 5508e37d05fSBarry Smith .seealso: PCFactorGetUseInPlace() 55185317021SBarry Smith @*/ 5528e37d05fSBarry Smith PetscErrorCode PCFactorSetUseInPlace(PC pc,PetscBool flg) 55385317021SBarry Smith { 5544ac538c5SBarry Smith PetscErrorCode ierr; 55585317021SBarry Smith 55685317021SBarry Smith PetscFunctionBegin; 5570700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 5588e37d05fSBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetUseInPlace_C",(PC,PetscBool),(pc,flg));CHKERRQ(ierr); 5598e37d05fSBarry Smith PetscFunctionReturn(0); 5608e37d05fSBarry Smith } 5618e37d05fSBarry Smith 5628e37d05fSBarry Smith /*@ 5638e37d05fSBarry Smith PCFactorGetUseInPlace - Determines if an in-place factorization is being used. 5648e37d05fSBarry Smith 5658e37d05fSBarry Smith Logically Collective on PC 5668e37d05fSBarry Smith 5678e37d05fSBarry Smith Input Parameter: 5688e37d05fSBarry Smith . pc - the preconditioner context 5698e37d05fSBarry Smith 5708e37d05fSBarry Smith Output Parameter: 5718e37d05fSBarry Smith . flg - PETSC_TRUE to enable, PETSC_FALSE to disable 5728e37d05fSBarry Smith 5738e37d05fSBarry Smith Level: intermediate 5748e37d05fSBarry Smith 5758e37d05fSBarry Smith .keywords: PC, set, factorization, direct, inplace, in-place, LU 5768e37d05fSBarry Smith 5778e37d05fSBarry Smith .seealso: PCFactorSetUseInPlace() 5788e37d05fSBarry Smith @*/ 5798e37d05fSBarry Smith PetscErrorCode PCFactorGetUseInPlace(PC pc,PetscBool *flg) 5808e37d05fSBarry Smith { 5818e37d05fSBarry Smith PetscErrorCode ierr; 5828e37d05fSBarry Smith 5838e37d05fSBarry Smith PetscFunctionBegin; 5848e37d05fSBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 585c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetUseInPlace_C",(PC,PetscBool*),(pc,flg));CHKERRQ(ierr); 58685317021SBarry Smith PetscFunctionReturn(0); 58785317021SBarry Smith } 58885317021SBarry Smith 58985317021SBarry Smith /*@C 59085317021SBarry Smith PCFactorSetMatOrderingType - Sets the ordering routine (to reduce fill) to 59185317021SBarry Smith be used in the LU factorization. 59285317021SBarry Smith 593ad4df100SBarry Smith Logically Collective on PC 59485317021SBarry Smith 59585317021SBarry Smith Input Parameters: 59685317021SBarry Smith + pc - the preconditioner context 5972692d6eeSBarry Smith - ordering - the matrix ordering name, for example, MATORDERINGND or MATORDERINGRCM 59885317021SBarry Smith 59985317021SBarry Smith Options Database Key: 60085317021SBarry Smith . -pc_factor_mat_ordering_type <nd,rcm,...> - Sets ordering routine 60185317021SBarry Smith 60285317021SBarry Smith Level: intermediate 60385317021SBarry Smith 60485317021SBarry Smith Notes: nested dissection is used by default 60585317021SBarry Smith 60685317021SBarry Smith For Cholesky and ICC and the SBAIJ format reorderings are not available, 60785317021SBarry Smith since only the upper triangular part of the matrix is stored. You can use the 60885317021SBarry Smith SeqAIJ format in this case to get reorderings. 60985317021SBarry Smith 61085317021SBarry Smith @*/ 61119fd82e9SBarry Smith PetscErrorCode PCFactorSetMatOrderingType(PC pc,MatOrderingType ordering) 61285317021SBarry Smith { 6134ac538c5SBarry Smith PetscErrorCode ierr; 61485317021SBarry Smith 61585317021SBarry Smith PetscFunctionBegin; 616c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 61719fd82e9SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetMatOrderingType_C",(PC,MatOrderingType),(pc,ordering));CHKERRQ(ierr); 61885317021SBarry Smith PetscFunctionReturn(0); 61985317021SBarry Smith } 62085317021SBarry Smith 62185317021SBarry Smith /*@ 6228ff23777SHong Zhang PCFactorSetColumnPivot - Determines when column pivoting is done during matrix factorization. 62385317021SBarry Smith For PETSc dense matrices column pivoting is always done, for PETSc sparse matrices 624e3c5b3baSBarry Smith it is never done. For the MATLAB and SuperLU factorization this is used. 62585317021SBarry Smith 626ad4df100SBarry Smith Logically Collective on PC 62785317021SBarry Smith 62885317021SBarry Smith Input Parameters: 62985317021SBarry Smith + pc - the preconditioner context 63085317021SBarry Smith - dtcol - 0.0 implies no pivoting, 1.0 complete pivoting (slower, requires more memory but more stable) 63185317021SBarry Smith 63285317021SBarry Smith Options Database Key: 63385317021SBarry Smith . -pc_factor_pivoting <dtcol> 63485317021SBarry Smith 63585317021SBarry Smith Level: intermediate 63685317021SBarry Smith 63785317021SBarry Smith .seealso: PCILUSetMatOrdering(), PCFactorSetPivotInBlocks() 63885317021SBarry Smith @*/ 6397087cfbeSBarry Smith PetscErrorCode PCFactorSetColumnPivot(PC pc,PetscReal dtcol) 64085317021SBarry Smith { 6414ac538c5SBarry Smith PetscErrorCode ierr; 64285317021SBarry Smith 64385317021SBarry Smith PetscFunctionBegin; 644c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 645c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,dtcol,2); 6464ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetColumnPivot_C",(PC,PetscReal),(pc,dtcol));CHKERRQ(ierr); 64785317021SBarry Smith PetscFunctionReturn(0); 64885317021SBarry Smith } 64985317021SBarry Smith 65085317021SBarry Smith /*@ 65185317021SBarry Smith PCFactorSetPivotInBlocks - Determines if pivoting is done while factoring each block 65285317021SBarry Smith with BAIJ or SBAIJ matrices 65385317021SBarry Smith 654ad4df100SBarry Smith Logically Collective on PC 65585317021SBarry Smith 65685317021SBarry Smith Input Parameters: 65785317021SBarry Smith + pc - the preconditioner context 65885317021SBarry Smith - pivot - PETSC_TRUE or PETSC_FALSE 65985317021SBarry Smith 66085317021SBarry Smith Options Database Key: 66185317021SBarry Smith . -pc_factor_pivot_in_blocks <true,false> 66285317021SBarry Smith 66385317021SBarry Smith Level: intermediate 66485317021SBarry Smith 6658ff23777SHong Zhang .seealso: PCILUSetMatOrdering(), PCFactorSetColumnPivot() 66685317021SBarry Smith @*/ 6677087cfbeSBarry Smith PetscErrorCode PCFactorSetPivotInBlocks(PC pc,PetscBool pivot) 66885317021SBarry Smith { 6694ac538c5SBarry Smith PetscErrorCode ierr; 67085317021SBarry Smith 67185317021SBarry Smith PetscFunctionBegin; 672c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 673acfcf0e5SJed Brown PetscValidLogicalCollectiveBool(pc,pivot,2); 6744ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetPivotInBlocks_C",(PC,PetscBool),(pc,pivot));CHKERRQ(ierr); 67585317021SBarry Smith PetscFunctionReturn(0); 67685317021SBarry Smith } 67785317021SBarry Smith 67885317021SBarry Smith /*@ 679288e7d53SBarry Smith PCFactorSetReuseFill - When matrices with different nonzero structure are factored, 68085317021SBarry Smith this causes later ones to use the fill ratio computed in the initial factorization. 68185317021SBarry Smith 682ad4df100SBarry Smith Logically Collective on PC 68385317021SBarry Smith 68485317021SBarry Smith Input Parameters: 68585317021SBarry Smith + pc - the preconditioner context 68685317021SBarry Smith - flag - PETSC_TRUE to reuse else PETSC_FALSE 68785317021SBarry Smith 68885317021SBarry Smith Options Database Key: 68985317021SBarry Smith . -pc_factor_reuse_fill - Activates PCFactorSetReuseFill() 69085317021SBarry Smith 69185317021SBarry Smith Level: intermediate 69285317021SBarry Smith 69385317021SBarry Smith .keywords: PC, levels, reordering, factorization, incomplete, Cholesky 69485317021SBarry Smith 69585317021SBarry Smith .seealso: PCFactorSetReuseOrdering() 69685317021SBarry Smith @*/ 6977087cfbeSBarry Smith PetscErrorCode PCFactorSetReuseFill(PC pc,PetscBool flag) 69885317021SBarry Smith { 6994ac538c5SBarry Smith PetscErrorCode ierr; 70085317021SBarry Smith 70185317021SBarry Smith PetscFunctionBegin; 7020700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,2); 703acfcf0e5SJed Brown PetscValidLogicalCollectiveBool(pc,flag,2); 7044ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetReuseFill_C",(PC,PetscBool),(pc,flag));CHKERRQ(ierr); 70585317021SBarry Smith PetscFunctionReturn(0); 70685317021SBarry Smith } 7073d1c1ea0SBarry Smith 7083d1c1ea0SBarry Smith PetscErrorCode PCFactorInitialize(PC pc) 7093d1c1ea0SBarry Smith { 7103d1c1ea0SBarry Smith PetscErrorCode ierr; 7113d1c1ea0SBarry Smith PC_Factor *fact = (PC_Factor*)pc->data; 7123d1c1ea0SBarry Smith 7133d1c1ea0SBarry Smith PetscFunctionBegin; 7143d1c1ea0SBarry Smith ierr = MatFactorInfoInitialize(&fact->info);CHKERRQ(ierr); 7153d1c1ea0SBarry Smith fact->info.shifttype = (PetscReal)MAT_SHIFT_NONE; 7163d1c1ea0SBarry Smith fact->info.shiftamount = 100.0*PETSC_MACHINE_EPSILON; 7173d1c1ea0SBarry Smith fact->info.zeropivot = 100.0*PETSC_MACHINE_EPSILON; 7183d1c1ea0SBarry Smith fact->info.pivotinblocks = 1.0; 7193d1c1ea0SBarry Smith pc->ops->getfactoredmatrix = PCFactorGetMatrix_Factor; 7203d1c1ea0SBarry Smith 7213d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetZeroPivot_C",PCFactorSetZeroPivot_Factor);CHKERRQ(ierr); 7223d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetZeroPivot_C",PCFactorGetZeroPivot_Factor);CHKERRQ(ierr); 7233d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftType_C",PCFactorSetShiftType_Factor);CHKERRQ(ierr); 7243d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetShiftType_C",PCFactorGetShiftType_Factor);CHKERRQ(ierr); 7253d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftAmount_C",PCFactorSetShiftAmount_Factor);CHKERRQ(ierr); 7263d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetShiftAmount_C",PCFactorGetShiftAmount_Factor);CHKERRQ(ierr); 7273ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetMatSolverType_C",PCFactorGetMatSolverType_Factor);CHKERRQ(ierr); 7283ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatSolverType_C",PCFactorSetMatSolverType_Factor);CHKERRQ(ierr); 7293ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetUpMatSolverType_C",PCFactorSetUpMatSolverType_Factor);CHKERRQ(ierr); 7303d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetFill_C",PCFactorSetFill_Factor);CHKERRQ(ierr); 7313d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatOrderingType_C",PCFactorSetMatOrderingType_Factor);CHKERRQ(ierr); 7323d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetLevels_C",PCFactorSetLevels_Factor);CHKERRQ(ierr); 7333d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetLevels_C",PCFactorGetLevels_Factor);CHKERRQ(ierr); 7343d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetAllowDiagonalFill_C",PCFactorSetAllowDiagonalFill_Factor);CHKERRQ(ierr); 7353d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetAllowDiagonalFill_C",PCFactorGetAllowDiagonalFill_Factor);CHKERRQ(ierr); 7363d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetPivotInBlocks_C",PCFactorSetPivotInBlocks_Factor);CHKERRQ(ierr); 7373d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetUseInPlace_C",PCFactorSetUseInPlace_Factor);CHKERRQ(ierr); 7383d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetUseInPlace_C",PCFactorGetUseInPlace_Factor);CHKERRQ(ierr); 7393d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseOrdering_C",PCFactorSetReuseOrdering_Factor);CHKERRQ(ierr); 7403d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseFill_C",PCFactorSetReuseFill_Factor);CHKERRQ(ierr); 7413d1c1ea0SBarry Smith PetscFunctionReturn(0); 7423d1c1ea0SBarry Smith } 743