Ignore:
Timestamp:
09/10/09 15:02:06 (16 years ago)
Author:
Eric.Larour
Message:

Added new jump capability to BrentSearch.
Some minor debugging otherwise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/parallel/control_core.cpp

    r2000 r2188  
    2929        int     gsize;
    3030        double* maxiter=NULL;
     31        double* cmjump=NULL;
    3132        double  tolx;
    3233        double* param_g=NULL;
     
    5960        model->FindParam(&optscal,"optscal");
    6061        model->FindParam(&maxiter,"maxiter");
     62        model->FindParam(&cmjump,"cmjump");
    6163        model->FindParam(&tolx,"tolx");
    6264        model->FindParam(&mincontrolconstraint,"mincontrolconstraint");
     
    105107                optargs.model=model;
    106108                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];
    108110                BrentSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs);
    109111                _printf_("%s\n","      done.");
     
    155157        xfree((void**)&optscal);
    156158        xfree((void**)&maxiter);
     159        xfree((void**)&cmjump);
    157160        VecFree(&new_grad_g); //do not VecFree grad_g and grad_g_old, they point to new_grad_g
    158161        xfree((void**)&grad_g_double);
Note: See TracChangeset for help on using the changeset viewer.