Changeset 7623
- Timestamp:
- 03/04/11 12:09:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/ismodelselfconsistent.m
r7622 r7623 25 25 else 26 26 analysis=[DiagnosticSolutionEnum PrognosticSolutionEnum ThermalSolutionEnum]; 27 end 28 29 for i=1:length(analysis), 30 md.analysis_type=analysis(i); 31 ismodelselfconsistent(md); 32 end 33 34 if(md.cfl_coefficient>1 | md.cfl_coefficient<0), 35 error(['model not consistent: model ' md.name ' cfl_coefficient field should between 0 and 1']); 36 end 37 end 38 %}}} 39 %recursive call for STEADYSTATE{{{1 40 if md.analysis_type==SteadystateSolutionEnum, 41 42 %NDT 43 if md.dt~=0, 44 error(['model not consistent: for a steadystate computation, dt must be zero.']); 45 end 46 47 %PRESSURE 48 if isnans(md.pressure), 49 error(['model not consistent: for a steadystate computation, the model must have an initial pressure, even lithostatic will do.']); 50 end 51 52 %eps: 53 if isnan(md.eps_rel), 54 error(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']); 55 end 56 57 %recursive call to ismodelselfconsistent 58 analysis=[DiagnosticSolutionEnum ThermalSolutionEnum]; 59 60 for i=1:length(analysis), 61 md.analysis_type=analysis(i); 62 ismodelselfconsistent(md); 63 end 64 65 end 66 %}}} 67 %recursive call for GROUNDINGLINEMIGRATION2D{{{1 68 if md.analysis_type==GroundingLineMigration2DSolutionEnum, 69 if strcmpi(md.cluster.name,'none'), 70 error(['model not consistent: ' md.analysis_type ' is only implemented in parallel mode !']) 71 end 72 73 if md.dt<=0, 74 error('model not consistent: field dt must be positive for a transient run') 75 end 76 77 %recursive call to ismodelselfconsistent 78 if (md.dim==2), 79 analysis=[DiagnosticSolutionEnum PrognosticSolutionEnum]; 80 else 81 error(['model not consistent: for a ' md.analysis_type ' computation, the grounding line module is only implemented in 2d !']) 27 82 end 28 83 … … 155 210 checkvalues(md,{'gl_migration'},[NoneEnum() AgressiveMigrationEnum() SoftMigrationEnum()]); 156 211 if (md.gl_migration~=NoneEnum), 212 if (md.dim==3 | strcmpi(md.cluster.name,'none')), 213 error(['model ' md.name ' requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']); 214 end 157 215 if isnan(md.bathymetry), 158 error(['model not consistent: model ' md.name ' requesting grounding line migration, but hbathymetry is absent!']);216 error(['model not consistent: model ' md.name ' requesting grounding line migration, but bathymetry is absent!']); 159 217 end 160 218 end … … 265 323 end 266 324 %}}} 267 %STEADYSTATE{{{1268 if md.analysis_type==SteadystateSolutionEnum,269 270 %NDT271 if md.dt~=0,272 error(['model not consistent: for a steadystate computation, dt must be zero.']);273 end274 275 %PRESSURE276 if isnans(md.pressure),277 error(['model not consistent: for a steadystate computation, the model must have an initial pressure, even lithostatic will do.']);278 end279 280 %eps:281 if isnan(md.eps_rel),282 error(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']);283 end284 285 %dim:286 if (md.dim==2),287 error(['model not consistent: for a steadystate computation, model needs to be 3d']);288 end289 end290 %}}}291 325 %THERMAL {{{1 292 326 %THERMAL STEADY AND THERMAL TRANSIENT … … 325 359 fields={'temperature','spctemperature(:,2)','observed_temperature'}; 326 360 checkgreater(md,fields,0) 327 328 end329 %}}}330 %GROUNDINGLINEMIGRATION2D{{{1331 if md.analysis_type==GroundingLineMigration2DSolutionEnum,332 if md.dim==3,333 error(['model not consistent: for a ' md.analysis_type ' computation, the grounding line module is only implemented in 2d !'])334 end335 if strcmpi(md.cluster.name,'none'),336 error(['model not consistent: ' md.analysis_type ' is only implemented in parallel mode !'])337 end338 361 339 362 end
Note:
See TracChangeset
for help on using the changeset viewer.