Changeset 18868
- Timestamp:
- 11/26/14 11:56:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/cores/controlm1qn3_core.cpp
r18856 r18868 95 95 _printf0_("Cost function f(x) | Gradient norm |g(x)| | List of contributions\n"); 96 96 _printf0_("____________________________________________________________________\n"); 97 indic = 0; //no adjoint required 97 98 /*Initialize Gradient and cost function of M1QN3*/ 99 indic = 4; //adjoint and gradient required 98 100 simul(&indic,&n,X,&f,G,izs,rzs,(void*)femmodel); 99 double f1=f; 100 101 indic = 4; //adjoint and gradient required 101 102 /*Estimation of the expected decrease in f during the first iteration*/ 103 double df1=f; 104 105 /*Call M1QN3 solver*/ 102 106 m1qn3_(costfuncion,prosca,&ctonbe_,&ctcabe_, 103 &n,X,&f,G,&dxmin,& f1,107 &n,X,&f,G,&dxmin,&df1, 104 108 >tol,normtype,&impres,&io,imode,&omode,&niter,&nsim,iz,dz,&ndz, 105 109 &reverse,&indic,izs,rzs,(void*)femmodel); … … 197 201 _printf0_("f(x) = "<<setw(12)<<setprecision(7)<<*pf<<" | "); 198 202 199 if( indic==0){203 if(*indic==0){ 200 204 /*dry run, no gradient required*/ 201 205
Note:
See TracChangeset
for help on using the changeset viewer.