Changeset 2354
- Timestamp:
- 09/29/09 15:45:11 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.cpp
r1046 r2354 13 13 #include "../EnumDefinitions/EnumDefinitions.h" 14 14 15 void ControlConstrainx( double* p_g, int numdofnodes, double mincontrolconstraint, double maxcontrolconstraint,char* control_type){15 void ControlConstrainx( double* p_g, int numdofnodes, double cm_min, double cm_max,char* control_type){ 16 16 17 17 int i; 18 18 19 if(isnan( mincontrolconstraint) & isnan(maxcontrolconstraint)){19 if(isnan(cm_min) & isnan(cm_max)){ 20 20 /*do nothing*/ 21 21 } … … 23 23 for(i=0;i<numdofnodes;i++){ 24 24 25 if(!isnan( mincontrolconstraint)){26 if (p_g[i]< mincontrolconstraint)p_g[i]=mincontrolconstraint;25 if(!isnan(cm_min)){ 26 if (p_g[i]<cm_min)p_g[i]=cm_min; 27 27 } 28 28 29 if(!isnan( maxcontrolconstraint)){30 if (p_g[i]> maxcontrolconstraint)p_g[i]=maxcontrolconstraint;29 if(!isnan(cm_max)){ 30 if (p_g[i]>cm_max)p_g[i]=cm_max; 31 31 } 32 32 } -
issm/trunk/src/c/ControlConstrainx/ControlConstrainx.h
r1046 r2354 9 9 10 10 /* local prototypes: */ 11 void ControlConstrainx( double* p_g, int numberofnodes, double mincontrolconstraint, double maxcontrolconstraint,char* control_type);11 void ControlConstrainx( double* p_g, int numberofnodes, double cm_min, double cm_max,char* control_type); 12 12 13 13 #endif /* _CONTROLCONSTRAINX_H */ -
issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp
r2341 r2354 87 87 parameters->AddObject(param); 88 88 89 /*epsvel: */ 90 count++; 91 param= new Param(count,"epsvel",DOUBLE); 92 param->SetDouble(iomodel->epsvel); 93 parameters->AddObject(param); 94 95 /*meanvel: */ 96 count++; 97 param= new Param(count,"meanvel",DOUBLE); 98 param->SetDouble(iomodel->meanvel); 99 parameters->AddObject(param); 100 101 /*cm_noisedmp: */ 102 count++; 103 param= new Param(count,"cm_noisedmp",DOUBLE); 104 param->SetDouble(iomodel->cm_noisedmp); 105 parameters->AddObject(param); 106 107 /*cm_mindmp_value: */ 108 count++; 109 param= new Param(count,"cm_mindmp_value",DOUBLE); 110 param->SetDouble(iomodel->cm_mindmp_value); 111 parameters->AddObject(param); 112 113 /*cm_mindmp_slope: */ 114 count++; 115 param= new Param(count,"cm_mindmp_slope",DOUBLE); 116 param->SetDouble(iomodel->cm_mindmp_slope); 117 parameters->AddObject(param); 118 119 /*cm_maxdmp_value: */ 120 count++; 121 param= new Param(count,"cm_maxdmp_value",DOUBLE); 122 param->SetDouble(iomodel->cm_maxdmp_value); 123 parameters->AddObject(param); 124 125 /*cm_maxdmp_slope: */ 126 count++; 127 param= new Param(count,"cm_maxdmp_slope",DOUBLE); 128 param->SetDouble(iomodel->cm_maxdmp_slope); 129 parameters->AddObject(param); 89 130 90 /*mincontrolconstraint: */ 91 count++; 92 param= new Param(count,"mincontrolconstraint",DOUBLE); 93 param->SetDouble(iomodel->mincontrolconstraint); 94 parameters->AddObject(param); 95 96 /*maxcontrolconstraint: */ 97 count++; 98 param= new Param(count,"maxcontrolconstraint",DOUBLE); 99 param->SetDouble(iomodel->maxcontrolconstraint); 100 parameters->AddObject(param); 101 102 103 131 /*cm_min: */ 132 count++; 133 param= new Param(count,"cm_min",DOUBLE); 134 param->SetDouble(iomodel->cm_min); 135 parameters->AddObject(param); 136 137 /*cm_max: */ 138 count++; 139 param= new Param(count,"cm_max",DOUBLE); 140 param->SetDouble(iomodel->cm_max); 141 parameters->AddObject(param); 142 104 143 /*Now, recover fit, optscal and maxiter as vectors: */ 105 144 IoModelFetchData(&iomodel->fit,NULL,NULL,iomodel_handle,"fit"); -
issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp
r2343 r2354 205 205 parameters->AddObject(param); 206 206 207 /*meanvel: */208 count++;209 param= new Param(count,"meanvel",DOUBLE);210 param->SetDouble(iomodel->meanvel);211 parameters->AddObject(param);212 213 /*cm_noisedampening: */214 count++;215 param= new Param(count,"cm_noisedampening",DOUBLE);216 param->SetDouble(iomodel->cm_noisedampening);217 parameters->AddObject(param);218 219 /*epsvel: */220 count++;221 param= new Param(count,"epsvel",DOUBLE);222 param->SetDouble(iomodel->epsvel);223 parameters->AddObject(param);224 225 207 /*waitonlock: */ 226 208 count++; … … 262 244 parameters->AddObject(param); 263 245 xfree((void**)&iomodel->riftinfo); 264 265 246 266 247 /*parameteroutput: */ -
issm/trunk/src/c/ModelProcessorx/IoModel.cpp
r2333 r2354 116 116 iomodel->tolx=0; 117 117 iomodel->maxiter=NULL; 118 iomodel->cm_noisedampening=0; 119 iomodel->mincontrolconstraint=0; 120 iomodel->maxcontrolconstraint=0; 118 iomodel->cm_noisedmp=0; 119 iomodel->cm_mindmp_value=0; 120 iomodel->cm_mindmp_slope=0; 121 iomodel->cm_maxdmp_value=0; 122 iomodel->cm_maxdmp_slope=0; 123 iomodel->cm_min=0; 124 iomodel->cm_max=0; 121 125 iomodel->verbose=0; 122 126 iomodel->plot=0; … … 336 340 IoModelFetchData(&iomodel->eps_cm,iomodel_handle,"eps_cm"); 337 341 IoModelFetchData(&iomodel->tolx,iomodel_handle,"tolx"); 338 IoModelFetchData(&iomodel->cm_noisedampening,iomodel_handle,"cm_noisedampening"); 339 IoModelFetchData(&iomodel->mincontrolconstraint,iomodel_handle,"mincontrolconstraint"); 340 IoModelFetchData(&iomodel->maxcontrolconstraint,iomodel_handle,"maxcontrolconstraint"); 342 IoModelFetchData(&iomodel->cm_noisedmp,iomodel_handle,"cm_noisedmp"); 343 IoModelFetchData(&iomodel->cm_mindmp_value,iomodel_handle,"cm_mindmp_value"); 344 IoModelFetchData(&iomodel->cm_mindmp_slope,iomodel_handle,"cm_mindmp_slope"); 345 IoModelFetchData(&iomodel->cm_maxdmp_value,iomodel_handle,"cm_maxdmp_value"); 346 IoModelFetchData(&iomodel->cm_maxdmp_slope,iomodel_handle,"cm_maxdmp_slope"); 347 IoModelFetchData(&iomodel->cm_min,iomodel_handle,"cm_min"); 348 IoModelFetchData(&iomodel->cm_max,iomodel_handle,"cm_max"); 341 349 IoModelFetchData(&iomodel->eps_res,iomodel_handle,"eps_res"); 342 350 IoModelFetchData(&iomodel->eps_rel,iomodel_handle,"eps_rel"); -
issm/trunk/src/c/ModelProcessorx/IoModel.h
r2333 r2354 104 104 /*numerical parameters: */ 105 105 double meanvel; 106 double 106 double epsvel; 107 107 int artdiff; 108 108 double viscosity_overshoot; 109 109 double stokesreconditioning; 110 double cm_noisedmp; 111 double cm_mindmp_value; 112 double cm_mindmp_slope; 113 double cm_maxdmp_value; 114 double cm_maxdmp_slope; 115 double cm_min; 116 double cm_max; 117 110 118 double cm_noisedampening; 111 119 … … 121 129 double tolx; 122 130 double* maxiter; 123 double mincontrolconstraint;124 double maxcontrolconstraint;125 131 int verbose; 126 132 int plot; -
issm/trunk/src/c/objects/Numpar.cpp
r2347 r2354 32 32 stokesreconditioning=UNDEF; 33 33 control_type=NULL; 34 cm_noisedampening=UNDEF; 34 cm_noisedmp=UNDEF; 35 cm_mindmp_value=UNDEF; 36 cm_mindmp_slope=UNDEF; 37 cm_maxdmp_value=UNDEF; 38 cm_maxdmp_slope=UNDEF; 35 39 36 40 return; … … 53 57 printf(" stokesreconditioning: %g\n",stokesreconditioning); 54 58 printf(" control_type: %s\n",control_type); 55 printf(" cm_noisedampening: %g\n",cm_noisedampening); 59 printf(" cm_noisedmp: %g\n",cm_noisedmp); 60 printf(" cm_mindmp_value: %g\n",cm_mindmp_value); 61 printf(" cm_mindmp_slope: %g\n",cm_mindmp_slope); 62 printf(" cm_maxdmp_value: %g\n",cm_maxdmp_value); 63 printf(" cm_maxdmp_slope: %g\n",cm_maxdmp_slope); 56 64 } 57 65 … … 68 76 printf(" stokesreconditioning: %g\n",stokesreconditioning); 69 77 printf(" control_type: %s\n",control_type); 70 printf(" cm_noisedampening: %g\n",cm_noisedampening); 78 printf(" cm_noisedmp: %g\n",cm_noisedmp); 79 printf(" cm_mindmp_value: %g\n",cm_mindmp_value); 80 printf(" cm_mindmp_slope: %g\n",cm_mindmp_slope); 81 printf(" cm_maxdmp_value: %g\n",cm_maxdmp_value); 82 printf(" cm_maxdmp_slope: %g\n",cm_maxdmp_slope); 71 83 } 72 84 … … 94 106 memcpy(marshalled_dataset,&stokesreconditioning,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning); 95 107 memcpy(marshalled_dataset,&control_type,sizeof(control_type));marshalled_dataset+=sizeof(control_type); 96 memcpy(marshalled_dataset,&cm_noisedampening,sizeof(cm_noisedampening));marshalled_dataset+=sizeof(cm_noisedampening); 108 memcpy(marshalled_dataset,&cm_noisedmp,sizeof(cm_noisedmp));marshalled_dataset+=sizeof(cm_noisedmp); 109 memcpy(marshalled_dataset,&cm_mindmp_value,sizeof(cm_mindmp_value));marshalled_dataset+=sizeof(cm_mindmp_value); 110 memcpy(marshalled_dataset,&cm_mindmp_slope,sizeof(cm_mindmp_slope));marshalled_dataset+=sizeof(cm_mindmp_slope); 111 memcpy(marshalled_dataset,&cm_maxdmp_value,sizeof(cm_maxdmp_value));marshalled_dataset+=sizeof(cm_maxdmp_value); 112 memcpy(marshalled_dataset,&cm_maxdmp_slope,sizeof(cm_maxdmp_slope));marshalled_dataset+=sizeof(cm_maxdmp_slope); 97 113 98 114 *pmarshalled_dataset=marshalled_dataset; … … 108 124 +sizeof(stokesreconditioning) 109 125 +sizeof(control_type) 110 +sizeof(cm_noisedampening) 126 +sizeof(cm_noisedmp) 127 +sizeof(cm_mindmp_value) 128 +sizeof(cm_mindmp_slope) 129 +sizeof(cm_maxdmp_value) 130 +sizeof(cm_maxdmp_slope) 111 131 +sizeof(int); //sizeof(int) for enum type 112 132 } … … 134 154 memcpy(&stokesreconditioning,marshalled_dataset,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning); 135 155 memcpy(&control_type,marshalled_dataset,sizeof(control_type));marshalled_dataset+=sizeof(control_type); 136 memcpy(&cm_noisedampening,marshalled_dataset,sizeof(cm_noisedampening));marshalled_dataset+=sizeof(cm_noisedampening); 156 memcpy(&cm_noisedmp,marshalled_dataset,sizeof(cm_noisedmp));marshalled_dataset+=sizeof(cm_noisedmp); 157 memcpy(&cm_mindmp_value,marshalled_dataset,sizeof(cm_mindmp_value));marshalled_dataset+=sizeof(cm_mindmp_value); 158 memcpy(&cm_mindmp_slope,marshalled_dataset,sizeof(cm_mindmp_slope));marshalled_dataset+=sizeof(cm_mindmp_slope); 159 memcpy(&cm_maxdmp_value,marshalled_dataset,sizeof(cm_maxdmp_value));marshalled_dataset+=sizeof(cm_maxdmp_value); 160 memcpy(&cm_maxdmp_slope,marshalled_dataset,sizeof(cm_maxdmp_slope));marshalled_dataset+=sizeof(cm_maxdmp_slope); 137 161 138 162 /*return: */ … … 164 188 /*Go through parameters dataset, and find the Param object corresponding to our fields, 165 189 * and update the fields: */ 166 if(!parameters->FindParam(&meanvel,"meanvel"))throw ErrorException(__FUNCT__," error message: could not update meanvel field");167 if(!parameters->FindParam(&epsvel,"epsvel"))throw ErrorException(__FUNCT__," error message: could not update epsvel field");190 parameters->FindParam(&meanvel,"meanvel"); 191 parameters->FindParam(&epsvel,"epsvel"); 168 192 if(!parameters->FindParam(&artdiff,"artdiff"))throw ErrorException(__FUNCT__," error message: could not update artdiff field"); 169 193 if(!parameters->FindParam(&viscosity_overshoot,"viscosity_overshoot"))throw ErrorException(__FUNCT__," error message: could not update viscosity_overshoot field"); 170 194 if(!parameters->FindParam(&stokesreconditioning,"stokesreconditioning"))throw ErrorException(__FUNCT__," error message: could not update stokesreconditioning field"); 171 195 parameters->FindParam(&control_type,"control_type"); 172 if(!parameters->FindParam(&cm_noisedampening,"cm_noisedampening"))throw ErrorException(__FUNCT__," error message: could not update cm_noisedampening field"); 196 parameters->FindParam(&cm_noisedmp,"cm_noisedmp"); 197 parameters->FindParam(&cm_mindmp_value,"cm_mindmp_value"); 198 parameters->FindParam(&cm_mindmp_slope,"cm_mindmp_slope"); 199 parameters->FindParam(&cm_maxdmp_value,"cm_maxdmp_value"); 200 parameters->FindParam(&cm_maxdmp_slope,"cm_maxdmp_slope"); 173 201 174 202 return; … … 192 220 inputs->Recover("stokesreconditioning",&stokesreconditioning); 193 221 inputs->Recover("control_type",&control_type); 194 inputs->Recover("cm_noisedampening",&cm_noisedampening); 222 inputs->Recover("cm_noisedmp",&cm_noisedmp); 223 inputs->Recover("cm_mindmp_value",&cm_mindmp_value); 224 inputs->Recover("cm_mindmp_slope",&cm_mindmp_slope); 225 inputs->Recover("cm_maxdmp_value",&cm_maxdmp_value); 226 inputs->Recover("cm_maxdmp_slope",&cm_maxdmp_slope); 195 227 196 228 } -
issm/trunk/src/c/objects/Numpar.h
r2347 r2354 22 22 double stokesreconditioning; 23 23 char* control_type; 24 double cm_noisedampening; 24 double cm_noisedmp; 25 double cm_mindmp_value; 26 double cm_mindmp_slope; 27 double cm_maxdmp_value; 28 double cm_maxdmp_slope; 25 29 26 30 Numpar(); -
issm/trunk/src/c/objects/Tria.cpp
r2350 r2354 2396 2396 grade_g_gaussian[i]= 2397 2397 -2*drag*alpha_complement*((lambda*vx+mu*vy))*Jdet*gauss_weight*l1l2l3[i] //standard term dJ/dki 2398 -numpar->cm_noised ampening*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]); // regularization term d/dki(1/2*(dk/dx)^2)2398 -numpar->cm_noisedmp*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]); // regularization term d/dki(1/2*(dk/dx)^2) 2399 2399 } 2400 2400 … … 2619 2619 2620 2620 //Add regularization term 2621 grade_g_gaussian[i]-=numpar->cm_noised ampening*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]);2621 grade_g_gaussian[i]-=numpar->cm_noisedmp*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]); 2622 2622 } 2623 2623 … … 2809 2809 2810 2810 //Add regularization term 2811 grade_g_gaussian[i]-=numpar->cm_noised ampening*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]);2811 grade_g_gaussian[i]-=numpar->cm_noisedmp*Jdet*gauss_weight*(dh1dh2dh3_basic[0][i]*dk[0]+dh1dh2dh3_basic[1][i]*dk[1]); 2812 2812 } 2813 2813 … … 2967 2967 if (!shelf){ 2968 2968 GetParameterDerivativeValue(&dk[0], &k[0],&xyz_list[0][0], gauss_l1l2l3); 2969 Jelem+=numpar->cm_noised ampening*1/2*(pow(dk[0],2)+pow(dk[1],2))*Jdet*gauss_weight;2969 Jelem+=numpar->cm_noisedmp*1/2*(pow(dk[0],2)+pow(dk[1],2))*Jdet*gauss_weight; 2970 2970 } 2971 2971 } … … 2975 2975 } 2976 2976 GetParameterDerivativeValue(&dB[0], &B[0],&xyz_list[0][0], gauss_l1l2l3); 2977 Jelem+=numpar->cm_noised ampening*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss_weight;2977 Jelem+=numpar->cm_noisedmp*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss_weight; 2978 2978 } 2979 2979 else{ -
issm/trunk/src/c/parallel/control_core.cpp
r2333 r2354 40 40 Vec grad_g_old=NULL; 41 41 double* grad_g_double=NULL; 42 double mincontrolconstraint;43 double maxcontrolconstraint;42 double cm_min; 43 double cm_max; 44 44 int nsteps,n,i; 45 45 double* J=NULL; … … 69 69 model->FindParam(&eps_cm,"eps_cm"); 70 70 model->FindParam(&tolx,"tolx"); 71 model->FindParam(& mincontrolconstraint,"mincontrolconstraint");72 model->FindParam(& maxcontrolconstraint,"maxcontrolconstraint");71 model->FindParam(&cm_min,"cm_min"); 72 model->FindParam(&cm_max,"cm_max"); 73 73 model->FindParam(¶m_g,NULL,NULL,"param_g"); 74 74 model->FindParam(&analysis_type,"analysis_type"); … … 134 134 135 135 _printf_("%s\n"," constraining the new distribution..."); 136 ControlConstrainx(param_g,numberofnodes, mincontrolconstraint,maxcontrolconstraint,control_type);136 ControlConstrainx(param_g,numberofnodes,cm_min,cm_max,control_type); 137 137 _printf_("%s\n"," done."); 138 138 -
issm/trunk/src/c/parallel/diagnostic.cpp
r2333 r2354 44 44 int count; 45 45 DataSet* parameters=NULL; 46 double cm_noisedampening;47 46 48 47 MODULEBOOT(); … … 100 99 inputs->Add("velocity",u_g_initial,3,numberofnodes); 101 100 if(control_analysis){ 102 model->FindParam(&cm_noisedampening,"cm_noisedampening");103 inputs->Add("cm_noisedampening",cm_noisedampening);104 101 model->FindParam(&u_g_obs,NULL,NULL,"u_g_obs",DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 105 102 inputs->Add("velocity_obs",u_g_obs,2,numberofnodes); -
issm/trunk/src/c/parallel/objectivefunctionC.cpp
r2333 r2354 35 35 double* optscal=NULL; 36 36 double* fit=NULL; 37 double mincontrolconstraint;38 double maxcontrolconstraint;37 double cm_min; 38 double cm_max; 39 39 char* control_type=NULL; 40 40 double* param_g_copy=NULL; … … 67 67 femmodel->parameters->FindParam(&optscal,NULL,NULL,"optscal"); 68 68 femmodel->parameters->FindParam(&fit,NULL,NULL,"fit"); 69 femmodel->parameters->FindParam(& mincontrolconstraint,"mincontrolconstraint");70 femmodel->parameters->FindParam(& maxcontrolconstraint,"maxcontrolconstraint");69 femmodel->parameters->FindParam(&cm_min,"cm_min"); 70 femmodel->parameters->FindParam(&cm_max,"cm_max"); 71 71 femmodel->parameters->FindParam(&control_type,"control_type"); 72 72 femmodel->parameters->FindParam(&analysis_type,"analysis_type"); … … 85 85 86 86 /*Constrain:*/ 87 ControlConstrainx(param_g_copy,numberofnodes, mincontrolconstraint,maxcontrolconstraint,control_type);87 ControlConstrainx(param_g_copy,numberofnodes,cm_min,cm_max,control_type); 88 88 89 89 /*Add new parameter to inputs: */ -
issm/trunk/src/c/parallel/steadystate.cpp
r2333 r2354 45 45 double* u_g_obs=NULL; 46 46 double dt; 47 double cm_noisedampening;48 47 Param* param=NULL; 49 48 … … 110 109 111 110 if(control_analysis){ 112 model->FindParam(&cm_noisedampening,"cm_noisedampening");113 inputs->Add("cm_noisedampening",cm_noisedampening);114 111 model->FindParam(&u_g_obs,NULL,NULL,"u_g_obs",DiagnosticAnalysisEnum(),HorizAnalysisEnum()); 115 112 inputs->Add("velocity_obs",u_g_obs,2,numberofnodes); -
issm/trunk/src/m/classes/@model/model.m
r2352 r2354 189 189 md.tolx=0; 190 190 md.optscal=[]; 191 md.cm_noisedampening=0; 192 md.cm_mindampening=[]; 193 md.cm_maxdampening=[]; 194 md.mincontrolconstraint=0; 195 md.maxcontrolconstraint=0; 191 md.cm_noisedmp=0; 192 md.cm_mindmp_value=0; 193 md.cm_mindmp_slope=0; 194 md.cm_maxdmp_value=0; 195 md.cm_maxdmp_slope=0; 196 md.cm_min=0; 197 md.cm_max=0; 196 198 md.fit=[]; 197 199 md.cm_jump=[]; -
issm/trunk/src/m/classes/@model/setdefaultparameters.m
r2352 r2354 188 188 %cm_mindampening stabilize the inversed parameter above 189 189 %a given scalar with a given penalty. Not applied by default 190 md.cm_mindampening=0; 190 md.cm_mindmp_value=0; 191 md.cm_mindmp_slope=0; 191 192 192 193 %cm_maxdampening stabilize the inversed parameter below 193 194 %a given scalar with a given penalty. Not applied by default 194 md.cm_maxdampening=0; 195 196 %mincontrolconstraint is the minimum acceptable value of the 195 md.cm_maxdmp_value=150; 196 md.cm_maxdmp_value=0; 197 198 %cm_min is the minimum acceptable value of the 197 199 %inversed parameter (B>0 for example) 198 md. mincontrolconstraint=0;199 200 % maxcontrolconstraintis the maximum acceptable value of the200 md.cm_min=0; 201 202 %cm_max is the maximum acceptable value of the 201 203 %inversed parameter (drag<200 for example) 202 md. maxcontrolconstraint=200;204 md.cm_max=200; 203 205 204 206 %eps_cm is a criteria to stop the control methods. -
issm/trunk/src/m/classes/public/display/displaycontrol.m
r2352 r2354 15 15 fielddisplay(md,'eps_cm','misfit convergence criterion. Default is 1%, NaN if not applied'); 16 16 fielddisplay(md,'optscal','scaling factor on gradient direction during optimization, for each optimization step'); 17 fielddisplay(md,'fit','''absolute: 0'', ''relative: 1'', or ''logarithmic: 2''. default is ''absolute: 0'',for each optimization steps');17 fielddisplay(md,'fit','''absolute: 0'', ''relative: 1'', or ''logarithmic: 2''. for each optimization steps'); 18 18 fielddisplay(md,'cm_jump','decrease threshold for misfit, default is 30%'); 19 19 fielddisplay(md,'maxiter','maximum iterations during each optimization step'); 20 20 fielddisplay(md,'tolx','minimum tolerance which will stop one optimization search'); 21 fielddisplay(md,'cm_ mindampening','minimum acceptable value (first argument) of the inversed parameter before being penalized (second argument)');22 fielddisplay(md,'cm_m axdampening','maximum acceptable value (first argument) of the inversed parameter before being penalized (second argument)');23 fielddisplay(md,'cm_ noisedampening','noise dampening coefficient');24 fielddisplay(md,' mincontrolconstraint','minimum contraint for the controlled parameters');25 fielddisplay(md,' maxcontrolconstraint','maximum contraint for the controlled parameters');21 fielddisplay(md,'cm_noisedmp','noise dampening coefficient, 0 if not applied'); 22 fielddisplay(md,'cm_mindmp_value','minimum acceptable value of the inversed parameter before being dampened'); 23 fielddisplay(md,'cm_mindmp_slope','dampening coefficient applied to parameter below minimum, 0 if not applied'); 24 fielddisplay(md,'cm_maxdmp_value','maximum acceptable value of the inversed parameter before being dampened'); 25 fielddisplay(md,'cm_maxdmp_slope','dampening coefficient applied to parameter above maximum, 0 if not applied'); 26 26 fielddisplay(md,'meanvel','velocity scaling factor when evaluating relative or logarithmic misfit'); 27 27 fielddisplay(md,'epsvel','for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity'); -
issm/trunk/src/m/classes/public/isresultconsistent.m
r2272 r2354 85 85 86 86 %check inversed parameter 87 if ~isnan(md. maxcontrolconstraint),88 if any(md.results.diagnostic.parameter>md. maxcontrolconstraint)89 disp(['''control'' result not consistent: inverse parameter is greater than ' num2str(md. maxcontrolconstraint)]);87 if ~isnan(md.cm_max), 88 if any(md.results.diagnostic.parameter>md.cm_max) 89 disp(['''control'' result not consistent: inverse parameter is greater than ' num2str(md.cm_max)]); 90 90 bool=0; return; 91 91 end 92 92 end 93 if ~isnan(md. mincontrolconstraint),94 if any(md.results.diagnostic.parameter<md. mincontrolconstraint)95 disp(['''control'' result not consistent: inverse parameter is smaller than ' num2str(md. mincontrolconstraint)]);93 if ~isnan(md.cm_min), 94 if any(md.results.diagnostic.parameter<md.cm_min) 95 disp(['''control'' result not consistent: inverse parameter is smaller than ' num2str(md.cm_min)]); 96 96 bool=0; return; 97 97 end -
issm/trunk/src/m/classes/public/marshall.m
r2330 r2354 112 112 WriteData(fid,md.tolx,'Scalar','tolx'); 113 113 WriteData(fid,md.maxiter,'Mat','maxiter'); 114 WriteData(fid,md.cm_noisedampening,'Scalar','cm_noisedampening'); 115 WriteData(fid,md.mincontrolconstraint,'Scalar','mincontrolconstraint'); 116 WriteData(fid,md.maxcontrolconstraint,'Scalar','maxcontrolconstraint'); 114 WriteData(fid,md.cm_noisedmp,'Scalar','cm_noisedmp'); 115 WriteData(fid,md.cm_mindmp_value,'Scalar','cm_mindmp_value'); 116 WriteData(fid,md.cm_mindmp_slope,'Scalar','cm_mindmp_slope'); 117 WriteData(fid,md.cm_maxdmp_value,'Scalar','cm_maxdmp_value'); 118 WriteData(fid,md.cm_maxdmp_slope,'Scalar','cm_maxdmp_slope'); 119 WriteData(fid,md.cm_min,'Scalar','cm_min'); 120 WriteData(fid,md.cm_max,'Scalar','cm_max'); 117 121 WriteData(fid,md.eps_res,'Scalar','eps_res'); 118 122 WriteData(fid,md.eps_rel,'Scalar','eps_rel'); -
issm/trunk/src/m/solutions/cielo/control_core.m
r2333 r2354 79 79 80 80 displaystring(verbose,'\n%s',[' constraining the new distribution...']); 81 param_g=ControlConstrain(param_g,model.parameters);82 83 81 84 82 disp([' value of misfit J after optimization #' num2str(n) ':' num2str(c(n).J)]); -
issm/trunk/src/m/solutions/cielo/diagnostic.m
r2333 r2354 33 33 inputs=add(inputs,'velocity',models.dh.parameters.u_g,'doublevec',3,models.dh.parameters.numberofnodes); 34 34 if md.control_analysis, 35 inputs=add(inputs,'cm_noisedampening',models.dh.parameters.cm_noisedampening,'double');36 35 inputs=add(inputs,'velocity_obs',models.dh.parameters.u_g_obs,'doublevec',2,models.dh.parameters.numberofnodes); 37 36 end -
issm/trunk/src/m/solutions/cielo/steadystate.m
r2330 r2354 44 44 inputs=add(inputs,'dt',models.t.parameters.dt*models.t.parameters.yts,'double'); 45 45 if md.control_analysis, 46 inputs=add(inputs,'cm_noisedampening',models.dh.parameters.cm_noisedampening,'double');47 46 inputs=add(inputs,'velocity_obs',models.dh.parameters.u_g_obs,'doublevec',2,models.dh.parameters.numberofnodes); 48 47 end -
issm/trunk/src/mex/ControlConstrain/ControlConstrain.cpp
r2333 r2354 12 12 /*input datasets: */ 13 13 double* p_g=NULL; 14 double mincontrolconstraint;15 double maxcontrolconstraint;14 double cm_min; 15 double cm_max; 16 16 char* control_type=NULL; 17 17 int gsize; … … 28 28 FetchParams(¶meters,PARAMETERS); 29 29 30 parameters->FindParam(& mincontrolconstraint,"mincontrolconstraint");31 parameters->FindParam(& maxcontrolconstraint,"maxcontrolconstraint");30 parameters->FindParam(&cm_min,"cm_min"); 31 parameters->FindParam(&cm_max,"cm_max"); 32 32 parameters->FindParam(&control_type,"control_type"); 33 33 34 34 /*!Call core code: */ 35 ControlConstrainx(p_g,gsize, mincontrolconstraint,maxcontrolconstraint,control_type);35 ControlConstrainx(p_g,gsize,cm_min,cm_max,control_type); 36 36 37 37 /*write output : */
Note:
See TracChangeset
for help on using the changeset viewer.