Changeset 1845
- Timestamp:
- 08/24/09 18:02:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/cielo/control_core.m
r1652 r1845 7 7 8 8 %Preprocess models 9 [inputs model]=ControlInitialization(models,inputs); 9 [inputs models]=ControlInitialization(models,inputs); 10 11 %recover active model. 12 model=models.active; 10 13 11 14 %recover parameters common to all solutions 12 15 debug=model.parameters.debug; 16 dim=model.parameters.dim; 17 isstokes=model.parameters.isstokes; 13 18 14 19 %initialize control parameters … … 33 38 34 39 displaystring(debug,'\n%s',[' computing gradJ...']); 35 [u_g c(n).grad_g]=GradJCompute(model,inputs,model.parameters.analysis_type,model.parameters.sub_analysis_type); 36 inputs=add(inputs,'velocity',u_g,'doublevec',2,model.parameters.numberofnodes); 40 results_grad=gradjcompute_core(models,inputs); 41 u_g=results_grad.u_g; c(n).grad_g=results_grad.grad_g; 42 if dim==3, 43 if isstokes, 44 inputs=add(inputs,'velocity',u_g,'doublevec',3,model.parameters.numberofnodes); 45 else 46 inputs=add(inputs,'velocity',u_g,'doublevec',3,model.parameters.numberofnodes); 47 end 48 else 49 inputs=add(inputs,'velocity',u_g,'doublevec',2,model.parameters.numberofnodes); 50 end 37 51 38 52 displaystring(debug,'\n%s',[' normalizing directions...']); … … 49 63 50 64 displaystring(debug,'\n%s',[' optimizing along gradient direction...']); 51 [search_scalar c(n).J]=ControlOptimization('objectivefunctionC',0,1,options,model ,inputs,param_g,c(n).grad_g,n,model.parameters.analysis_type,model.parameters.sub_analysis_type);65 [search_scalar c(n).J]=ControlOptimization('objectivefunctionC',0,1,options,models,inputs,param_g,c(n).grad_g,n,model.parameters.analysis_type,model.parameters.sub_analysis_type); 52 66 53 67 displaystring(debug,'\n%s',[' updating parameter using optimized search scalar...']);
Note:
See TracChangeset
for help on using the changeset viewer.