Changeset 9563


Ignore:
Timestamp:
09/01/11 15:20:52 (14 years ago)
Author:
Mathieu Morlighem
Message:

removed tolx from model (now hardocoded)

Location:
issm/trunk/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r9558 r9563  
    456456        TolxEnum,
    457457        OptscalEnum,
    458         EpsvelEnum,
    459         MeanvelEnum,
    460458        OutputfilenameEnum,
    461459        WaterfractionEnum,
  • issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r9558 r9563  
    399399                case TolxEnum : return "Tolx";
    400400                case OptscalEnum : return "Optscal";
    401                 case EpsvelEnum : return "Epsvel";
    402                 case MeanvelEnum : return "Meanvel";
    403401                case OutputfilenameEnum : return "Outputfilename";
    404402                case WaterfractionEnum : return "Waterfraction";
  • issm/trunk/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp

    r9476 r9563  
    3939                parameters->AddObject(iomodel->CopyConstantObject(NumCmResponsesEnum));
    4040                parameters->AddObject(iomodel->CopyConstantObject(NstepsEnum));
    41                 parameters->AddObject(iomodel->CopyConstantObject(TolxEnum));
    4241                parameters->AddObject(iomodel->CopyConstantObject(EpsCmEnum));
    4342                parameters->AddObject(iomodel->CopyConstantObject(CmGradientEnum));
    44                 parameters->AddObject(iomodel->CopyConstantObject(MeanvelEnum));
    4543
    4644                /*What solution type?*/
  • issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r9515 r9563  
    3535        parameters->AddObject(iomodel->CopyConstantObject(MaxNonlinearIterationsEnum));
    3636        parameters->AddObject(iomodel->CopyConstantObject(MaxSteadystateIterationsEnum));
    37         parameters->AddObject(iomodel->CopyConstantObject(EpsvelEnum));
    3837        parameters->AddObject(iomodel->CopyConstantObject(YtsEnum));
    3938        parameters->AddObject(iomodel->CopyConstantObject(DtEnum));
  • issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r9558 r9563  
    397397        else if (strcmp(name,"Tolx")==0) return TolxEnum;
    398398        else if (strcmp(name,"Optscal")==0) return OptscalEnum;
    399         else if (strcmp(name,"Epsvel")==0) return EpsvelEnum;
    400         else if (strcmp(name,"Meanvel")==0) return MeanvelEnum;
    401399        else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
    402400        else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r9451 r9563  
    18401840        int        artdiff;
    18411841        int        i,j,ig,found=0;
    1842         double     Jdet,u,v,w,um,vm,wm,epsvel;
     1842        double     Jdet,u,v,w,um,vm,wm;
    18431843        double     gravity,rho_ice,rho_water;
     1844        double     epsvel=1.e-13;
    18441845        double     heatcapacity,thermalconductivity,dt;
    18451846        double     pressure,enthalpy;
     
    18751876        this->parameters->FindParam(&dt,DtEnum);
    18761877        this->parameters->FindParam(&artdiff,ArtificialDiffusivityEnum);
    1877         this->parameters->FindParam(&epsvel,EpsvelEnum);
    18781878        Input* pressure_input=inputs->GetInput(PressureEnum);      _assert_(pressure_input);
    18791879        Input* enthalpy_input=inputs->GetInput(EnthalpyEnum);      _assert_(enthalpy_input);
     
    21172117        int        artdiff;
    21182118        int        i,j,ig,found=0;
    2119         double     Jdet,u,v,w,um,vm,wm,epsvel;
     2119        double     Jdet,u,v,w,um,vm,wm;
     2120        double     epsvel=1.e-13;
    21202121        double     gravity,rho_ice,rho_water;
    21212122        double     heatcapacity,thermalconductivity,dt;
     
    21492150        this->parameters->FindParam(&dt,DtEnum);
    21502151        this->parameters->FindParam(&artdiff,ArtificialDiffusivityEnum);
    2151         this->parameters->FindParam(&epsvel,EpsvelEnum);
    21522152        Input* vx_input=inputs->GetInput(VxEnum);      _assert_(vx_input);
    21532153        Input* vy_input=inputs->GetInput(VyEnum);      _assert_(vy_input);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r9512 r9563  
    15101510        double     Jdet;
    15111511        double     obs_velocity_mag,velocity_mag;
    1512         double     dux,duy,meanvel,epsvel;
     1512        double     dux,duy;
     1513        double     epsvel=1.e-13;
     1514        double     meanvel=1000/(365*24*3600); /*1000 m/yr*/
    15131515        double     scalex=0,scaley=0,scale=0,S=0;
    15141516        double     vx,vy,vxobs,vyobs,weight;
     
    15241526        this->parameters->FindParam(&num_responses,NumCmResponsesEnum);
    15251527        this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
    1526         this->parameters->FindParam(&meanvel,MeanvelEnum);
    1527         this->parameters->FindParam(&epsvel,EpsvelEnum);
    15281528        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    15291529        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    16861686        double     Jdet;
    16871687        double     obs_velocity_mag,velocity_mag;
    1688         double     dux,duy,meanvel,epsvel;
     1688        double     dux,duy;
     1689        double     epsvel=1.e-13;
     1690        double     meanvel=1000/(365*24*3600); /*1000 m/yr*/
    16891691        double     scalex=0,scaley=0,scale=0,S=0;
    16901692        double     vx,vy,vxobs,vyobs,weight;
     
    17001702        this->parameters->FindParam(&num_responses,NumCmResponsesEnum);
    17011703        this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
    1702         this->parameters->FindParam(&meanvel,MeanvelEnum);
    1703         this->parameters->FindParam(&epsvel,EpsvelEnum);
    17041704        Input* weights_input = inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    17051705        Input* vx_input      = inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    48564856        int        i,ig;
    48574857        double     Jelem=0;
    4858         double     meanvel, epsvel,misfit,Jdet;
     4858        double     misfit,Jdet;
     4859        double     epsvel=1.e-13;
     4860        double     meanvel=1000/(365*24*3600); /*1000 m/yr*/
    48594861        double     velocity_mag,obs_velocity_mag;
    48604862        double     xyz_list[NUMVERTICES][3];
     
    48694871
    48704872        /*Retrieve all inputs we will be needing: */
    4871         this->parameters->FindParam(&meanvel,MeanvelEnum);
    4872         this->parameters->FindParam(&epsvel,EpsvelEnum);
    48734873        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    48744874        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    49224922        int        fit=-1;
    49234923        double     Jelem=0, S=0;
    4924         double     meanvel, epsvel, misfit, Jdet;
     4924        double     epsvel=1.e-13;
     4925        double     meanvel=1000/(365*24*3600); /*1000 m/yr*/
     4926        double     misfit, Jdet;
    49254927        double     vx,vy,vxobs,vyobs,weight;
    49264928        double     xyz_list[NUMVERTICES][3];
     
    49344936
    49354937        /*Retrieve all inputs we will be needing: */
    4936         this->parameters->FindParam(&meanvel,MeanvelEnum);
    4937         this->parameters->FindParam(&epsvel,EpsvelEnum);
    49384938        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    49394939        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    50115011        double     Jelem=0;
    50125012        double     scalex=1,scaley=1;
    5013         double     meanvel, epsvel,misfit,Jdet;
     5013        double     misfit,Jdet;
     5014        double     epsvel=1.e-13;
     5015        double     meanvel=1000/(365*24*3600); /*1000 m/yr*/
    50145016        double     vx,vy,vxobs,vyobs,weight;
    50155017        double     xyz_list[NUMVERTICES][3];
     
    50235025
    50245026        /*Retrieve all inputs we will be needing: */
    5025         this->parameters->FindParam(&meanvel,MeanvelEnum);
    5026         this->parameters->FindParam(&epsvel,EpsvelEnum);
    50275027        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    50285028        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
  • issm/trunk/src/c/objects/OptPars.h

    r2267 r9563  
    1010        double xmin;
    1111        double xmax;
    12         double tolerance;
    1312        double cm_jump;
    1413        int maxiter;
  • issm/trunk/src/c/shared/Numerics/BrentSearch.cpp

    r9320 r9563  
    2828        double xmax,xmin,xbest;
    2929        double x,x1,x2,xm;
    30         double tol1,tol2,seps,tolerance;
     30        double tol1,tol2,seps;
     31        double tolerance=1.e-4;
    3132        int    maxiter,iter;
    3233        bool   loop=true,goldenflag;
     
    3536        xmin=optpars->xmin;
    3637        xmax=optpars->xmax;
    37         tolerance=optpars->tolerance;
    3838        maxiter=optpars->maxiter;
    3939        cm_jump=optpars->cm_jump;
  • issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp

    r9320 r9563  
    2424
    2525        /*tolerances: */
    26         double seps,tolerance;
     26        double seps;
     27        double tolerance=1.e-4;
    2728        int    maxiter;
    2829
     
    3536        x1       =optpars->xmin;
    3637        x2       =optpars->xmax;
    37         tolerance=optpars->tolerance;
    3838        maxiter  =optpars->maxiter;
    3939       
  • issm/trunk/src/c/solutions/control_core.cpp

    r9393 r9563  
    2020        int     nsteps;
    2121        double  eps_cm;
    22         double  tolx;
    2322        bool    cm_gradient;
    2423        int     dim;
     
    5453        femmodel->parameters->FindParam(&cm_jump,NULL,CmJumpEnum);
    5554        femmodel->parameters->FindParam(&eps_cm,EpsCmEnum);
    56         femmodel->parameters->FindParam(&tolx,TolxEnum);
    5755        femmodel->parameters->FindParam(&cm_gradient,CmGradientEnum);
    5856        femmodel->parameters->FindParam(&dim,DimEnum);
     
    7573        /*Initialize some of the BrentSearch arguments: */
    7674        optargs.femmodel=femmodel;
    77         optpars.xmin=0; optpars.xmax=1; optpars.tolerance=tolx ;
     75        optpars.xmin=0; optpars.xmax=1;
    7876       
    7977        /*Start looping: */
  • issm/trunk/src/c/solutions/solutions.h

    r9218 r9563  
    4040
    4141//optimization
    42 int GoldenSearch(double* psearch_scalar,double* pJ,double xa, double xb, double tolerance, int maxiter, double fit,double optscal,double (*f)(double*,double,double,FemModel*),FemModel* femmodel);
    43 int BrentSearch(double* psearch_scalar,double* pJ,double xa, double xb, double tolerance, int maxiter, double fit,double optscal,double (*f)(double*,double,double,FemModel*),FemModel* femmodel);
    4442int GradJSearch(double* search_vector,FemModel* femmodel,int step);
    4543
  • issm/trunk/src/m/classes/model/model.m

    r9561 r9563  
    184184                 maxiter          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
    185185                 cm_responses     = modelfield('default',NaN,'marshall',true,'preprocess','marshallcmresponses','format','DoubleMat','mattype',3);
    186                  tolx             = modelfield('default',0,'marshall',true,'format','Double');
    187186                 optscal          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
    188187                 eps_cm           = modelfield('default',0,'marshall',true,'format','Double');
     
    191190                 cm_jump          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
    192191                 cm_gradient      = modelfield('default',0,'marshall',true,'format','Boolean');
    193                  epsvel                         = modelfield('default',0,'marshall',true,'format','Double');
    194                  meanvel                        = modelfield('default',0,'marshall',true,'format','Double');
    195192                 num_control_type               = modelfield('default',0,'marshall',true,'format','Integer');
    196193                 num_cm_responses               = modelfield('default',0,'marshall',true,'format','Integer');
     
    263260                 qmu_mass_flux_profiles          = modelfield('default',NaN,'marshall',false);
    264261                 qmu_mass_flux_segments          = modelfield('default',{},'marshall',true,'format','MatArray');
    265                  qmu_relax                       = modelfield('default',0,'marshall',false);
    266262
    267263                 %flaim
     
    684680                         md.maxiter=20*ones(md.nsteps,1);
    685681
    686                          %tolerance used by the optimization algorithm
    687                          md.tolx=10^-4;
    688 
    689682                         %the inversed parameter is updated as follows:
    690683                         %new_par=old_par + optscal(n)*C*gradient with C in [0 1];
     
    709702                         %NaN if not applied
    710703                         md.eps_cm=NaN; %not activated
    711 
    712                          %minimum velocity to avoid the misfit to be singular
    713                          md.epsvel=eps;
    714 
    715                          %averaged velocity used to scale the logarithmic Misfit (000 m/an)
    716                          md.meanvel=1000/(365*24*3600);
    717704
    718705                         %grounding line migration:
  • issm/trunk/src/m/model/display/displaycontrol.m

    r9542 r9563  
    1818        fielddisplay(md,'cm_responses','indicate the type of response for each optimization steps');
    1919        fielddisplay(md,'maxiter','maximum iterations during each optimization step');
    20         fielddisplay(md,'tolx','minimum tolerance which will stop one optimization search');
    2120        fielddisplay(md,'cm_jump','decrease threshold for misfit, default is 30%');
    2221        fielddisplay(md,'cm_min','absolute minimum acceptable value of the inversed parameter');
    2322        fielddisplay(md,'cm_max','absolute maximum acceptable value of the inversed parameter');
    2423        fielddisplay(md,'cm_gradient','stop control method solution at gradient');
    25         fielddisplay(md,'meanvel','velocity scaling factor when evaluating relative or logarithmic misfit');
    26         fielddisplay(md,'epsvel','for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity');
    2724        fielddisplay(md,'plot','visualization of the results of each iteration yes -> 1 no -> 0. Default is 1');
    2825        disp('Available responses:');
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r9542 r9563  
    8484fields={'numberofelements','numberofnodes','x','y','z','drag_coefficient','drag_p','drag_q',...
    8585        'rho_ice','rho_water','rheology_B','elementoniceshelf','surface','thickness','bed','g','lowmem','nsteps','maxiter',...
    86         'tolx','eps_res','max_nonlinear_iterations','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
     86        'eps_res','max_nonlinear_iterations','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
    8787checknan(md,fields);
    8888%}}}}
    8989%FIELDS >= 0 {{{1
    9090fields={'numberofelements','numberofnodes','elements','drag_coefficient','drag_p','drag_q',...
    91         'rho_ice','rho_water','rheology_B','elementoniceshelf','thickness','g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter','tolx',...
     91        'rho_ice','rho_water','rheology_B','elementoniceshelf','thickness','g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter',...
    9292        'lowmem','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
    9393checkgreater(md,fields,0);
     
    9595%FIELDS > 0 {{{1
    9696fields={'numberofelements','numberofnodes','elements','drag_p',...
    97         'rho_ice','rho_water','rheology_B','thickness','g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter','tolx'};
     97        'rho_ice','rho_water','rheology_B','thickness','g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter'};
    9898checkgreaterstrict(md,fields,0);
    9999%}}}
     
    275275                        message(['model not consistent: for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
    276276                end
    277         end
    278         if ~md.qmu_relax,
    279                 %if md.eps_rel>1.1*10^-5,
    280                 %       message(['model not consistent: for qmu analysis, eps_rel should be least than 10^-5, 10^-15 being a better value']);
    281                 %end
    282277        end
    283278end
  • issm/trunk/src/m/solutions/control_core.m

    r9394 r9563  
    1616        cm_jump=femmodel.parameters.CmJump;
    1717        eps_cm=femmodel.parameters.EpsCm;
    18         tolx=femmodel.parameters.Tolx;
    1918        cm_gradient=femmodel.parameters.CmGradient;
    2019        dim=femmodel.parameters.Dim;
  • issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp

    r8910 r9563  
    1010        char* function_name=NULL;
    1111        double xmin,xmax;
    12         double tolerance;
    1312        double* maxiter;
    1413        OptArgs optargs;
     
    3332        FetchMatlabData(&xmin,XMIN);
    3433        FetchMatlabData(&xmax,XMAX);
    35         FetchMatlabData(&tolerance,mxGetField(OPTIONS,0,"TolX"));
    3634        FetchMatlabData(&maxiter,NULL,NULL,mxGetField(OPTIONS,0,"MaxIter"));
    3735
     
    4543        optpars.xmin=xmin;
    4644        optpars.xmax=xmax;
    47         optpars.tolerance=tolerance;
    4845        optpars.maxiter=(int)maxiter[n_value-1];
    4946        optpars.cm_jump=cm_jump[n_value-1];
Note: See TracChangeset for help on using the changeset viewer.