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
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
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));

Reply via email to