[petsc-users] Problem of using PCFactorSetDropTolerance

Barry Smith bsmith at petsc.dev
Tue Feb 27 09:07:20 CST 2024


   I'm sorry for the confusion. PETSc does not have a drop tolerance ILU so this function does nothing as you've noted.

   Barry


> On Feb 27, 2024, at 7:27 AM, Константин Мурусидзе <konstantin.murusidze at math.msu.ru> wrote:
> 
> This Message Is From an External Sender
> This message came from outside your organization.
> Hello! I have such problem, while solving linear system and using PCFactorSetDropTolerance. As I understand this  function could significantly reduce number of iterations of system of solution, but there is no iterations decreasing.I had try a lot of options for this function, but there is no result
> Could you suggest me if I have some mistake, while I setting up the preconditioner?
>  
>     PetscCall(KSPSetType(ksp, KSPCG));
>     PetscCall(KSPSetInitialGuessNonzero(ksp,PETSC_TRUE));
>     PetscCall(KSPSetNormType(ksp, KSP_NORM_DEFAULT));
>     PetscCall(KSPCGSetType(ksp, KSP_CG_SYMMETRIC));
>  
>     PetscCall(KSPGetPC(ksp, &pc));
>     PetscCall(PCSetType(pc, PCILU));
>     PetscCall(PCFactorSetShiftType(pc, MAT_SHIFT_POSITIVE_DEFINITE));
>   
>     PetscCall(PCFactorSetLevels(pc, 2));
>     PetscCall(PCFactorSetReuseOrdering(pc,PETSC_TRUE));
>     PetscCall(PCFactorSetDropTolerance(pc, 1.e-5, 1.e-3, 10000));
>     PetscCall(PCFactorSetZeroPivot(pc, 1.e-3));
>     PetscCall(KSPSetTolerances(ksp, 1.e-8, 1.e-8, PETSC_DEFAULT, PETSC_DEFAULT));
>  
>     PetscCall(KSPSetFromOptions(ksp));
>  
>     PetscCall(KSPSolve(ksp, b, x));
>      PetscCall(KSPGetIterationNumber(ksp, &its));

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240227/d500f75b/attachment-0001.html>


More information about the petsc-users mailing list