Changeset 2188 for issm/trunk/src/c/parallel/control_core.cpp
- Timestamp:
- 09/10/09 15:02:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/parallel/control_core.cpp
r2000 r2188 29 29 int gsize; 30 30 double* maxiter=NULL; 31 double* cmjump=NULL; 31 32 double tolx; 32 33 double* param_g=NULL; … … 59 60 model->FindParam(&optscal,"optscal"); 60 61 model->FindParam(&maxiter,"maxiter"); 62 model->FindParam(&cmjump,"cmjump"); 61 63 model->FindParam(&tolx,"tolx"); 62 64 model->FindParam(&mincontrolconstraint,"mincontrolconstraint"); … … 105 107 optargs.model=model; 106 108 optargs.param_g=param_g; optargs.grad_g=grad_g_double; optargs.inputs=inputs;optargs.n=n; 107 optpars.xmin=0; optpars.xmax=1; optpars.tolerance=tolx; optpars.maxiter=(int)maxiter[n]; 109 optpars.xmin=0; optpars.xmax=1; optpars.tolerance=tolx; optpars.maxiter=(int)maxiter[n];optpars.cmjump=cmjump[n]; 108 110 BrentSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs); 109 111 _printf_("%s\n"," done."); … … 155 157 xfree((void**)&optscal); 156 158 xfree((void**)&maxiter); 159 xfree((void**)&cmjump); 157 160 VecFree(&new_grad_g); //do not VecFree grad_g and grad_g_old, they point to new_grad_g 158 161 xfree((void**)&grad_g_double);
Note:
See TracChangeset
for help on using the changeset viewer.