Lines Matching refs:sctx
461 FactorShiftCtx sctx; in MatLUFactorNumeric_SeqBAIJ_1() local
468 PetscCall(PetscMemzero(&sctx, sizeof(FactorShiftCtx))); in MatLUFactorNumeric_SeqBAIJ_1()
472 sctx.shift_top = info->zeropivot; in MatLUFactorNumeric_SeqBAIJ_1()
480 if (rs > sctx.shift_top) sctx.shift_top = rs; in MatLUFactorNumeric_SeqBAIJ_1()
482 sctx.shift_top *= 1.1; in MatLUFactorNumeric_SeqBAIJ_1()
483 sctx.nshift_max = 5; in MatLUFactorNumeric_SeqBAIJ_1()
484 sctx.shift_lo = 0.; in MatLUFactorNumeric_SeqBAIJ_1()
485 sctx.shift_hi = 1.; in MatLUFactorNumeric_SeqBAIJ_1()
494 sctx.newshift = PETSC_FALSE; in MatLUFactorNumeric_SeqBAIJ_1()
514 rtmp[i] += sctx.shift_amount; /* shift the diagonal of the matrix */ in MatLUFactorNumeric_SeqBAIJ_1()
556 sctx.rs = rs; in MatLUFactorNumeric_SeqBAIJ_1()
557 sctx.pv = rtmp[i]; in MatLUFactorNumeric_SeqBAIJ_1()
558 PetscCall(MatPivotCheck(B, A, info, &sctx, i)); in MatLUFactorNumeric_SeqBAIJ_1()
559 if (sctx.newshift) break; /* break for-loop */ in MatLUFactorNumeric_SeqBAIJ_1()
560 rtmp[i] = sctx.pv; /* sctx.pv might be updated in the case of MAT_SHIFT_INBLOCKS */ in MatLUFactorNumeric_SeqBAIJ_1()
569 …= (PetscReal)MAT_SHIFT_POSITIVE_DEFINITE && !sctx.newshift && sctx.shift_fraction > 0 && sctx.nshi… in MatLUFactorNumeric_SeqBAIJ_1()
574 sctx.shift_hi = sctx.shift_fraction; in MatLUFactorNumeric_SeqBAIJ_1()
575 sctx.shift_fraction = (sctx.shift_hi + sctx.shift_lo) / 2.; in MatLUFactorNumeric_SeqBAIJ_1()
576 sctx.shift_amount = sctx.shift_fraction * sctx.shift_top; in MatLUFactorNumeric_SeqBAIJ_1()
577 sctx.newshift = PETSC_TRUE; in MatLUFactorNumeric_SeqBAIJ_1()
578 sctx.nshift++; in MatLUFactorNumeric_SeqBAIJ_1()
580 } while (sctx.newshift); in MatLUFactorNumeric_SeqBAIJ_1()
601 if (sctx.nshift) { in MatLUFactorNumeric_SeqBAIJ_1()
603 … up by %e fraction top_value %e\n", sctx.nshift, (double)sctx.shift_amount, (double)sctx.shift_fra… in MatLUFactorNumeric_SeqBAIJ_1()
605 …number of shift_nz tries %" PetscInt_FMT ", shift_amount %g\n", sctx.nshift, (double)sctx.shift_am… in MatLUFactorNumeric_SeqBAIJ_1()
607 …ber of shift_inblocks applied %" PetscInt_FMT ", each shift_amount %g\n", sctx.nshift, (double)inf… in MatLUFactorNumeric_SeqBAIJ_1()
758 FactorShiftCtx sctx; in MatCholeskyFactorNumeric_SeqBAIJ_N() local
773 PetscCall(PetscMemzero(&sctx, sizeof(FactorShiftCtx))); in MatCholeskyFactorNumeric_SeqBAIJ_N()
778 sctx.shift_amount = 0.; in MatCholeskyFactorNumeric_SeqBAIJ_N()
779 sctx.nshift = 0; in MatCholeskyFactorNumeric_SeqBAIJ_N()
781 sctx.newshift = PETSC_FALSE; in MatCholeskyFactorNumeric_SeqBAIJ_N()
802 if (sctx.nshift) rtmp[k] += sctx.shift_amount; in MatCholeskyFactorNumeric_SeqBAIJ_N()
844 sctx.rs = rs; in MatCholeskyFactorNumeric_SeqBAIJ_N()
845 sctx.pv = dk; in MatCholeskyFactorNumeric_SeqBAIJ_N()
846 PetscCall(MatPivotCheck(C, A, info, &sctx, k)); in MatCholeskyFactorNumeric_SeqBAIJ_N()
847 if (sctx.newshift) break; in MatCholeskyFactorNumeric_SeqBAIJ_N()
848 dk = sctx.pv; in MatCholeskyFactorNumeric_SeqBAIJ_N()
867 } while (sctx.newshift); in MatCholeskyFactorNumeric_SeqBAIJ_N()
876 if (sctx.nshift) { in MatCholeskyFactorNumeric_SeqBAIJ_N()
878 …"number of shiftpd tries %" PetscInt_FMT ", shift_amount %g\n", sctx.nshift, (double)sctx.shift_am… in MatCholeskyFactorNumeric_SeqBAIJ_N()
880 …"number of shiftnz tries %" PetscInt_FMT ", shift_amount %g\n", sctx.nshift, (double)sctx.shift_am… in MatCholeskyFactorNumeric_SeqBAIJ_N()
895 FactorShiftCtx sctx; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering() local
899 PetscCall(PetscMemzero(&sctx, sizeof(FactorShiftCtx))); in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
904 sctx.newshift = PETSC_FALSE; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
928 if (sctx.nshift) rtmp[k] += sctx.shift_amount; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
971 sctx.rs = rs; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
972 sctx.pv = dk; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
973 PetscCall(MatPivotCheck(C, A, info, &sctx, k)); in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
974 if (sctx.newshift) break; /* sctx.shift_amount is updated */ in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
975 dk = sctx.pv; in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
995 } while (sctx.newshift); in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
1004 if (sctx.nshift) { in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
1006 …"number of shiftnz tries %" PetscInt_FMT ", shift_amount %g\n", sctx.nshift, (double)sctx.shift_am… in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()
1008 …"number of shiftpd tries %" PetscInt_FMT ", shift_amount %g\n", sctx.nshift, (double)sctx.shift_am… in MatCholeskyFactorNumeric_SeqBAIJ_N_NaturalOrdering()