Commits

Satish Balay committed 54eda0e Merge

Merge branch 'toby/pcfactorgetlevels' into maint

  • Participants
  • Parent commits 93b5f18, 2591b31

Comments (0)

Files changed (6)

File include/petscpc.h

 PETSC_EXTERN PetscErrorCode PCFactorSetAllowDiagonalFill(PC);
 PETSC_EXTERN PetscErrorCode PCFactorSetPivotInBlocks(PC,PetscBool );
 
+PETSC_EXTERN PetscErrorCode PCFactorGetLevels(PC,PetscInt*);
 PETSC_EXTERN PetscErrorCode PCFactorSetLevels(PC,PetscInt);
 PETSC_EXTERN PetscErrorCode PCFactorSetDropTolerance(PC,PetscReal,PetscReal,PetscInt);
 

File src/ksp/pc/impls/factor/factimpl.c

 }
 
 #undef __FUNCT__
+#define __FUNCT__ "PCFactorGetLevels_Factor"
+PetscErrorCode  PCFactorGetLevels_Factor(PC pc,PetscInt *levels)
+{
+  PC_Factor      *ilu = (PC_Factor*)pc->data;
+
+  PetscFunctionBegin;
+  *levels = ilu->info.levels;
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "PCFactorSetLevels_Factor"
 PetscErrorCode  PCFactorSetLevels_Factor(PC pc,PetscInt levels)
 {

File src/ksp/pc/impls/factor/factor.c

 }
 
 #undef __FUNCT__
+#define __FUNCT__ "PCFactorGetLevels"
+/*@
+   PCFactorGetLevels - Gets the number of levels of fill to use.
+
+   Logically Collective on PC
+
+   Input Parameters:
+.  pc - the preconditioner context
+
+   Output Parameter:
+.  levels - number of levels of fill
+
+   Level: intermediate
+
+.keywords: PC, levels, fill, factorization, incomplete, ILU
+@*/
+PetscErrorCode  PCFactorGetLevels(PC pc,PetscInt *levels)
+{
+  PetscErrorCode ierr;
+
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(pc,PC_CLASSID,1);
+  ierr = PetscTryMethod(pc,"PCFactorGetLevels_C",(PC,PetscInt*),(pc,levels));CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+
+#undef __FUNCT__
 #define __FUNCT__ "PCFactorSetLevels"
 /*@
    PCFactorSetLevels - Sets the number of levels of fill to use.

File src/ksp/pc/impls/factor/factor.h

 PETSC_INTERN PetscErrorCode PCFactorSetDropTolerance_Factor(PC,PetscReal,PetscReal,PetscInt);
 PETSC_INTERN PetscErrorCode PCFactorSetFill_Factor(PC,PetscReal);
 PETSC_INTERN PetscErrorCode PCFactorSetMatOrderingType_Factor(PC,MatOrderingType);
+PETSC_INTERN PetscErrorCode PCFactorGetLevels_Factor(PC,PetscInt*);
 PETSC_INTERN PetscErrorCode PCFactorSetLevels_Factor(PC,PetscInt);
 PETSC_INTERN PetscErrorCode PCFactorSetAllowDiagonalFill_Factor(PC);
 PETSC_INTERN PetscErrorCode PCFactorSetPivotInBlocks_Factor(PC,PetscBool);

File src/ksp/pc/impls/factor/icc/icc.c

   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftType_C",PCFactorSetShiftType_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetShiftAmount_C",PCFactorSetShiftAmount_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetLevels_C",PCFactorSetLevels_Factor);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetLevels_C",PCFactorGetLevels_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetFill_C",PCFactorSetFill_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatOrderingType_C",PCFactorSetMatOrderingType_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetMatSolverPackage_C",PCFactorSetMatSolverPackage_Factor);CHKERRQ(ierr);

File src/ksp/pc/impls/factor/ilu/ilu.c

   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseOrdering_C",PCFactorSetReuseOrdering_ILU);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetReuseFill_C",PCFactorSetReuseFill_ILU);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetLevels_C",PCFactorSetLevels_Factor);CHKERRQ(ierr);
+  ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorGetLevels_C",PCFactorGetLevels_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetUseInPlace_C",PCFactorSetUseInPlace_ILU);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetAllowDiagonalFill_C",PCFactorSetAllowDiagonalFill_Factor);CHKERRQ(ierr);
   ierr = PetscObjectComposeFunction((PetscObject)pc,"PCFactorSetPivotInBlocks_C",PCFactorSetPivotInBlocks_Factor);CHKERRQ(ierr);