Changeset 9536
- Timestamp:
- 08/31/11 16:57:21 (14 years ago)
- Location:
- issm/trunk/src/m
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/model.m
r9532 r9536 180 180 %Control 181 181 control_analysis = modelfield('default',0,'marshall',true,'format','Boolean'); 182 control_type = modelfield('default', 0,'marshall',true,'format','DoubleMat','mattype',3);182 control_type = modelfield('default',NaN,'marshall',true,'preprocess','marshallcontroltype','format','DoubleMat','mattype',3); 183 183 weights = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); 184 184 nsteps = modelfield('default',0,'marshall',true,'format','Integer'); -
issm/trunk/src/m/model/display/displaycontrol.m
r8650 r9536 11 11 disp(sprintf(' Control solution parameters:\n')); 12 12 if md.control_analysis, 13 fielddisplay(md,'control_type','parameter where inverse control is carried out; ex: DragCoefficientEnum, or RheologyBbarEnum)');13 fielddisplay(md,'control_type','parameter where inverse control is carried out; ex: {''DragCoefficient''}, or {''RheologyBbar''}'); 14 14 fielddisplay(md,'weights','weights applied to the misfit of each node'); 15 15 fielddisplay(md,'nsteps','number of optimization searches'); -
issm/trunk/src/m/model/ismodelselfconsistent.m
r9532 r9536 203 203 num_controls=numel(md.control_type); 204 204 num_costfunc=size(md.cm_responses,2); 205 checkvalues(md,{'control_type'},[DhdtEnum DragCoefficientEnum RheologyBbarEnum VxEnum VyEnum]); 205 if ~iscell(md.control_type) 206 message(['model not consistent: model ' md.name ' control_type field should be a cell of strings']); 207 end 208 if ~ismember(md.control_type,{'Dhdt' 'DragCoefficient' 'RheologyBbar' 'Vx' 'Vy'}); 209 message(['model not consistent: model ' md.name ' control_type field should be ''Dhdt'' ''DragCoefficient'' ''RheologyBbar'' ''Vx'' ''Vy''']); 210 end 206 211 207 212 %LENGTH CONTROL FIELDS -
issm/trunk/src/m/model/marshall.m
r9532 r9536 381 381 pos=find(in==7); out(pos,end)=PattynStokesApproximationEnum; 382 382 383 function out=marshallcontroltype(in) 384 out=zeros(numel(in),1); 385 for i=1:numel(in), 386 out(i)=StringToEnum(in{i}); 387 end -
issm/trunk/src/m/model/parametercontroloptimization.m
r8650 r9536 30 30 md2.eps_cm=NaN; 31 31 md2.nsteps=getfieldvalue(options,'nsteps',5); 32 md2.control_type=getfieldvalue(options,'md2.control_type', DragCoefficientEnum);32 md2.control_type=getfieldvalue(options,'md2.control_type',{'DragCoefficient'}); 33 33 md2.maxiter=10*ones(md2.nsteps,1); 34 34 md2.cm_jump=0.99*ones(md2.nsteps,1); -
issm/trunk/src/m/model/parameterization/parametercontrolB.m
r8650 r9536 21 21 22 22 %control type 23 md.control_type= RheologyBbarEnum;23 md.control_type={'RheologyBbar'}; 24 24 25 25 %weights -
issm/trunk/src/m/model/parameterization/parametercontroldrag.m
r8650 r9536 21 21 22 22 %control type 23 md.control_type= DragCoefficientEnum;23 md.control_type={'DragCoefficient'}; 24 24 25 25 %weights -
issm/trunk/src/m/model/tres.m
r9517 r9536 41 41 if md.control_analysis==1, 42 42 for control_type=md.control_type 43 %Will need to be updated... good luck ;) 43 44 md.(EnumToModelField(control_type))=PatchToVec(md.results.DiagnosticSolution.(EnumToString(control_type))); 44 45 end
Note:
See TracChangeset
for help on using the changeset viewer.