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 47*95452b02SPatrick Sanan Notes: 48*95452b02SPatrick Sanan 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. 49f8260c8fSBarry Smith 503ca39a21SBarry Smith .seealso: PCFactorSetMatSolverType(), PCFactorGetMatrix() 51f8260c8fSBarry Smith 522bd2b0e6SSatish Balay Level: intermediate 532bd2b0e6SSatish Balay 54f8260c8fSBarry Smith @*/ 553ca39a21SBarry Smith PetscErrorCode PCFactorSetUpMatSolverType(PC pc) 56f8260c8fSBarry Smith { 57f8260c8fSBarry Smith PetscErrorCode ierr; 58f8260c8fSBarry Smith 59f8260c8fSBarry Smith PetscFunctionBegin; 60f8260c8fSBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 613ca39a21SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetUpMatSolverType_C",(PC),(pc));CHKERRQ(ierr); 62b3a44c85SBarry Smith PetscFunctionReturn(0); 63f8260c8fSBarry Smith } 64f8260c8fSBarry Smith 65ee45ca4aSHong Zhang /*@ 66ee45ca4aSHong Zhang PCFactorSetZeroPivot - Sets the size at which smaller pivots are declared to be zero 67ee45ca4aSHong Zhang 68ad4df100SBarry Smith Logically Collective on PC 69ee45ca4aSHong Zhang 70ee45ca4aSHong Zhang Input Parameters: 71afaefe49SHong Zhang + pc - the preconditioner context 72afaefe49SHong Zhang - zero - all pivots smaller than this will be considered zero 73ee45ca4aSHong Zhang 74ee45ca4aSHong Zhang Options Database Key: 75ee45ca4aSHong Zhang . -pc_factor_zeropivot <zero> - Sets tolerance for what is considered a zero pivot 76ee45ca4aSHong Zhang 77ee45ca4aSHong Zhang Level: intermediate 78ee45ca4aSHong Zhang 79ee45ca4aSHong Zhang .keywords: PC, set, factorization, direct, fill 80ee45ca4aSHong Zhang 81daa17b54SHong Zhang .seealso: PCFactorSetShiftType(), PCFactorSetShiftAmount() 82ee45ca4aSHong Zhang @*/ 837087cfbeSBarry Smith PetscErrorCode PCFactorSetZeroPivot(PC pc,PetscReal zero) 84ee45ca4aSHong Zhang { 854ac538c5SBarry Smith PetscErrorCode ierr; 86afaefe49SHong Zhang 87ee45ca4aSHong Zhang PetscFunctionBegin; 880700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 89c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,zero,2); 904ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetZeroPivot_C",(PC,PetscReal),(pc,zero));CHKERRQ(ierr); 91ee45ca4aSHong Zhang PetscFunctionReturn(0); 92ee45ca4aSHong Zhang } 93ee45ca4aSHong Zhang 94915743fcSHong Zhang /*@ 95915743fcSHong Zhang PCFactorSetShiftType - adds a particular type of quantity to the diagonal of the matrix during 96915743fcSHong Zhang numerical factorization, thus the matrix has nonzero pivots 97915743fcSHong Zhang 98ad4df100SBarry Smith Logically Collective on PC 99915743fcSHong Zhang 100915743fcSHong Zhang Input Parameters: 101915743fcSHong Zhang + pc - the preconditioner context 102915743fcSHong Zhang - shifttype - type of shift; one of MAT_SHIFT_NONE, MAT_SHIFT_NONZERO, MAT_SHIFT_POSITIVE_DEFINITE, MAT_SHIFT_INBLOCKS 103915743fcSHong Zhang 104915743fcSHong Zhang Options Database Key: 105915743fcSHong Zhang . -pc_factor_shift_type <shifttype> - Sets shift type or PETSC_DECIDE for the default; use '-help' for a list of available types 106915743fcSHong Zhang 107915743fcSHong Zhang Level: intermediate 108915743fcSHong Zhang 109915743fcSHong Zhang .keywords: PC, set, factorization, 110915743fcSHong Zhang 111915743fcSHong Zhang .seealso: PCFactorSetZeroPivot(), PCFactorSetShiftAmount() 112915743fcSHong Zhang @*/ 1137087cfbeSBarry Smith PetscErrorCode PCFactorSetShiftType(PC pc,MatFactorShiftType shifttype) 114d90ac83dSHong Zhang { 1154ac538c5SBarry Smith PetscErrorCode ierr; 116d90ac83dSHong Zhang 117d90ac83dSHong Zhang PetscFunctionBegin; 1180700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 119c5eb9154SBarry Smith PetscValidLogicalCollectiveEnum(pc,shifttype,2); 1204ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetShiftType_C",(PC,MatFactorShiftType),(pc,shifttype));CHKERRQ(ierr); 121d90ac83dSHong Zhang PetscFunctionReturn(0); 122d90ac83dSHong Zhang } 123d90ac83dSHong Zhang 124915743fcSHong Zhang /*@ 125915743fcSHong Zhang PCFactorSetShiftAmount - adds a quantity to the diagonal of the matrix during 126915743fcSHong Zhang numerical factorization, thus the matrix has nonzero pivots 127915743fcSHong Zhang 128ad4df100SBarry Smith Logically Collective on PC 129915743fcSHong Zhang 130915743fcSHong Zhang Input Parameters: 131915743fcSHong Zhang + pc - the preconditioner context 132915743fcSHong Zhang - shiftamount - amount of shift 133915743fcSHong Zhang 134915743fcSHong Zhang Options Database Key: 135915743fcSHong Zhang . -pc_factor_shift_amount <shiftamount> - Sets shift amount or PETSC_DECIDE for the default 136915743fcSHong Zhang 137915743fcSHong Zhang Level: intermediate 138915743fcSHong Zhang 139915743fcSHong Zhang .keywords: PC, set, factorization, 140915743fcSHong Zhang 141915743fcSHong Zhang .seealso: PCFactorSetZeroPivot(), PCFactorSetShiftType() 142915743fcSHong Zhang @*/ 1437087cfbeSBarry Smith PetscErrorCode PCFactorSetShiftAmount(PC pc,PetscReal shiftamount) 144d90ac83dSHong Zhang { 1454ac538c5SBarry Smith PetscErrorCode ierr; 146d90ac83dSHong Zhang 147d90ac83dSHong Zhang PetscFunctionBegin; 1480700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 149c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,shiftamount,2); 1504ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetShiftAmount_C",(PC,PetscReal),(pc,shiftamount));CHKERRQ(ierr); 151d90ac83dSHong Zhang PetscFunctionReturn(0); 152d90ac83dSHong Zhang } 153d90ac83dSHong Zhang 15478fc6b22SHong Zhang /* 155b7c853c4SBarry Smith PCFactorSetDropTolerance - The preconditioner will use an ILU 15678fc6b22SHong Zhang based on a drop tolerance. (Under development) 15785317021SBarry Smith 158ad4df100SBarry Smith Logically Collective on PC 15985317021SBarry Smith 16085317021SBarry Smith Input Parameters: 16185317021SBarry Smith + pc - the preconditioner context 16285317021SBarry Smith . dt - the drop tolerance, try from 1.e-10 to .1 16385317021SBarry Smith . dtcol - tolerance for column pivot, good values [0.1 to 0.01] 16485317021SBarry Smith - maxrowcount - the max number of nonzeros allowed in a row, best value 16585317021SBarry Smith depends on the number of nonzeros in row of original matrix 16685317021SBarry Smith 16785317021SBarry Smith Options Database Key: 168b7c853c4SBarry Smith . -pc_factor_drop_tolerance <dt,dtcol,maxrowcount> - Sets drop tolerance 16985317021SBarry Smith 17085317021SBarry Smith Level: intermediate 17185317021SBarry Smith 17285317021SBarry Smith There are NO default values for the 3 parameters, you must set them with reasonable values for your 17385317021SBarry Smith matrix. We don't know how to compute reasonable values. 17485317021SBarry Smith 17585317021SBarry Smith .keywords: PC, levels, reordering, factorization, incomplete, ILU 17678fc6b22SHong Zhang */ 1777087cfbeSBarry Smith PetscErrorCode PCFactorSetDropTolerance(PC pc,PetscReal dt,PetscReal dtcol,PetscInt maxrowcount) 17885317021SBarry Smith { 1794ac538c5SBarry Smith PetscErrorCode ierr; 18085317021SBarry Smith 18185317021SBarry Smith PetscFunctionBegin; 1820700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 183c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,dtcol,2); 184c5eb9154SBarry Smith PetscValidLogicalCollectiveInt(pc,maxrowcount,3); 1854ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetDropTolerance_C",(PC,PetscReal,PetscReal,PetscInt),(pc,dt,dtcol,maxrowcount));CHKERRQ(ierr); 18685317021SBarry Smith PetscFunctionReturn(0); 18785317021SBarry Smith } 18885317021SBarry Smith 189c7f610a1SBarry Smith /*@ 190c7f610a1SBarry Smith PCFactorGetZeroPivot - Gets the tolerance used to define a zero privot 191c7f610a1SBarry Smith 192c7f610a1SBarry Smith Not Collective 193c7f610a1SBarry Smith 194c7f610a1SBarry Smith Input Parameters: 195c7f610a1SBarry Smith . pc - the preconditioner context 196c7f610a1SBarry Smith 197c7f610a1SBarry Smith Output Parameter: 198c7f610a1SBarry Smith . pivot - the tolerance 199c7f610a1SBarry Smith 200c7f610a1SBarry Smith Level: intermediate 201c7f610a1SBarry Smith 202c7f610a1SBarry Smith 203c7f610a1SBarry Smith .seealso: PCFactorSetZeroPivot() 204c7f610a1SBarry Smith @*/ 205c7f610a1SBarry Smith PetscErrorCode PCFactorGetZeroPivot(PC pc,PetscReal *pivot) 206c7f610a1SBarry Smith { 207c7f610a1SBarry Smith PetscErrorCode ierr; 208c7f610a1SBarry Smith 209c7f610a1SBarry Smith PetscFunctionBegin; 210c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 211c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetZeroPivot_C",(PC,PetscReal*),(pc,pivot));CHKERRQ(ierr); 212c7f610a1SBarry Smith PetscFunctionReturn(0); 213c7f610a1SBarry Smith } 214c7f610a1SBarry Smith 215c7f610a1SBarry Smith /*@ 216c7f610a1SBarry Smith PCFactorGetShiftAmount - Gets the tolerance used to define a zero privot 217c7f610a1SBarry Smith 218c7f610a1SBarry Smith Not Collective 219c7f610a1SBarry Smith 220c7f610a1SBarry Smith Input Parameters: 221c7f610a1SBarry Smith . pc - the preconditioner context 222c7f610a1SBarry Smith 223c7f610a1SBarry Smith Output Parameter: 224c7f610a1SBarry Smith . shift - how much to shift the diagonal entry 225c7f610a1SBarry Smith 226c7f610a1SBarry Smith Level: intermediate 227c7f610a1SBarry Smith 228c7f610a1SBarry Smith 229c7f610a1SBarry Smith .seealso: PCFactorSetShiftAmount(), PCFactorSetShiftType(), PCFactorGetShiftType() 230c7f610a1SBarry Smith @*/ 231c7f610a1SBarry Smith PetscErrorCode PCFactorGetShiftAmount(PC pc,PetscReal *shift) 232c7f610a1SBarry Smith { 233c7f610a1SBarry Smith PetscErrorCode ierr; 234c7f610a1SBarry Smith 235c7f610a1SBarry Smith PetscFunctionBegin; 236c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 237c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetShiftAmount_C",(PC,PetscReal*),(pc,shift));CHKERRQ(ierr); 238c7f610a1SBarry Smith PetscFunctionReturn(0); 239c7f610a1SBarry Smith } 240c7f610a1SBarry Smith 241c7f610a1SBarry Smith /*@ 242c7f610a1SBarry Smith PCFactorGetShiftType - Gets the type of shift, if any, done when a zero pivot is detected 243c7f610a1SBarry Smith 244c7f610a1SBarry Smith Not Collective 245c7f610a1SBarry Smith 246c7f610a1SBarry Smith Input Parameters: 247c7f610a1SBarry Smith . pc - the preconditioner context 248c7f610a1SBarry Smith 249c7f610a1SBarry Smith Output Parameter: 250c7f610a1SBarry Smith . type - one of MAT_SHIFT_NONE, MAT_SHIFT_NONZERO, MAT_SHIFT_POSITIVE_DEFINITE, or MAT_SHIFT_INBLOCKS 251c7f610a1SBarry Smith 252c7f610a1SBarry Smith Level: intermediate 253c7f610a1SBarry Smith 254c7f610a1SBarry Smith 255c7f610a1SBarry Smith .seealso: PCFactorSetShiftType(), MatFactorShiftType, PCFactorSetShiftAmount(), PCFactorGetShiftAmount() 256c7f610a1SBarry Smith @*/ 257c7f610a1SBarry Smith PetscErrorCode PCFactorGetShiftType(PC pc,MatFactorShiftType *type) 258c7f610a1SBarry Smith { 259c7f610a1SBarry Smith PetscErrorCode ierr; 260c7f610a1SBarry Smith 261c7f610a1SBarry Smith PetscFunctionBegin; 262c7f610a1SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 263c7f610a1SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetShiftType_C",(PC,MatFactorShiftType*),(pc,type));CHKERRQ(ierr); 264c7f610a1SBarry Smith PetscFunctionReturn(0); 265c7f610a1SBarry Smith } 266c7f610a1SBarry Smith 2672591b318SToby Isaac /*@ 2682591b318SToby Isaac PCFactorGetLevels - Gets the number of levels of fill to use. 2692591b318SToby Isaac 2702591b318SToby Isaac Logically Collective on PC 2712591b318SToby Isaac 2722591b318SToby Isaac Input Parameters: 2732591b318SToby Isaac . pc - the preconditioner context 2742591b318SToby Isaac 2752591b318SToby Isaac Output Parameter: 2762591b318SToby Isaac . levels - number of levels of fill 2772591b318SToby Isaac 2782591b318SToby Isaac Level: intermediate 2792591b318SToby Isaac 2802591b318SToby Isaac .keywords: PC, levels, fill, factorization, incomplete, ILU 2812591b318SToby Isaac @*/ 2822591b318SToby Isaac PetscErrorCode PCFactorGetLevels(PC pc,PetscInt *levels) 2832591b318SToby Isaac { 2842591b318SToby Isaac PetscErrorCode ierr; 2852591b318SToby Isaac 2862591b318SToby Isaac PetscFunctionBegin; 2872591b318SToby Isaac PetscValidHeaderSpecific(pc,PC_CLASSID,1); 288c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetLevels_C",(PC,PetscInt*),(pc,levels));CHKERRQ(ierr); 2892591b318SToby Isaac PetscFunctionReturn(0); 2902591b318SToby Isaac } 2912591b318SToby Isaac 29285317021SBarry Smith /*@ 29385317021SBarry Smith PCFactorSetLevels - Sets the number of levels of fill to use. 29485317021SBarry Smith 295ad4df100SBarry Smith Logically Collective on PC 29685317021SBarry Smith 29785317021SBarry Smith Input Parameters: 29885317021SBarry Smith + pc - the preconditioner context 29985317021SBarry Smith - levels - number of levels of fill 30085317021SBarry Smith 30185317021SBarry Smith Options Database Key: 30285317021SBarry Smith . -pc_factor_levels <levels> - Sets fill level 30385317021SBarry Smith 30485317021SBarry Smith Level: intermediate 30585317021SBarry Smith 30685317021SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 30785317021SBarry Smith @*/ 3087087cfbeSBarry Smith PetscErrorCode PCFactorSetLevels(PC pc,PetscInt levels) 30985317021SBarry Smith { 3104ac538c5SBarry Smith PetscErrorCode ierr; 31185317021SBarry Smith 31285317021SBarry Smith PetscFunctionBegin; 3130700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 314ce94432eSBarry Smith if (levels < 0) SETERRQ(PetscObjectComm((PetscObject)pc),PETSC_ERR_ARG_OUTOFRANGE,"negative levels"); 315c5eb9154SBarry Smith PetscValidLogicalCollectiveInt(pc,levels,2); 3164ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetLevels_C",(PC,PetscInt),(pc,levels));CHKERRQ(ierr); 31785317021SBarry Smith PetscFunctionReturn(0); 31885317021SBarry Smith } 31985317021SBarry Smith 32085317021SBarry Smith /*@ 32185317021SBarry Smith PCFactorSetAllowDiagonalFill - Causes all diagonal matrix entries to be 32285317021SBarry Smith treated as level 0 fill even if there is no non-zero location. 32385317021SBarry Smith 324ad4df100SBarry Smith Logically Collective on PC 32585317021SBarry Smith 32685317021SBarry Smith Input Parameters: 32785317021SBarry Smith + pc - the preconditioner context 32892e9c092SBarry Smith - flg - PETSC_TRUE to turn on, PETSC_FALSE to turn off 32985317021SBarry Smith 33085317021SBarry Smith Options Database Key: 33185317021SBarry Smith . -pc_factor_diagonal_fill 33285317021SBarry Smith 33385317021SBarry Smith Notes: 33485317021SBarry Smith Does not apply with 0 fill. 33585317021SBarry Smith 33685317021SBarry Smith Level: intermediate 33785317021SBarry Smith 33885317021SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 33992e9c092SBarry Smith 34092e9c092SBarry Smith .seealso: PCFactorGetAllowDiagonalFill() 34192e9c092SBarry Smith 34285317021SBarry Smith @*/ 34392e9c092SBarry Smith PetscErrorCode PCFactorSetAllowDiagonalFill(PC pc,PetscBool flg) 34485317021SBarry Smith { 3454ac538c5SBarry Smith PetscErrorCode ierr; 34685317021SBarry Smith 34785317021SBarry Smith PetscFunctionBegin; 3480700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 34992e9c092SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetAllowDiagonalFill_C",(PC,PetscBool),(pc,flg));CHKERRQ(ierr); 35092e9c092SBarry Smith PetscFunctionReturn(0); 35192e9c092SBarry Smith } 35292e9c092SBarry Smith 35392e9c092SBarry Smith /*@ 35492e9c092SBarry Smith PCFactorGetAllowDiagonalFill - Determines if all diagonal matrix entries are 35592e9c092SBarry Smith treated as level 0 fill even if there is no non-zero location. 35692e9c092SBarry Smith 35792e9c092SBarry Smith Logically Collective on PC 35892e9c092SBarry Smith 35992e9c092SBarry Smith Input Parameter: 36092e9c092SBarry Smith . pc - the preconditioner context 36192e9c092SBarry Smith 36292e9c092SBarry Smith Output Parameter: 36392e9c092SBarry Smith . flg - PETSC_TRUE to turn on, PETSC_FALSE to turn off 36492e9c092SBarry Smith 36592e9c092SBarry Smith Options Database Key: 36692e9c092SBarry Smith . -pc_factor_diagonal_fill 36792e9c092SBarry Smith 36892e9c092SBarry Smith Notes: 36992e9c092SBarry Smith Does not apply with 0 fill. 37092e9c092SBarry Smith 37192e9c092SBarry Smith Level: intermediate 37292e9c092SBarry Smith 37392e9c092SBarry Smith .keywords: PC, levels, fill, factorization, incomplete, ILU 37492e9c092SBarry Smith 37592e9c092SBarry Smith .seealso: PCFactorSetAllowDiagonalFill() 37692e9c092SBarry Smith 37792e9c092SBarry Smith @*/ 37892e9c092SBarry Smith PetscErrorCode PCFactorGetAllowDiagonalFill(PC pc,PetscBool *flg) 37992e9c092SBarry Smith { 38092e9c092SBarry Smith PetscErrorCode ierr; 38192e9c092SBarry Smith 38292e9c092SBarry Smith PetscFunctionBegin; 38392e9c092SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 384c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetAllowDiagonalFill_C",(PC,PetscBool*),(pc,flg));CHKERRQ(ierr); 38585317021SBarry Smith PetscFunctionReturn(0); 38685317021SBarry Smith } 38785317021SBarry Smith 38885317021SBarry Smith /*@ 38985317021SBarry Smith PCFactorReorderForNonzeroDiagonal - reorders rows/columns of matrix to remove zeros from diagonal 39085317021SBarry Smith 391ad4df100SBarry Smith Logically Collective on PC 39285317021SBarry Smith 39385317021SBarry Smith Input Parameters: 39485317021SBarry Smith + pc - the preconditioner context 39585317021SBarry Smith - tol - diagonal entries smaller than this in absolute value are considered zero 39685317021SBarry Smith 39785317021SBarry Smith Options Database Key: 39892e9c092SBarry Smith . -pc_factor_nonzeros_along_diagonal <tol> 39985317021SBarry Smith 40085317021SBarry Smith Level: intermediate 40185317021SBarry Smith 40285317021SBarry Smith .keywords: PC, set, factorization, direct, fill 40385317021SBarry Smith 40485317021SBarry Smith .seealso: PCFactorSetFill(), PCFactorSetShiftNonzero(), PCFactorSetZeroPivot(), MatReorderForNonzeroDiagonal() 40585317021SBarry Smith @*/ 4067087cfbeSBarry Smith PetscErrorCode PCFactorReorderForNonzeroDiagonal(PC pc,PetscReal rtol) 40785317021SBarry Smith { 4084ac538c5SBarry Smith PetscErrorCode ierr; 40985317021SBarry Smith 41085317021SBarry Smith PetscFunctionBegin; 4110700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 412c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,rtol,2); 4134ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorReorderForNonzeroDiagonal_C",(PC,PetscReal),(pc,rtol));CHKERRQ(ierr); 41485317021SBarry Smith PetscFunctionReturn(0); 41585317021SBarry Smith } 41685317021SBarry Smith 417bf6011e8SBarry Smith /*@C 4183ca39a21SBarry Smith PCFactorSetMatSolverType - sets the software that is used to perform the factorization 41985317021SBarry Smith 420ad4df100SBarry Smith Logically Collective on PC 42185317021SBarry Smith 42285317021SBarry Smith Input Parameters: 42385317021SBarry Smith + pc - the preconditioner context 424f60c3dc2SHong Zhang - stype - for example, superlu, superlu_dist 42585317021SBarry Smith 42685317021SBarry Smith Options Database Key: 4273ca39a21SBarry Smith . -pc_factor_mat_solver_type <stype> - petsc, superlu, superlu_dist, mumps, cusparse 42885317021SBarry Smith 42985317021SBarry Smith Level: intermediate 43085317021SBarry Smith 43185317021SBarry Smith Note: 43285317021SBarry Smith By default this will use the PETSc factorization if it exists 43385317021SBarry Smith 43485317021SBarry Smith 43585317021SBarry Smith .keywords: PC, set, factorization, direct, fill 43685317021SBarry Smith 4373ca39a21SBarry Smith .seealso: MatGetFactor(), MatSolverType, PCFactorGetMatSolverType() 43885317021SBarry Smith 43985317021SBarry Smith @*/ 440ea799195SBarry Smith PetscErrorCode PCFactorSetMatSolverType(PC pc,MatSolverType stype) 44185317021SBarry Smith { 4424ac538c5SBarry Smith PetscErrorCode ierr; 44385317021SBarry Smith 44485317021SBarry Smith PetscFunctionBegin; 4450700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 446ea799195SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetMatSolverType_C",(PC,MatSolverType),(pc,stype));CHKERRQ(ierr); 44785317021SBarry Smith PetscFunctionReturn(0); 44885317021SBarry Smith } 44985317021SBarry Smith 450bf6011e8SBarry Smith /*@C 4513ca39a21SBarry Smith PCFactorGetMatSolverType - gets the software that is used to perform the factorization 4527112b564SBarry Smith 453c5eb9154SBarry Smith Not Collective 4547112b564SBarry Smith 4557112b564SBarry Smith Input Parameter: 4567112b564SBarry Smith . pc - the preconditioner context 4577112b564SBarry Smith 4587112b564SBarry Smith Output Parameter: 4590298fd71SBarry Smith . stype - for example, superlu, superlu_dist (NULL if the PC does not have a solver package) 4607112b564SBarry Smith 4617112b564SBarry Smith Level: intermediate 4627112b564SBarry Smith 4637112b564SBarry Smith 4647112b564SBarry Smith .keywords: PC, set, factorization, direct, fill 4657112b564SBarry Smith 4663ca39a21SBarry Smith .seealso: MatGetFactor(), MatSolverType, PCFactorGetMatSolverType() 4677112b564SBarry Smith 4687112b564SBarry Smith @*/ 469ea799195SBarry Smith PetscErrorCode PCFactorGetMatSolverType(PC pc,MatSolverType *stype) 4707112b564SBarry Smith { 471ea799195SBarry Smith PetscErrorCode ierr,(*f)(PC,MatSolverType*); 4727112b564SBarry Smith 4737112b564SBarry Smith PetscFunctionBegin; 4740700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 4753ca39a21SBarry Smith ierr = PetscObjectQueryFunction((PetscObject)pc,"PCFactorGetMatSolverType_C",&f);CHKERRQ(ierr); 4768b5c83b4SJed Brown if (f) { 4778b5c83b4SJed Brown ierr = (*f)(pc,stype);CHKERRQ(ierr); 4788b5c83b4SJed Brown } else { 4790298fd71SBarry Smith *stype = NULL; 4808b5c83b4SJed Brown } 4817112b564SBarry Smith PetscFunctionReturn(0); 4827112b564SBarry Smith } 4837112b564SBarry Smith 48485317021SBarry Smith /*@ 48585317021SBarry Smith PCFactorSetFill - Indicate the amount of fill you expect in the factored matrix, 48685317021SBarry Smith fill = number nonzeros in factor/number nonzeros in original matrix. 48785317021SBarry Smith 488c5eb9154SBarry Smith Not Collective, each process can expect a different amount of fill 48985317021SBarry Smith 49085317021SBarry Smith Input Parameters: 49185317021SBarry Smith + pc - the preconditioner context 49285317021SBarry Smith - fill - amount of expected fill 49385317021SBarry Smith 49485317021SBarry Smith Options Database Key: 49585317021SBarry Smith . -pc_factor_fill <fill> - Sets fill amount 49685317021SBarry Smith 49785317021SBarry Smith Level: intermediate 49885317021SBarry Smith 49985317021SBarry Smith Note: 50085317021SBarry Smith For sparse matrix factorizations it is difficult to predict how much 50185317021SBarry Smith fill to expect. By running with the option -info PETSc will print the 50285317021SBarry Smith actual amount of fill used; allowing you to set the value accurately for 50385317021SBarry Smith future runs. Default PETSc uses a value of 5.0 50485317021SBarry Smith 50501a79839SBarry Smith This parameter has NOTHING to do with the levels-of-fill of ILU(). That is set with PCFactorSetLevels() or -pc_factor_levels. 50601a79839SBarry Smith 50701a79839SBarry Smith 50885317021SBarry Smith .keywords: PC, set, factorization, direct, fill 50985317021SBarry Smith 51085317021SBarry Smith @*/ 5117087cfbeSBarry Smith PetscErrorCode PCFactorSetFill(PC pc,PetscReal fill) 51285317021SBarry Smith { 5134ac538c5SBarry Smith PetscErrorCode ierr; 51485317021SBarry Smith 51585317021SBarry Smith PetscFunctionBegin; 5160700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 517ce94432eSBarry Smith if (fill < 1.0) SETERRQ(PetscObjectComm((PetscObject)pc),PETSC_ERR_ARG_OUTOFRANGE,"Fill factor cannot be less then 1.0"); 5184ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetFill_C",(PC,PetscReal),(pc,fill));CHKERRQ(ierr); 51985317021SBarry Smith PetscFunctionReturn(0); 52085317021SBarry Smith } 52185317021SBarry Smith 52285317021SBarry Smith /*@ 52385317021SBarry Smith PCFactorSetUseInPlace - Tells the system to do an in-place factorization. 52485317021SBarry Smith For dense matrices, this enables the solution of much larger problems. 52585317021SBarry Smith For sparse matrices the factorization cannot be done truly in-place 52685317021SBarry Smith so this does not save memory during the factorization, but after the matrix 52785317021SBarry Smith is factored, the original unfactored matrix is freed, thus recovering that 52885317021SBarry Smith space. 52985317021SBarry Smith 530ad4df100SBarry Smith Logically Collective on PC 53185317021SBarry Smith 53285317021SBarry Smith Input Parameters: 5338e37d05fSBarry Smith + pc - the preconditioner context 5348e37d05fSBarry Smith - flg - PETSC_TRUE to enable, PETSC_FALSE to disable 53585317021SBarry Smith 53685317021SBarry Smith Options Database Key: 5378e37d05fSBarry Smith . -pc_factor_in_place <true,false>- Activate/deactivate in-place factorization 53885317021SBarry Smith 53985317021SBarry Smith Notes: 54085317021SBarry Smith PCFactorSetUseInplace() can only be used with the KSP method KSPPREONLY or when 54185317021SBarry Smith a different matrix is provided for the multiply and the preconditioner in 54285317021SBarry Smith a call to KSPSetOperators(). 54385317021SBarry Smith This is because the Krylov space methods require an application of the 54485317021SBarry Smith matrix multiplication, which is not possible here because the matrix has 54585317021SBarry Smith been factored in-place, replacing the original matrix. 54685317021SBarry Smith 54785317021SBarry Smith Level: intermediate 54885317021SBarry Smith 54985317021SBarry Smith .keywords: PC, set, factorization, direct, inplace, in-place, LU 55085317021SBarry Smith 5518e37d05fSBarry Smith .seealso: PCFactorGetUseInPlace() 55285317021SBarry Smith @*/ 5538e37d05fSBarry Smith PetscErrorCode PCFactorSetUseInPlace(PC pc,PetscBool flg) 55485317021SBarry Smith { 5554ac538c5SBarry Smith PetscErrorCode ierr; 55685317021SBarry Smith 55785317021SBarry Smith PetscFunctionBegin; 5580700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 5598e37d05fSBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetUseInPlace_C",(PC,PetscBool),(pc,flg));CHKERRQ(ierr); 5608e37d05fSBarry Smith PetscFunctionReturn(0); 5618e37d05fSBarry Smith } 5628e37d05fSBarry Smith 5638e37d05fSBarry Smith /*@ 5648e37d05fSBarry Smith PCFactorGetUseInPlace - Determines if an in-place factorization is being used. 5658e37d05fSBarry Smith 5668e37d05fSBarry Smith Logically Collective on PC 5678e37d05fSBarry Smith 5688e37d05fSBarry Smith Input Parameter: 5698e37d05fSBarry Smith . pc - the preconditioner context 5708e37d05fSBarry Smith 5718e37d05fSBarry Smith Output Parameter: 5728e37d05fSBarry Smith . flg - PETSC_TRUE to enable, PETSC_FALSE to disable 5738e37d05fSBarry Smith 5748e37d05fSBarry Smith Level: intermediate 5758e37d05fSBarry Smith 5768e37d05fSBarry Smith .keywords: PC, set, factorization, direct, inplace, in-place, LU 5778e37d05fSBarry Smith 5788e37d05fSBarry Smith .seealso: PCFactorSetUseInPlace() 5798e37d05fSBarry Smith @*/ 5808e37d05fSBarry Smith PetscErrorCode PCFactorGetUseInPlace(PC pc,PetscBool *flg) 5818e37d05fSBarry Smith { 5828e37d05fSBarry Smith PetscErrorCode ierr; 5838e37d05fSBarry Smith 5848e37d05fSBarry Smith PetscFunctionBegin; 5858e37d05fSBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 586c60c7ad4SBarry Smith ierr = PetscUseMethod(pc,"PCFactorGetUseInPlace_C",(PC,PetscBool*),(pc,flg));CHKERRQ(ierr); 58785317021SBarry Smith PetscFunctionReturn(0); 58885317021SBarry Smith } 58985317021SBarry Smith 59085317021SBarry Smith /*@C 59185317021SBarry Smith PCFactorSetMatOrderingType - Sets the ordering routine (to reduce fill) to 59285317021SBarry Smith be used in the LU factorization. 59385317021SBarry Smith 594ad4df100SBarry Smith Logically Collective on PC 59585317021SBarry Smith 59685317021SBarry Smith Input Parameters: 59785317021SBarry Smith + pc - the preconditioner context 5982692d6eeSBarry Smith - ordering - the matrix ordering name, for example, MATORDERINGND or MATORDERINGRCM 59985317021SBarry Smith 60085317021SBarry Smith Options Database Key: 60185317021SBarry Smith . -pc_factor_mat_ordering_type <nd,rcm,...> - Sets ordering routine 60285317021SBarry Smith 60385317021SBarry Smith Level: intermediate 60485317021SBarry Smith 605*95452b02SPatrick Sanan Notes: 606*95452b02SPatrick Sanan nested dissection is used by default 60785317021SBarry Smith 60885317021SBarry Smith For Cholesky and ICC and the SBAIJ format reorderings are not available, 60985317021SBarry Smith since only the upper triangular part of the matrix is stored. You can use the 61085317021SBarry Smith SeqAIJ format in this case to get reorderings. 61185317021SBarry Smith 61285317021SBarry Smith @*/ 61319fd82e9SBarry Smith PetscErrorCode PCFactorSetMatOrderingType(PC pc,MatOrderingType ordering) 61485317021SBarry Smith { 6154ac538c5SBarry Smith PetscErrorCode ierr; 61685317021SBarry Smith 61785317021SBarry Smith PetscFunctionBegin; 618c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 61919fd82e9SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetMatOrderingType_C",(PC,MatOrderingType),(pc,ordering));CHKERRQ(ierr); 62085317021SBarry Smith PetscFunctionReturn(0); 62185317021SBarry Smith } 62285317021SBarry Smith 62385317021SBarry Smith /*@ 6248ff23777SHong Zhang PCFactorSetColumnPivot - Determines when column pivoting is done during matrix factorization. 62585317021SBarry Smith For PETSc dense matrices column pivoting is always done, for PETSc sparse matrices 626e3c5b3baSBarry Smith it is never done. For the MATLAB and SuperLU factorization this is used. 62785317021SBarry Smith 628ad4df100SBarry Smith Logically Collective on PC 62985317021SBarry Smith 63085317021SBarry Smith Input Parameters: 63185317021SBarry Smith + pc - the preconditioner context 63285317021SBarry Smith - dtcol - 0.0 implies no pivoting, 1.0 complete pivoting (slower, requires more memory but more stable) 63385317021SBarry Smith 63485317021SBarry Smith Options Database Key: 63585317021SBarry Smith . -pc_factor_pivoting <dtcol> 63685317021SBarry Smith 63785317021SBarry Smith Level: intermediate 63885317021SBarry Smith 63985317021SBarry Smith .seealso: PCILUSetMatOrdering(), PCFactorSetPivotInBlocks() 64085317021SBarry Smith @*/ 6417087cfbeSBarry Smith PetscErrorCode PCFactorSetColumnPivot(PC pc,PetscReal dtcol) 64285317021SBarry Smith { 6434ac538c5SBarry Smith PetscErrorCode ierr; 64485317021SBarry Smith 64585317021SBarry Smith PetscFunctionBegin; 646c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 647c5eb9154SBarry Smith PetscValidLogicalCollectiveReal(pc,dtcol,2); 6484ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetColumnPivot_C",(PC,PetscReal),(pc,dtcol));CHKERRQ(ierr); 64985317021SBarry Smith PetscFunctionReturn(0); 65085317021SBarry Smith } 65185317021SBarry Smith 65285317021SBarry Smith /*@ 65385317021SBarry Smith PCFactorSetPivotInBlocks - Determines if pivoting is done while factoring each block 65485317021SBarry Smith with BAIJ or SBAIJ matrices 65585317021SBarry Smith 656ad4df100SBarry Smith Logically Collective on PC 65785317021SBarry Smith 65885317021SBarry Smith Input Parameters: 65985317021SBarry Smith + pc - the preconditioner context 66085317021SBarry Smith - pivot - PETSC_TRUE or PETSC_FALSE 66185317021SBarry Smith 66285317021SBarry Smith Options Database Key: 66385317021SBarry Smith . -pc_factor_pivot_in_blocks <true,false> 66485317021SBarry Smith 66585317021SBarry Smith Level: intermediate 66685317021SBarry Smith 6678ff23777SHong Zhang .seealso: PCILUSetMatOrdering(), PCFactorSetColumnPivot() 66885317021SBarry Smith @*/ 6697087cfbeSBarry Smith PetscErrorCode PCFactorSetPivotInBlocks(PC pc,PetscBool pivot) 67085317021SBarry Smith { 6714ac538c5SBarry Smith PetscErrorCode ierr; 67285317021SBarry Smith 67385317021SBarry Smith PetscFunctionBegin; 674c5eb9154SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,1); 675acfcf0e5SJed Brown PetscValidLogicalCollectiveBool(pc,pivot,2); 6764ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetPivotInBlocks_C",(PC,PetscBool),(pc,pivot));CHKERRQ(ierr); 67785317021SBarry Smith PetscFunctionReturn(0); 67885317021SBarry Smith } 67985317021SBarry Smith 68085317021SBarry Smith /*@ 681288e7d53SBarry Smith PCFactorSetReuseFill - When matrices with different nonzero structure are factored, 68285317021SBarry Smith this causes later ones to use the fill ratio computed in the initial factorization. 68385317021SBarry Smith 684ad4df100SBarry Smith Logically Collective on PC 68585317021SBarry Smith 68685317021SBarry Smith Input Parameters: 68785317021SBarry Smith + pc - the preconditioner context 68885317021SBarry Smith - flag - PETSC_TRUE to reuse else PETSC_FALSE 68985317021SBarry Smith 69085317021SBarry Smith Options Database Key: 69185317021SBarry Smith . -pc_factor_reuse_fill - Activates PCFactorSetReuseFill() 69285317021SBarry Smith 69385317021SBarry Smith Level: intermediate 69485317021SBarry Smith 69585317021SBarry Smith .keywords: PC, levels, reordering, factorization, incomplete, Cholesky 69685317021SBarry Smith 69785317021SBarry Smith .seealso: PCFactorSetReuseOrdering() 69885317021SBarry Smith @*/ 6997087cfbeSBarry Smith PetscErrorCode PCFactorSetReuseFill(PC pc,PetscBool flag) 70085317021SBarry Smith { 7014ac538c5SBarry Smith PetscErrorCode ierr; 70285317021SBarry Smith 70385317021SBarry Smith PetscFunctionBegin; 7040700a824SBarry Smith PetscValidHeaderSpecific(pc,PC_CLASSID,2); 705acfcf0e5SJed Brown PetscValidLogicalCollectiveBool(pc,flag,2); 7064ac538c5SBarry Smith ierr = PetscTryMethod(pc,"PCFactorSetReuseFill_C",(PC,PetscBool),(pc,flag));CHKERRQ(ierr); 70785317021SBarry Smith PetscFunctionReturn(0); 70885317021SBarry Smith } 7093d1c1ea0SBarry Smith 7103d1c1ea0SBarry Smith PetscErrorCode PCFactorInitialize(PC pc) 7113d1c1ea0SBarry Smith { 7123d1c1ea0SBarry Smith PetscErrorCode ierr; 7133d1c1ea0SBarry Smith PC_Factor *fact = (PC_Factor*)pc->data; 7143d1c1ea0SBarry Smith 7153d1c1ea0SBarry Smith PetscFunctionBegin; 7163d1c1ea0SBarry Smith ierr = MatFactorInfoInitialize(&fact->info);CHKERRQ(ierr); 7173d1c1ea0SBarry Smith fact->info.shifttype = (PetscReal)MAT_SHIFT_NONE; 7183d1c1ea0SBarry Smith fact->info.shiftamount = 100.0*PETSC_MACHINE_EPSILON; 7193d1c1ea0SBarry Smith fact->info.zeropivot = 100.0*PETSC_MACHINE_EPSILON; 7203d1c1ea0SBarry Smith fact->info.pivotinblocks = 1.0; 7213d1c1ea0SBarry Smith pc->ops->getfactoredmatrix = PCFactorGetMatrix_Factor; 7223d1c1ea0SBarry Smith 7233d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetZeroPivot_C",PCFactorSetZeroPivot_Factor);CHKERRQ(ierr); 7243d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetZeroPivot_C",PCFactorGetZeroPivot_Factor);CHKERRQ(ierr); 7253d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftType_C",PCFactorSetShiftType_Factor);CHKERRQ(ierr); 7263d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetShiftType_C",PCFactorGetShiftType_Factor);CHKERRQ(ierr); 7273d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftAmount_C",PCFactorSetShiftAmount_Factor);CHKERRQ(ierr); 7283d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetShiftAmount_C",PCFactorGetShiftAmount_Factor);CHKERRQ(ierr); 7293ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetMatSolverType_C",PCFactorGetMatSolverType_Factor);CHKERRQ(ierr); 7303ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatSolverType_C",PCFactorSetMatSolverType_Factor);CHKERRQ(ierr); 7313ca39a21SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetUpMatSolverType_C",PCFactorSetUpMatSolverType_Factor);CHKERRQ(ierr); 7323d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetFill_C",PCFactorSetFill_Factor);CHKERRQ(ierr); 7333d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatOrderingType_C",PCFactorSetMatOrderingType_Factor);CHKERRQ(ierr); 7343d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetLevels_C",PCFactorSetLevels_Factor);CHKERRQ(ierr); 7353d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetLevels_C",PCFactorGetLevels_Factor);CHKERRQ(ierr); 7363d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetAllowDiagonalFill_C",PCFactorSetAllowDiagonalFill_Factor);CHKERRQ(ierr); 7373d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetAllowDiagonalFill_C",PCFactorGetAllowDiagonalFill_Factor);CHKERRQ(ierr); 7383d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetPivotInBlocks_C",PCFactorSetPivotInBlocks_Factor);CHKERRQ(ierr); 7393d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetUseInPlace_C",PCFactorSetUseInPlace_Factor);CHKERRQ(ierr); 7403d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetUseInPlace_C",PCFactorGetUseInPlace_Factor);CHKERRQ(ierr); 7413d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseOrdering_C",PCFactorSetReuseOrdering_Factor);CHKERRQ(ierr); 7423d1c1ea0SBarry Smith ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseFill_C",PCFactorSetReuseFill_Factor);CHKERRQ(ierr); 7433d1c1ea0SBarry Smith PetscFunctionReturn(0); 7443d1c1ea0SBarry Smith } 745