Changeset 8249
- Timestamp:
- 05/11/11 09:05:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/ismodelselfconsistent.m
r8234 r8249 351 351 if any(find(md.spcthickness(pos,1)==0)), 352 352 error(['model not consistent: model ' md.name ' has some grids with 0 thickness']); 353 end 354 end 355 356 %ROTATED SPC 357 %CHECK THAT EACH LINES CONTAINS ONLY NAN VALUES OR NO NAN VALUES 358 if any(sum(isnan(md.diagnostic_ref),2)~=0 & sum(isnan(md.diagnostic_ref),2)~=6), 359 error(['model not consistent: model ' md.name ' has problem with rotated spc. Each line of diagnostic_ref should contain either only NaN values or no NaN values']); 360 end 361 %CHECK THAT THE TWO VECTORS PROVIDED ARE ORTHOGONAL 362 if any(sum(isnan(md.diagnostic_ref),2)==0), 363 pos=find(sum(isnan(md.diagnostic_ref),2)==0); 364 if any(dot(md.diagnostic_ref(pos,1:3),md.diagnostic_ref(pos,4:6))), 365 dot(md.diagnostic_ref(pos,1:3),md.diagnostic_ref(pos,4:6)) 366 error(['model not consistent: model ' md.name ' has problem with rotated spc. Vectors in diagnostic_ref (colums 1 to 3 and 4 to 6) must be orthogonal']); 367 end 368 369 end 370 %CHECK THAT ROTATION IS IN THE (X,Y) PLANE FOR 2D MODELS 371 if any(md.gridonmacayeal), 372 pos=find(sum(isnan(md.diagnostic_ref),2)==0 & md.gridonmacayeal); 373 if any(md.diagnostic_ref(pos,3:5)~=0); 374 error(['model not consistent: model ' md.name ' has problem with rotated spc. The rotation should be in the (x,y) plane for 2D diagnostic models (gridonmacayeal)']); 353 375 end 354 376 end
Note:
See TracChangeset
for help on using the changeset viewer.