Home
last modified time | relevance | path

Searched refs:cnorm (Results 1 – 15 of 15) sorted by relevance

/petsc/src/ksp/ksp/tutorials/
H A Dex13f90.F90243 PetscScalar cnorm
316 cnorm = 0.0
319 cnorm = cnorm + PetscConj(solution(i, j) - userx(i, j))*(solution(i, j) - userx(i, j))
322 enorm = PetscRealPart(cnorm*hx*hy)
/petsc/src/tao/interface/
H A Dtaosolver.c660 … PetscCall(PetscViewerASCIIPrintf(viewer, "Residual in Constraints:=%g\n", (double)tao->cnorm)); in TaoView()
1433 tao->cnorm = 0.0; in TaoResetStatistics()
1788 PetscCall(PetscViewerASCIIPrintf(viewer, " Constraint: %g \n", (double)tao->cnorm)); in TaoMonitorConstraintNorm()
2017 PetscReal fmin = tao->fmin, cnorm = tao->cnorm; in TaoDefaultConvergenceTest() local
2027 } else if (f <= fmin && cnorm <= catol) { in TaoDefaultConvergenceTest()
2030 } else if (gnorm <= gatol && cnorm <= catol) { in TaoDefaultConvergenceTest()
2033 } else if (f != 0 && PetscAbsReal(gnorm / f) <= grtol && cnorm <= crtol) { in TaoDefaultConvergenceTest()
2036 …} else if (gnorm0 != 0 && ((gttol == 0 && gnorm == 0) || gnorm / gnorm0 < gttol) && cnorm <= crtol… in TaoDefaultConvergenceTest()
2464 …Status(Tao tao, PetscInt *its, PetscReal *f, PetscReal *gnorm, PetscReal *cnorm, PetscReal *xdiff,… in TaoGetSolutionStatus() argument
2471 if (cnorm) *cnorm = tao->cnorm; in TaoGetSolutionStatus()
[all …]
/petsc/include/petsc/private/
H A Dtaoimpl.h114 PetscReal cnorm; member
190 …TaoLogConvergenceHistory(Tao tao, PetscReal obj, PetscReal resid, PetscReal cnorm, PetscInt totits) in TaoLogConvergenceHistory() argument
196 if (tao->hist_cnorm) tao->hist_cnorm[tao->hist_len] = cnorm; in TaoLogConvergenceHistory()
/petsc/src/tao/pde_constrained/impls/lcl/
H A Dlcl.c178 PetscReal cnorm, mnorm; in TaoSolve_LCL() local
239 PetscCall(VecNorm(tao->constraints, NORM_2, &cnorm)); in TaoSolve_LCL()
244 PetscCall(TaoLogConvergenceHistory(tao, f, mnorm, cnorm, tao->ksp_its)); in TaoSolve_LCL()
245 PetscCall(TaoMonitor(tao, tao->niter, f, mnorm, cnorm, step)); in TaoSolve_LCL()
373 PetscCall(VecNorm(tao->constraints, NORM_2, &cnorm)); in TaoSolve_LCL()
374 PetscCall(TaoLogConvergenceHistory(tao, f, mnorm, cnorm, tao->ksp_its)); in TaoSolve_LCL()
375 PetscCall(TaoMonitor(tao, tao->niter, f, mnorm, cnorm, step)); in TaoSolve_LCL()
540 PetscCall(VecNorm(tao->constraints, NORM_2, &cnorm)); in TaoSolve_LCL()
544 PetscCall(TaoLogConvergenceHistory(tao, f, mnorm, cnorm, tao->ksp_its)); in TaoSolve_LCL()
545 PetscCall(TaoMonitor(tao, tao->niter, f, mnorm, cnorm, step)); in TaoSolve_LCL()
/petsc/src/tao/unconstrained/tutorials/
H A Deptorsion2f.F90336 PetscReal f, gnorm, cnorm, xdiff
339 PetscCall(TaoGetSolutionStatus(ta, its, f, gnorm, cnorm, xdiff, reason, ierr))
354 PetscReal f, gnorm, cnorm, xdiff
357 PetscCall(TaoGetSolutionStatus(ta, its, f, gnorm, cnorm, xdiff, reason, ierr))
H A Dburgers_spectral.c561 PetscReal ff, gnorm, cnorm, xdiff, errex; in FormFunctionGradient() local
599 PetscCall(TaoGetSolutionStatus(tao, &its, &ff, &gnorm, &cnorm, &xdiff, &reason)); in FormFunctionGradient()
/petsc/src/tao/constrained/impls/almm/
H A Dalmm.c35 …PetscCall(TaoLogConvergenceHistory(tao, auglag->Lval, auglag->gnorm, auglag->cnorm, tao->ksp_its)); in TaoSolve_ALMM()
36 PetscCall(TaoMonitor(tao, tao->niter, auglag->fval, auglag->gnorm, auglag->cnorm, 0.0)); in TaoSolve_ALMM()
81 if (auglag->cnorm <= auglag->ytol) { in TaoSolve_ALMM()
114 …PetscCall(TaoLogConvergenceHistory(tao, auglag->fval, auglag->gnorm, auglag->cnorm, tao->ksp_its)); in TaoSolve_ALMM()
115 PetscCall(TaoMonitor(tao, tao->niter, auglag->fval, auglag->gnorm, auglag->cnorm, updated)); in TaoSolve_ALMM()
590 auglag->cnorm_old = auglag->cnorm; in TaoALMMComputeOptimalityNorms_Private()
591 auglag->cnorm = PetscMax(auglag->cenorm, auglag->cinorm); in TaoALMMComputeOptimalityNorms_Private()
595 PetscCall(VecNorm(auglag->C, NORM_2, &auglag->cnorm)); in TaoALMMComputeOptimalityNorms_Private()
H A Dalmm.h18 PetscReal Lval, fval, gnorm, cnorm, cenorm, cinorm, cnorm_old; /* scalar variables */ member
/petsc/src/tao/constrained/impls/ipm/
H A Dpdipm.c551 PetscReal res[2], cnorm[2]; in TaoSNESFunction_PDIPM_residual() local
590 PetscCall(VecNorm(pdipm->ci, NORM_2, &cnorm[1])); in TaoSNESFunction_PDIPM_residual()
594 cnorm[1] = 0.0; in TaoSNESFunction_PDIPM_residual()
600 PetscCall(VecNorm(pdipm->ce, NORM_2, &cnorm[0])); in TaoSNESFunction_PDIPM_residual()
602 } else cnorm[0] = 0.0; in TaoSNESFunction_PDIPM_residual()
609 tao->cnorm = PetscSqrtReal(cnorm[0] * cnorm[0] + cnorm[1] * cnorm[1]); in TaoSNESFunction_PDIPM_residual()
772 PetscCall(TaoLogConvergenceHistory(tao, pdipm->obj, tao->residual, tao->cnorm, tao->niter)); in SNESLineSearch_PDIPM()
773 PetscCall(TaoMonitor(tao, tao->niter, pdipm->obj, tao->residual, tao->cnorm, pdipm->mu)); in SNESLineSearch_PDIPM()
804 PetscCall(TaoLogConvergenceHistory(tao, pdipm->obj, tao->residual, tao->cnorm, tao->niter)); in TaoSolve_PDIPM()
805 PetscCall(TaoMonitor(tao, tao->niter, pdipm->obj, tao->residual, tao->cnorm, pdipm->mu)); in TaoSolve_PDIPM()
/petsc/src/tao/bound/tutorials/
H A Djbearing2.c430 PetscReal f, gnorm, cnorm, xdiff; in Monitor() local
434 PetscCall(TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, &reason)); in Monitor()
442 PetscReal f, gnorm, cnorm, xdiff; in ConvergenceTest() local
446 PetscCall(TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, &reason)); in ConvergenceTest()
/petsc/src/ts/tutorials/power_grid/
H A Dex3opt_fd.c26 PetscReal f, gnorm, cnorm, xdiff; in monitor() local
32 PetscCall(TaoGetSolutionStatus(tao, &iterate, &f, &gnorm, &cnorm, &xdiff, &reason)); in monitor()
H A Dex3opt.c28 PetscReal f, gnorm, cnorm, xdiff; in monitor() local
32 PetscCall(TaoGetSolutionStatus(tao, &iterate, &f, &gnorm, &cnorm, &xdiff, &reason)); in monitor()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DTAO.pyx1387 …its: int | None = None, f: float | None = None, res: float | None = None, cnorm: float | None = No…
1406 cnorm
1430 if cnorm is not None:
1431 ccnorm = asReal(cnorm)
1651 cnorm : float
1660 cdef PetscReal cnorm=0
1662 CHKERR(TaoGetSolutionStatus(self.tao, NULL, &fval, &gnorm, &cnorm, NULL, NULL))
1663 return (toReal(fval), toReal(gnorm), toReal(cnorm))
1678 cnorm : float
1691 cdef PetscReal fval=0, gnorm=0, cnorm=0, xdiff=0
[all …]
/petsc/src/tao/leastsquares/tutorials/
H A Dchwirut1f.F90312 PetscReal cnorm(100)! cnorm history
349 PetscCallA(TaoSetConvergenceHistory(ta, hist, resid, cnorm, lits, oh, PETSC_TRUE, ierr))
/petsc/doc/manual/
H A Dtao.md592 PetscReal* gnorm, PetscReal* cnorm, PetscReal* xdiff,
3184 PetscReal res, PetscReal cnorm, PetscReal steplength,