Home
last modified time | relevance | path

Searched refs:gradient (Results 1 – 25 of 139) sorted by relevance

123456

/petsc/src/tao/unconstrained/impls/cg/
H A Dtaocg.c24 PetscCall(TaoComputeObjectiveAndGradient(tao, tao->solution, &f, tao->gradient)); in TaoSolve_CG()
25 PetscCall(VecNorm(tao->gradient, NORM_2, &gnorm)); in TaoSolve_CG()
35 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG()
63 PetscCall(VecCopy(tao->gradient, cgP->G_old)); in TaoSolve_CG()
64 PetscCall(VecDot(tao->gradient, tao->stepdirection, &gd)); in TaoSolve_CG()
77 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG()
83 …PetscCall(TaoLineSearchApply(tao->linesearch, tao->solution, &f, tao->gradient, tao->stepdirection… in TaoSolve_CG()
92 PetscCall(VecCopy(cgP->G_old, tao->gradient)); in TaoSolve_CG()
104 PetscCall(VecCopy(tao->gradient, tao->stepdirection)); in TaoSolve_CG()
108 …PetscCall(TaoLineSearchApply(tao->linesearch, tao->solution, &f, tao->gradient, tao->stepdirection… in TaoSolve_CG()
[all …]
/petsc/src/binding/petsc4py/demo/python_types/
H A Dtao.py15 gradient = tao.getGradient()[0]
18 search_direction = gradient.copy()
26 tao.computeGradient(x, gradient)
27 gradient.copy(search_direction)
32 f, s, reason = self._ls.apply(x, gradient, search_direction)
38 tao.monitor(f=f, res=gradient.norm())
/petsc/src/tao/bound/impls/tron/
H A Dtron.c63 PetscCall(VecDuplicate(tao->solution, &tao->gradient)); in TaoSetup_TRON()
86 PetscCall(TaoComputeObjectiveAndGradient(tao, tao->solution, &tron->f, tao->gradient)); in TaoSolve_TRON()
87 PetscCall(VecNorm(tao->gradient, NORM_2, &tron->gnorm)); in TaoSolve_TRON()
91 …PetscCall(VecBoundGradientProjection(tao->gradient, tao->solution, tao->XL, tao->XU, tao->gradient in TaoSolve_TRON()
92 PetscCall(VecNorm(tao->gradient, NORM_2, &tron->gnorm)); in TaoSolve_TRON()
116 …PetscCall(VecBoundGradientProjection(tao->gradient, tao->solution, tao->XL, tao->XU, tao->gradient in TaoSolve_TRON()
117 PetscCall(VecNorm(tao->gradient, NORM_2, &tron->gnorm)); in TaoSolve_TRON()
127 …PetscCall(VecWhichInactive(tao->XL, tao->solution, tao->gradient, tao->XU, PETSC_TRUE, &tron->Free… in TaoSolve_TRON()
132 PetscCall(VecNorm(tao->gradient, NORM_2, &tron->gnorm)); in TaoSolve_TRON()
140 PetscCall(TaoVecGetSubVec(tao->gradient, tron->Free_Local, tao->subset_type, 0.0, &tron->R)); in TaoSolve_TRON()
[all …]
/petsc/src/tao/unconstrained/impls/lmvm/
H A Dlmvm.c19 PetscCall(TaoComputeObjectiveAndGradient(tao, tao->solution, &f, tao->gradient)); in TaoSolve_LMVM()
20 PetscCall(TaoGradientNorm(tao, tao->gradient, NORM_2, &gnorm)); in TaoSolve_LMVM()
50 PetscCall(MatLMVMUpdate(lmP->M, tao->solution, tao->gradient)); in TaoSolve_LMVM()
51 PetscCall(MatSolve(lmP->M, tao->gradient, lmP->D)); in TaoSolve_LMVM()
56 PetscCall(VecDotRealPart(lmP->D, tao->gradient, &gdx)); in TaoSolve_LMVM()
68 PetscCall(MatLMVMUpdate(lmP->M, tao->solution, tao->gradient)); in TaoSolve_LMVM()
69 PetscCall(MatSolve(lmP->M, tao->gradient, lmP->D)); in TaoSolve_LMVM()
80 PetscCall(VecCopy(tao->gradient, lmP->Gold)); in TaoSolve_LMVM()
82 …PetscCall(TaoLineSearchApply(tao->linesearch, tao->solution, &f, tao->gradient, lmP->D, &step, &ls… in TaoSolve_LMVM()
89 PetscCall(VecCopy(lmP->Gold, tao->gradient)); in TaoSolve_LMVM()
[all …]
/petsc/src/tao/bound/impls/bncg/
H A Dbncg.c82 PetscCall(VecCopy(cg->unprojected_gradient, tao->gradient)); in TaoSolve_BNCG()
83 if (cg->active_idx) PetscCall(VecISSet(tao->gradient, cg->active_idx, 0.0)); in TaoSolve_BNCG()
84 PetscCall(VecNorm(tao->gradient, NORM_2, &gnorm)); in TaoSolve_BNCG()
126 if (!tao->gradient) PetscCall(VecDuplicate(tao->solution, &tao->gradient)); in TaoSetUp_BNCG()
131 if (!cg->yk) PetscCall(VecDuplicate(tao->gradient, &cg->yk)); in TaoSetUp_BNCG()
133 if (!cg->G_old) PetscCall(VecDuplicate(tao->gradient, &cg->G_old)); in TaoSetUp_BNCG()
139 if (!cg->unprojected_gradient) PetscCall(VecDuplicate(tao->gradient, &cg->unprojected_gradient)); in TaoSetUp_BNCG()
140 …if (!cg->unprojected_gradient_old) PetscCall(VecDuplicate(tao->gradient, &cg->unprojected_gradient… in TaoSetUp_BNCG()
407 PetscCall(VecAXPBY(tao->stepdirection, -scaling, 0.0, tao->gradient)); in TaoBNCGResetUpdate()
448 PetscCall(VecWAXPY(cg->yk, -1.0, cg->G_old, tao->gradient)); in TaoBNCGStepDirectionUpdate()
[all …]
/petsc/src/ts/tutorials/output/
H A Dex20opt_ic_3.out14 Scaled gradient steps: 0
15 Pure gradient steps: 0
24 total number of gradient evaluations=0
25 total number of function/gradient evaluations=0
34 Scaled gradient steps: 0
49 total number of gradient evaluations=0
50 total number of function/gradient evaluations=0
69 total number of function/gradient evaluations=17, (max: unlimited)
H A Dex20opt_ic_2.out14 Scaled gradient steps: 0
15 Pure gradient steps: 0
24 total number of gradient evaluations=0
25 total number of function/gradient evaluations=0
34 Scaled gradient steps: 0
49 total number of gradient evaluations=0
50 total number of function/gradient evaluations=0
69 total number of function/gradient evaluations=17, (max: unlimited)
/petsc/src/ts/tutorials/optimal_control/output/
H A Dex1_3.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=0
74 total number of function/gradient evaluations=21, (max: unlimited)
H A Dex1_2.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=0
76 total number of function/gradient evaluations=21, (max: unlimited)
/petsc/src/tao/leastsquares/tutorials/output/
H A Dcs1_view_l1dict.out12 Scaled gradient steps: 0
13 Pure gradient steps: 0
22 total number of gradient evaluations=0
23 total number of function/gradient evaluations=0
34 Scaled gradient steps: 0
49 total number of gradient evaluations=0
50 total number of function/gradient evaluations=1
88 total number of function/gradient evaluations=96, (max: unlimited)
97 total number of function/gradient evaluations=96, (max: unlimited)
H A Dcs1_view_l1dict_alt.out12 Scaled gradient steps: 0
13 Pure gradient steps: 0
22 total number of gradient evaluations=0
23 total number of function/gradient evaluations=0
34 Scaled gradient steps: 0
49 total number of gradient evaluations=0
50 total number of function/gradient evaluations=1
88 total number of function/gradient evaluations=96, (max: unlimited)
97 total number of function/gradient evaluations=96, (max: unlimited)
H A Dcs1_view_lm.out13 Scaled gradient steps: 0
14 Pure gradient steps: 0
23 total number of gradient evaluations=0
24 total number of function/gradient evaluations=0
35 Scaled gradient steps: 0
51 total number of gradient evaluations=0
52 total number of function/gradient evaluations=1
90 total number of function/gradient evaluations=5, (max: unlimited)
99 total number of function/gradient evaluations=5, (max: unlimited)
/petsc/src/ml/regressor/tests/output/
H A Dex2_prefix_tao_alt.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=1
91 total number of function/gradient evaluations=3, (max: unlimited)
100 total number of function/gradient evaluations=3, (max: unlimited)
H A Dex3_prefix_tao.out14 Scaled gradient steps: 0
15 Pure gradient steps: 0
24 total number of gradient evaluations=0
25 total number of function/gradient evaluations=0
36 Scaled gradient steps: 0
51 total number of gradient evaluations=0
52 total number of function/gradient evaluations=1
90 total number of function/gradient evaluations=3, (max: unlimited)
99 total number of function/gradient evaluations=3, (max: unlimited)
H A Dex1_prefix_tao_alt.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=1
91 total number of function/gradient evaluations=3, (max: unlimited)
100 total number of function/gradient evaluations=3, (max: unlimited)
H A Dex2_prefix_tao.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=1
91 total number of function/gradient evaluations=3, (max: unlimited)
100 total number of function/gradient evaluations=3, (max: unlimited)
H A Dex3_asciiview.out14 Scaled gradient steps: 0
15 Pure gradient steps: 0
24 total number of gradient evaluations=0
25 total number of function/gradient evaluations=0
36 Scaled gradient steps: 0
51 total number of gradient evaluations=0
52 total number of function/gradient evaluations=1
90 total number of function/gradient evaluations=3, (max: unlimited)
99 total number of function/gradient evaluations=3, (max: unlimited)
H A Dex1_prefix_tao.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
37 Scaled gradient steps: 0
52 total number of gradient evaluations=0
53 total number of function/gradient evaluations=1
91 total number of function/gradient evaluations=3, (max: unlimited)
100 total number of function/gradient evaluations=3, (max: unlimited)
/petsc/src/tao/unconstrained/impls/ntl/
H A Dntl.c79 PetscCall(MatLMVMAllocate(tl->M, tao->solution, tao->gradient)); in TaoSolve_NTL()
85 PetscCall(TaoComputeObjectiveAndGradient(tao, tao->solution, &f, tao->gradient)); in TaoSolve_NTL()
86 PetscCall(VecNorm(tao->gradient, NORM_2, &gnorm)); in TaoSolve_NTL()
117 PetscCall(VecAXPY(tl->W, -tao->trust / gnorm, tao->gradient)); in TaoSolve_NTL()
128 PetscCall(MatMult(tao->hessian, tao->gradient, tao->stepdirection)); in TaoSolve_NTL()
129 PetscCall(VecDot(tao->gradient, tao->stepdirection, &prered)); in TaoSolve_NTL()
192 PetscCall(VecAXPY(tao->solution, sigma, tao->gradient)); in TaoSolve_NTL()
193 PetscCall(TaoComputeGradient(tao, tao->solution, tao->gradient)); in TaoSolve_NTL()
195 PetscCall(VecNorm(tao->gradient, NORM_2, &gnorm)); in TaoSolve_NTL()
238 PetscCall(MatLMVMUpdate(tl->M, tao->solution, tao->gradient)); in TaoSolve_NTL()
[all …]
/petsc/src/tao/bound/tutorials/output/
H A Dplate2_20_alt.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
39 Scaled gradient steps: 0
54 total number of gradient evaluations=0
55 total number of function/gradient evaluations=0
94 total number of function/gradient evaluations=93, (max: unlimited)
H A Dplate2_20.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
39 Scaled gradient steps: 0
54 total number of gradient evaluations=0
55 total number of function/gradient evaluations=0
94 total number of function/gradient evaluations=90, (max: unlimited)
H A Dplate2_10.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
38 Scaled gradient steps: 0
53 total number of gradient evaluations=0
54 total number of function/gradient evaluations=1
96 total number of function/gradient evaluations=6, (max: unlimited)
H A Dplate2_12.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
39 Scaled gradient steps: 0
54 total number of gradient evaluations=0
55 total number of function/gradient evaluations=0
97 total number of function/gradient evaluations=15, (max: unlimited)
H A Dplate2_11.out16 Scaled gradient steps: 0
17 Pure gradient steps: 0
26 total number of gradient evaluations=0
27 total number of function/gradient evaluations=0
39 Scaled gradient steps: 0
54 total number of gradient evaluations=0
55 total number of function/gradient evaluations=0
97 total number of function/gradient evaluations=15, (max: unlimited)
H A Dplate2_18.out15 Scaled gradient steps: 0
16 Pure gradient steps: 0
25 total number of gradient evaluations=0
26 total number of function/gradient evaluations=0
38 Scaled gradient steps: 0
53 total number of gradient evaluations=0
54 total number of function/gradient evaluations=1
93 total number of function/gradient evaluations=89, (max: unlimited)

123456