| /petsc/src/tao/unconstrained/impls/cg/ |
| H A D | taocg.c | 35 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG() 36 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_CG() 64 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoSolve_CG() 77 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG() 78 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_CG() 83 …neSearchApply(tao->linesearch, tao->solution, &f, tao->gradient, tao->stepdirection, &step, &ls_st… in TaoSolve_CG() 104 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG() 105 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_CG() 108 …neSearchApply(tao->linesearch, tao->solution, &f, tao->gradient, tao->stepdirection, &step, &ls_st… in TaoSolve_CG() 118 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG() [all …]
|
| /petsc/src/tao/bound/impls/bncg/ |
| H A D | bncg.c | 127 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_BNCG() 407 PetscCall(VecAXPBY(tao->stepdirection, -scaling, 0.0, tao->gradient)); in TaoBNCGResetUpdate() 451 PetscCall(VecDot(cg->yk, tao->stepdirection, &dk_yk)); in TaoBNCGStepDirectionUpdate() 496 PetscCall(VecAXPBY(tao->stepdirection, -1.0, 0.0, cg->g_work)); in TaoBNCGStepDirectionUpdate() 508 PetscCall(VecAXPBY(tao->stepdirection, -tau_k, 0.0, tao->gradient)); in TaoBNCGStepDirectionUpdate() 511 PetscCall(VecAXPBY(tao->stepdirection, -1.0, 0.0, cg->g_work)); in TaoBNCGStepDirectionUpdate() 522 PetscCall(VecAXPBY(tao->stepdirection, -tau_k, beta, tao->gradient)); in TaoBNCGStepDirectionUpdate() 527 PetscCall(VecAXPBY(tao->stepdirection, -1.0, beta, cg->g_work)); in TaoBNCGStepDirectionUpdate() 536 PetscCall(VecDot(cg->yk, tao->stepdirection, &dk_yk)); in TaoBNCGStepDirectionUpdate() 540 PetscCall(VecAXPBY(tao->stepdirection, -tau_k, beta, tao->gradient)); in TaoBNCGStepDirectionUpdate() [all …]
|
| /petsc/src/tao/complementarity/impls/ssls/ |
| H A D | ssils.c | 9 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_SSILS() 74 PetscCall(KSPSolve(tao->ksp, ssls->ff, tao->stepdirection)); in TaoSolve_SSILS() 77 PetscCall(VecNorm(tao->stepdirection, NORM_2, &normd)); in TaoSolve_SSILS() 78 PetscCall(VecDot(tao->stepdirection, ssls->dpsi, &innerd)); in TaoSolve_SSILS() 83 PetscCall(VecCopy(ssls->dpsi, tao->stepdirection)); in TaoSolve_SSILS() 84 PetscCall(VecDot(tao->stepdirection, ssls->dpsi, &innerd)); in TaoSolve_SSILS() 87 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_SSILS() 91 …ineSearchApply(tao->linesearch, tao->solution, &psi, ssls->dpsi, tao->stepdirection, &t, &ls_reaso… in TaoSolve_SSILS()
|
| H A D | ssfls.c | 9 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_SSFLS() 61 PetscCall(KSPSolve(tao->ksp, ssls->ff, tao->stepdirection)); in TaoSolve_SSFLS() 65 PetscCall(VecCopy(tao->stepdirection, ssls->w)); in TaoSolve_SSFLS() 75 PetscCall(VecCopy(ssls->dpsi, tao->stepdirection)); in TaoSolve_SSFLS() 79 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_SSFLS() 83 …ineSearchApply(tao->linesearch, tao->solution, &psi, ssls->dpsi, tao->stepdirection, &t, &ls_reaso… in TaoSolve_SSFLS()
|
| /petsc/src/tao/complementarity/impls/asls/ |
| H A D | asils.c | 47 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_ASILS() 185 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoSolve_ASILS() 186 PetscCall(VecISAXPY(tao->stepdirection, asls->fixed, 1.0, asls->r1)); in TaoSolve_ASILS() 207 PetscCall(MatMult(tao->jacobian, tao->stepdirection, asls->t1)); in TaoSolve_ASILS() 222 … PetscCall(TaoVecGetSubVec(tao->stepdirection, asls->free, tao->subset_type, 0.0, &asls->dxfree)); in TaoSolve_ASILS() 234 PetscCall(VecISAXPY(tao->stepdirection, asls->free, 1.0, asls->dxfree)); in TaoSolve_ASILS() 238 PetscCall(VecNorm(tao->stepdirection, NORM_2, &normd)); in TaoSolve_ASILS() 239 PetscCall(VecDot(tao->stepdirection, asls->dpsi, &innerd)); in TaoSolve_ASILS() 244 PetscCall(VecCopy(asls->dpsi, tao->stepdirection)); in TaoSolve_ASILS() 245 PetscCall(VecDot(asls->dpsi, tao->stepdirection, &innerd)); in TaoSolve_ASILS() [all …]
|
| H A D | asfls.c | 47 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_ASFLS() 188 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoSolve_ASFLS() 189 PetscCall(VecISAXPY(tao->stepdirection, asls->fixed, 1.0, asls->r1)); in TaoSolve_ASFLS() 210 PetscCall(MatMult(tao->jacobian, tao->stepdirection, asls->t1)); in TaoSolve_ASFLS() 224 … PetscCall(TaoVecGetSubVec(tao->stepdirection, asls->free, tao->subset_type, 0.0, &asls->dxfree)); in TaoSolve_ASFLS() 236 PetscCall(VecISAXPY(tao->stepdirection, asls->free, 1.0, asls->dxfree)); in TaoSolve_ASFLS() 240 PetscCall(VecCopy(tao->stepdirection, asls->w)); in TaoSolve_ASFLS() 249 PetscCall(VecCopy(asls->dpsi, tao->stepdirection)); in TaoSolve_ASFLS() 250 PetscCall(VecDot(asls->dpsi, tao->stepdirection, &innerd)); in TaoSolve_ASFLS() 253 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_ASFLS() [all …]
|
| /petsc/src/tao/unconstrained/impls/ntl/ |
| H A D | ntl.c | 128 PetscCall(MatMult(tao->hessian, tao->gradient, tao->stepdirection)); in TaoSolve_NTL() 129 PetscCall(VecDot(tao->gradient, tao->stepdirection, &prered)); in TaoSolve_NTL() 244 PetscCall(KSPSolve(tao->ksp, tao->gradient, tao->stepdirection)); in TaoSolve_NTL() 268 PetscCall(KSPSolve(tao->ksp, tao->gradient, tao->stepdirection)); in TaoSolve_NTL() 278 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_NTL() 302 PetscCall(VecAXPY(tl->W, 1.0, tao->stepdirection)); in TaoSolve_NTL() 352 PetscCall(VecAXPY(tl->W, 1.0, tao->stepdirection)); in TaoSolve_NTL() 358 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoSolve_NTL() 418 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_NTL() 425 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_NTL() [all …]
|
| /petsc/src/tao/bound/impls/bnk/ |
| H A D | bnk.c | 97 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoBNKInitialize() 240 PetscCall(VecCopy(tao->solution, tao->stepdirection)); in TaoBNKInitialize() 241 PetscCall(VecAXPY(tao->stepdirection, -1.0, bnk->Xold)); in TaoBNKInitialize() 411 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoBNKComputeStep() 412 PetscCall(TaoBNKBoundStep(tao, bnk->as_type, tao->stepdirection)); in TaoBNKComputeStep() 429 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoBNKComputeStep() 439 PetscCall(VecGetSubVector(tao->stepdirection, bnk->inactive_idx, &bnk->X_inactive)); in TaoBNKComputeStep() 442 bnk->X_inactive = tao->stepdirection; in TaoBNKComputeStep() 484 PetscCall(VecRestoreSubVector(tao->stepdirection, bnk->inactive_idx, &bnk->X_inactive)); in TaoBNKComputeStep() 487 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoBNKComputeStep() [all …]
|
| H A D | bntr.c | 139 PetscCall(VecAXPY(tao->solution, 1.0, tao->stepdirection)); in TaoSolve_BNTR() 146 PetscCall(VecCopy(tao->solution, tao->stepdirection)); in TaoSolve_BNTR() 147 PetscCall(VecAXPY(tao->stepdirection, -1.0, bnk->Xold)); in TaoSolve_BNTR() 148 PetscCall(TaoBNKRecomputePred(tao, tao->stepdirection, &prered)); in TaoSolve_BNTR()
|
| H A D | bntl.c | 153 PetscCall(VecAXPY(tao->solution, 1.0, tao->stepdirection)); in TaoSolve_BNTL() 160 PetscCall(VecCopy(tao->solution, tao->stepdirection)); in TaoSolve_BNTL() 161 PetscCall(VecAXPY(tao->stepdirection, -1.0, bnk->Xold)); in TaoSolve_BNTL() 162 PetscCall(TaoBNKRecomputePred(tao, tao->stepdirection, &prered)); in TaoSolve_BNTL()
|
| /petsc/src/tao/bound/impls/tron/ |
| H A D | tron.c | 64 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_TRON() 162 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoSolve_TRON() 165 PetscCall(VecISAXPY(tao->stepdirection, tron->Free_Local, 1.0, tron->DXFree)); in TaoSolve_TRON() 167 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gdx)); in TaoSolve_TRON() 175 …neSearchApply(tao->linesearch, tron->X_New, &f_new, tron->G_New, tao->stepdirection, &stepsize, &l… in TaoSolve_TRON() 178 PetscCall(MatMult(tao->hessian, tao->stepdirection, tron->Work)); in TaoSolve_TRON() 180 PetscCall(VecDot(tao->stepdirection, tron->Work, &prered)); in TaoSolve_TRON() 193 PetscCall(VecCopy(tron->X_New, tao->stepdirection)); in TaoSolve_TRON() 194 PetscCall(VecAXPY(tao->stepdirection, -1.0, tao->solution)); in TaoSolve_TRON() 196 PetscCall(VecNorm(tao->stepdirection, NORM_2, &xdiff)); in TaoSolve_TRON() [all …]
|
| /petsc/src/tao/bound/impls/blmvm/ |
| H A D | blmvm.c | 55 PetscCall(MatSolve(blmP->M, blmP->unprojected_gradient, tao->stepdirection)); in TaoSolve_BLMVM() 56 …PetscCall(VecBoundGradientProjection(tao->stepdirection, tao->solution, tao->XL, tao->XU, tao->gra… in TaoSolve_BLMVM() 67 PetscCall(MatSolve(blmP->M, blmP->unprojected_gradient, tao->stepdirection)); in TaoSolve_BLMVM() 69 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_BLMVM() 76 …(tao->linesearch, tao->solution, &f, blmP->unprojected_gradient, tao->stepdirection, &stepsize, &l… in TaoSolve_BLMVM() 90 PetscCall(MatSolve(blmP->M, blmP->unprojected_gradient, tao->stepdirection)); in TaoSolve_BLMVM() 91 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_BLMVM() 96 …(tao->linesearch, tao->solution, &f, blmP->unprojected_gradient, tao->stepdirection, &stepsize, &l… in TaoSolve_BLMVM() 126 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_BLMVM()
|
| /petsc/src/tao/bound/impls/bqnls/ |
| H A D | bqnls.c | 29 PetscCall(MatSolve(bqnk->B, tao->gradient, tao->stepdirection)); in TaoBQNLSComputeStep() 30 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoBQNLSComputeStep() 31 PetscCall(TaoBNKBoundStep(tao, bnk->as_type, tao->stepdirection)); in TaoBQNLSComputeStep()
|
| /petsc/src/tao/quadratic/impls/gpcg/ |
| H A D | gpcg.c | 83 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_GPCG() 164 …PetscCall(TaoVecGetSubVec(tao->stepdirection, gpcg->Free_Local, tao->subset_type, 0.0, &gpcg->DXFr… in TaoSolve_GPCG() 184 PetscCall(VecSet(tao->stepdirection, 0.0)); in TaoSolve_GPCG() 185 PetscCall(VecISAXPY(tao->stepdirection, gpcg->Free_Local, 1.0, gpcg->DXFree)); in TaoSolve_GPCG() 187 PetscCall(VecDot(tao->stepdirection, tao->gradient, &gdx)); in TaoSolve_GPCG() 190 …archApply(tao->linesearch, tao->solution, &f_new, tao->gradient, tao->stepdirection, &stepsize, &l… in TaoSolve_GPCG() 224 …Vec DX = tao->stepdirection, XL = tao->XL, XU = tao->XU, Work = gpcg->Wor… in GPCGGradProjections()
|
| /petsc/src/tao/unconstrained/impls/ntr/ |
| H A D | ntr.c | 134 PetscCall(MatMult(tao->hessian, tao->gradient, tao->stepdirection)); in TaoSolve_NTR() 135 PetscCall(VecDot(tao->gradient, tao->stepdirection, &prered)); in TaoSolve_NTR() 245 PetscCall(KSPSolve(tao->ksp, tao->gradient, tao->stepdirection)); in TaoSolve_NTR() 269 PetscCall(KSPSolve(tao->ksp, tao->gradient, tao->stepdirection)); in TaoSolve_NTR() 278 PetscCall(VecScale(tao->stepdirection, -1.0)); in TaoSolve_NTR() 298 PetscCall(VecAXPY(tr->W, 1.0, tao->stepdirection)); in TaoSolve_NTR() 346 PetscCall(VecAXPY(tr->W, 1.0, tao->stepdirection)); in TaoSolve_NTR() 351 PetscCall(VecDot(tao->gradient, tao->stepdirection, &beta)); in TaoSolve_NTR() 439 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_NTR()
|
| /petsc/src/tao/quadratic/impls/bqpip/ |
| H A D | bqpip.c | 177 PetscCall(VecCopy(tao->stepdirection, qp->DG)); in QPIPComputeStepDirection() 181 PetscCall(VecCopy(tao->stepdirection, qp->DT)); in QPIPComputeStepDirection() 209 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_BQPIP() 338 PetscCall(KSPSolve(tao->ksp, qp->RHS, tao->stepdirection)); in TaoSolve_BQPIP() 355 PetscCall(MatMult(tao->hessian, tao->stepdirection, qp->RHS2)); in TaoSolve_BQPIP() 403 PetscCall(KSPSolve(tao->ksp, qp->RHS2, tao->stepdirection)); in TaoSolve_BQPIP() 424 PetscCall(VecAXPY(tao->solution, dstep, tao->stepdirection)); in TaoSolve_BQPIP()
|
| /petsc/src/tao/linesearch/interface/ |
| H A D | taolinesearch.c | 243 PetscCall(VecDestroy(&(*ls)->stepdirection)); in TaoLineSearchDestroy() 306 PetscCall(VecDestroy(&ls->stepdirection)); in TaoLineSearchApply() 307 ls->stepdirection = s; in TaoLineSearchApply() 833 …ch callback objective", (*ls->ops->computeobjectiveandgts)(ls, x, ls->stepdirection, f, >s, ls->… in TaoLineSearchComputeObjective() 959 …allback objective/gts", (*ls->ops->computeobjectiveandgts)(ls, x, ls->stepdirection, f, gts, ls->u… in TaoLineSearchComputeObjectiveAndGTS() 1045 if (s) *s = ls->stepdirection; in TaoLineSearchGetStepDirection()
|
| /petsc/include/petsc/private/ |
| H A D | taolinesearchimpl.h | 44 Vec stepdirection; member
|
| H A D | taoimpl.h | 76 Vec stepdirection; member
|
| /petsc/src/tao/unconstrained/impls/lmvm/ |
| H A D | lmvm.c | 150 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_LMVM()
|
| /petsc/src/binding/petsc4py/src/lib-petsc/ |
| H A D | custom.h | 672 if (has_g && !tao->stepdirection) PetscCall(VecDuplicate(tao->solution,&tao->stepdirection)); in TaoGetVecs() 673 *S = has_g ? tao->stepdirection : NULL; in TaoGetVecs() 685 …PetscCall(TaoLineSearchApply(tao->linesearch,tao->solution,f,tao->gradient,tao->stepdirection,s,ls… in TaoApplyLineSearch()
|
| /petsc/src/tao/pde_constrained/impls/lcl/ |
| H A D | lcl.c | 102 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_LCL() 352 PetscCall(LCLGather(lclP, lclP->r, lclP->s, tao->stepdirection)); in TaoSolve_LCL() 362 …chApply(tao->linesearch, tao->solution, &lclP->aug, lclP->GAugL, tao->stepdirection, &step, &ls_re… in TaoSolve_LCL() 458 PetscCall(LCLGather(lclP, lclP->r, lclP->s, tao->stepdirection)); in TaoSolve_LCL() 465 …chApply(tao->linesearch, tao->solution, &lclP->aug, lclP->GAugL, tao->stepdirection, &step, &ls_re… in TaoSolve_LCL()
|
| /petsc/src/tao/unconstrained/impls/owlqn/ |
| H A D | owlqn.c | 228 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_OWLQN()
|
| /petsc/src/tao/constrained/impls/ipm/ |
| H A D | ipm.c | 79 …PetscCall(IPMScatterStep(tao, ipmP->bigstep, tao->stepdirection, ipmP->ds, ipmP->dlambdae, ipmP->d… in TaoSolve_IPM() 102 PetscCall(VecAXPY(tao->solution, alpha, tao->stepdirection)); in TaoSolve_IPM() 140 …PetscCall(IPMScatterStep(tao, ipmP->bigstep, tao->stepdirection, ipmP->ds, ipmP->dlambdae, ipmP->d… in TaoSolve_IPM() 167 PetscCall(VecAXPY(tao->solution, alpha, tao->stepdirection)); in TaoSolve_IPM() 201 PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetup_IPM()
|
| /petsc/src/tao/unconstrained/impls/nls/ |
| H A D | nls.c | 703 if (!tao->stepdirection) PetscCall(VecDuplicate(tao->solution, &tao->stepdirection)); in TaoSetUp_NLS()
|