Home
last modified time | relevance | path

Searched refs:hessian (Results 1 – 18 of 18) sorted by relevance

/petsc/src/tao/quadratic/impls/bqpip/
H A Dbqpip.c24 PetscCall(MatMult(tao->hessian, tao->solution, qp->RHS)); in QPIPComputeResidual()
41 PetscCall(MatMult(tao->hessian, tao->solution, tao->gradient)); in QPIPSetInitialPoint()
70 PetscCall(MatMult(tao->hessian, qp->Work, qp->RHS)); in QPIPSetInitialPoint()
278 PetscCall(TaoComputeHessian(tao, qp->Work, tao->hessian, tao->hessian_pre)); in TaoSolve_BQPIP()
279 PetscCall(MatHasOperation(tao->hessian, MATOP_GET_DIAGONAL, &getdiagop)); in TaoSolve_BQPIP()
280 if (getdiagop) PetscCall(MatGetDiagonal(tao->hessian, qp->HDiag)); in TaoSolve_BQPIP()
329 PetscCall(MatDiagonalSet(tao->hessian, qp->DiagAxpy, ADD_VALUES)); in TaoSolve_BQPIP()
334 PetscCall(MatAssemblyBegin(tao->hessian, MAT_FINAL_ASSEMBLY)); in TaoSolve_BQPIP()
335 PetscCall(MatAssemblyEnd(tao->hessian, MAT_FINAL_ASSEMBLY)); in TaoSolve_BQPIP()
337 PetscCall(KSPSetOperators(tao->ksp, tao->hessian, tao->hessian_pre)); in TaoSolve_BQPIP()
[all …]
/petsc/src/tao/bound/impls/bqnk/
H A Dbqnk.c12 if (tao->hessian) PetscCall(MatDestroy(&tao->hessian)); in TaoBQNKComputeHessian()
15 tao->hessian = bqnk->B; in TaoBQNKComputeHessian()
29 PetscCall(MatLMVMUpdate(tao->hessian, tao->solution, bnk->unprojected_gradient)); in TaoBQNKComputeHessian()
30 PetscCall(MatLMVMResetShift(tao->hessian)); in TaoBQNKComputeHessian()
34 …PetscCall(MatCreateSubMatrixVirtual(tao->hessian, bnk->inactive_idx, bnk->inactive_idx, &bnk->H_in… in TaoBQNKComputeHessian()
37 PetscCall(PetscObjectReference((PetscObject)tao->hessian)); in TaoBQNKComputeHessian()
38 bnk->H_inactive = tao->hessian; in TaoBQNKComputeHessian()
/petsc/src/tao/interface/
H A Dtaosolver_hj.c43 PetscCall(MatDestroy(&tao->hessian)); in TaoSetHessian()
44 tao->hessian = H; in TaoSetHessian()
83 if (H) *H = tao->hessian; in TaoGetHessian()
92 Mat A, B, C, D, hessian; in TaoTestHessian() local
128 PetscCall(PetscObjectTypeCompare((PetscObject)tao->hessian, MATMFFD, &flg)); in TaoTestHessian()
129 if (!flg) hessian = tao->hessian; in TaoTestHessian()
130 else hessian = tao->hessian_pre; in TaoTestHessian()
132 while (hessian) { in TaoTestHessian()
133 …PetscCall(PetscObjectBaseTypeCompareAny((PetscObject)hessian, &flg, MATSEQAIJ, MATMPIAIJ, MATSEQDE… in TaoTestHessian()
135 A = hessian; in TaoTestHessian()
[all …]
H A Dtaosolver.c290 PetscCall(MatDestroy(&(*tao)->hessian)); in TaoDestroy()
/petsc/src/tao/quadratic/impls/gpcg/
H A Dgpcg.c68 PetscCall(MatMult(tao->hessian, X, G)); in GPCGObjectiveAndGradient()
121 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_GPCG()
124 PetscCall(MatMult(tao->hessian, tao->solution, gpcg->Work)); in TaoSolve_GPCG()
167 …PetscCall(TaoMatGetSubMat(tao->hessian, gpcg->Free_Local, gpcg->Work, tao->subset_type, &gpcg->Hsu… in TaoSolve_GPCG()
169 if (tao->hessian_pre == tao->hessian) { in TaoSolve_GPCG()
174 …PetscCall(TaoMatGetSubMat(tao->hessian, gpcg->Free_Local, gpcg->Work, tao->subset_type, &gpcg->Hsu… in TaoSolve_GPCG()
238 PetscCall(MatMult(tao->hessian, DX, Work)); in GPCGGradProjections()
/petsc/src/tao/constrained/impls/admm/
H A Dadmm.c282 PetscCall(ADMMInternalHessianUpdate(am->subsolverX->hessian, am->ATA, am->xJI, am)); in SubHessianUpdate()
286 PetscCall(ADMMInternalHessianUpdate(am->subsolverX->hessian, am->ATA, am->xJI, am)); in SubHessianUpdate()
302 PetscCall(ADMMInternalHessianUpdate(am->subsolverZ->hessian, am->BTB, am->zJI, am)); in RegHessianUpdate()
306 PetscCall(ADMMInternalHessianUpdate(am->subsolverZ->hessian, am->BTB, am->zJI, am)); in RegHessianUpdate()
382 if (am->subsolverX->hessian) { in TaoSolve_ADMM()
386 PetscCall(MatAXPY(am->subsolverX->hessian, am->mu, am->ATA, DIFFERENT_NONZERO_PATTERN)); in TaoSolve_ADMM()
388 PetscCall(MatShift(am->subsolverX->hessian, am->mu)); in TaoSolve_ADMM()
391 if (am->subsolverZ->hessian && am->regswitch == TAO_ADMM_REGULARIZER_USER) { in TaoSolve_ADMM()
393 PetscCall(MatAXPY(am->subsolverZ->hessian, am->mu, am->BTB, DIFFERENT_NONZERO_PATTERN)); in TaoSolve_ADMM()
395 PetscCall(MatShift(am->subsolverZ->hessian, am->mu)); in TaoSolve_ADMM()
/petsc/src/tao/bound/impls/tron/
H A Dtron.c123 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_TRON()
144 …PetscCall(TaoMatGetSubMat(tao->hessian, tron->Free_Local, tron->diag, tao->subset_type, &tron->H_s… in TaoSolve_TRON()
145 if (tao->hessian == tao->hessian_pre) { in TaoSolve_TRON()
178 PetscCall(MatMult(tao->hessian, tao->stepdirection, tron->Work)); in TaoSolve_TRON()
/petsc/src/tao/bound/impls/bnk/
H A Dbnk.c19 …PetscCall(MatCreateSubMatrix(tao->hessian, bnk->inactive_idx, bnk->inactive_idx, MAT_INITIAL_MATRI… in TaoBNKComputeSubHessian()
20 if (tao->hessian == tao->hessian_pre) { in TaoBNKComputeSubHessian()
28 PetscCall(PetscObjectReference((PetscObject)tao->hessian)); in TaoBNKComputeSubHessian()
29 bnk->H_inactive = tao->hessian; in TaoBNKComputeSubHessian()
285 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoBNKComputeHessian()
317 if (tao->hessian) PetscCall(MatAssembled(tao->hessian, &hessComputed)); in TaoBNKEstimateActiveSet()
318 if (hessComputed) PetscCall(MatHasOperation(tao->hessian, MATOP_GET_DIAGONAL, &diagExists)); in TaoBNKEstimateActiveSet()
321 PetscCall(MatGetDiagonal(tao->hessian, bnk->Xwork)); in TaoBNKEstimateActiveSet()
418 PetscCall(PetscObjectTypeCompare((PetscObject)tao->hessian, MATLMVM, &is_lmvm)); in TaoBNKComputeStep()
420 PetscCall(MatShift(tao->hessian, bnk->pert)); in TaoBNKComputeStep()
/petsc/src/tao/constrained/impls/ipm/
H A Dpdipm.c287 PetscCall(MatGetOwnershipRangesColumn(tao->hessian, &rranges)); in TaoSNESJacobian_PDIPM()
288 PetscCall(MatGetOwnershipRangesColumn(tao->hessian, &cranges)); in TaoSNESJacobian_PDIPM()
363 PetscCall(TaoComputeHessian(tao, pdipm->x, tao->hessian, tao->hessian_pre)); in TaoSNESJacobian_PDIPM()
366 PetscCall(MatGetOwnershipRange(tao->hessian, &rjstart, NULL)); in TaoSNESJacobian_PDIPM()
371 PetscCall(MatGetRow(tao->hessian, i + rjstart, &nc, &aj, &aa)); in TaoSNESJacobian_PDIPM()
383 PetscCall(MatRestoreRow(tao->hessian, i + rjstart, &nc, &aj, &aa)); in TaoSNESJacobian_PDIPM()
1043 PetscCall(MatGetOwnershipRanges(tao->hessian, &rranges)); in TaoSetup_PDIPM()
1044 PetscCall(MatGetOwnershipRangesColumn(tao->hessian, &cranges)); in TaoSetup_PDIPM()
1065 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSetup_PDIPM()
1068 PetscCall(MatGetOwnershipRange(tao->hessian, &rjstart, NULL)); in TaoSetup_PDIPM()
[all …]
H A Dipm.c622 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in IPMEvaluate()
833 PetscCall(MatGetOwnershipRange(tao->hessian, &hstart, &hend)); in IPMUpdateK()
840 PetscCall(MatGetRow(tao->hessian, i, &ncols, NULL, NULL)); in IPMUpdateK()
842 PetscCall(MatRestoreRow(tao->hessian, i, &ncols, NULL, NULL)); in IPMUpdateK()
890 PetscCall(MatGetRow(tao->hessian, i, &ncols, &cols, &vals)); in IPMUpdateK()
892 PetscCall(MatRestoreRow(tao->hessian, i, &ncols, &cols, &vals)); in IPMUpdateK()
/petsc/src/tao/unconstrained/impls/nls/
H A Dnls.c138 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NLS()
154 PetscCall(MatMult(tao->hessian, tao->gradient, nlsP->D)); in TaoSolve_NLS()
261 if (needH) PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NLS()
265 PetscCall(MatShift(tao->hessian, pert)); in TaoSolve_NLS()
266 if (tao->hessian != tao->hessian_pre) PetscCall(MatShift(tao->hessian_pre, pert)); in TaoSolve_NLS()
275 PetscCall(KSPSetOperators(tao->ksp, tao->hessian, tao->hessian_pre)); in TaoSolve_NLS()
/petsc/src/tao/unconstrained/impls/ntr/
H A Dntr.c117 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NTR()
134 PetscCall(MatMult(tao->hessian, tao->gradient, tao->stepdirection)); in TaoSolve_NTR()
231 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NTR()
241 PetscCall(KSPSetOperators(tao->ksp, tao->hessian, tao->hessian_pre)); in TaoSolve_NTR()
/petsc/src/binding/petsc4py/test/
H A Dtest_tao.py66 hessian, jacobian = None, None
72 tao.setHessian(hessian)
/petsc/src/tao/unconstrained/impls/ntl/
H A Dntl.c111 PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NTL()
128 PetscCall(MatMult(tao->hessian, tao->gradient, tao->stepdirection)); in TaoSolve_NTL()
234 if (needH) PetscCall(TaoComputeHessian(tao, tao->solution, tao->hessian, tao->hessian_pre)); in TaoSolve_NTL()
241 PetscCall(KSPSetOperators(tao->ksp, tao->hessian, tao->hessian_pre)); in TaoSolve_NTL()
/petsc/include/petsc/private/
H A Dtaoimpl.h83 Mat hessian; member
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A Dpetsctao.pxi387 (hessian, args, kargs) = context
388 hessian(tao, x, H, P, *args, **kargs)
401 (hessian, args, kargs) = context
402 hessian(tao, x, H, *args, **kargs)
H A DTAO.pyx563 def setHessian(self, hessian: TAOHessianFunction, Mat H=None, Mat P=None,
571 hessian
594 context = (hessian, args, kargs)
613 cdef object hessian = self.get_attr("__hessian__")
614 return (J, P, hessian)
1824 …def setBRGNRegularizerHessian(self, hessian, Mat H=None, args: tuple[Any, ...] | None = None, karg… argument
1838 context = (hessian, args, kargs)
/petsc/share/petsc/datafiles/meshes/
H A Dtestcase3D.cas8447 (recon/hessian/lp 4.)
8448 (recon/hessian/multiscale? #t)
8449 (recon/hessian/aniso-scale? #t)
8450 (recon/hessian/scale? #t)
8451 (recon/hessian/method 2)
8452 (recon/hessian/aniso-hessian? #f)