Changeset 9751
- Timestamp:
- 09/09/11 17:04:04 (14 years ago)
- Location:
- issm/trunk/src/m
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/balancethickness.m
r9739 r9751 40 40 end % }}} 41 41 function checkconsistency(obj,md) % {{{ 42 42 if ~ismember(md.balancethickness.stabilization,[0 1 3]), 43 checkmessage('model not consistent: balancethickness.stabilization should be a scalar (0 or 1 or 3)'); 44 end 43 45 end % }}} 44 46 end -
issm/trunk/src/m/classes/clusters/castor.m
r9650 r9751 46 46 end 47 47 %}}} 48 function IsConsistent(cluster) % {{{148 function checkconsistency(cluster,md) % {{{1 49 49 50 50 available_queues={'shortc','longc'}; -
issm/trunk/src/m/classes/clusters/cosmos.m
r9650 r9751 46 46 end 47 47 %}}} 48 function IsConsistent(cluster) % {{{148 function checkconsistency(cluster,md) % {{{1 49 49 50 50 available_queues={'debug','shortq','longq'}; -
issm/trunk/src/m/classes/clusters/gemini.m
r9650 r9751 46 46 end 47 47 %}}} 48 function IsConsistent(cluster) % {{{148 function checkconsistency(cluster,md) % {{{1 49 49 50 50 available_queues={'debug','shortg','longg'}; -
issm/trunk/src/m/classes/clusters/generic.m
r9650 r9751 60 60 end 61 61 %}}} 62 function IsConsistent(cluster) % {{{162 function checkconsistency(cluster,md) % {{{1 63 63 if cluster.np<1 64 error(['number of processors should be at least 1']);64 checkmessage(['number of processors should be at least 1']); 65 65 end 66 66 if isnan(cluster.np), 67 error('number of processors should not be NaN!');67 checkessage('number of processors should not be NaN!'); 68 68 end 69 69 end -
issm/trunk/src/m/classes/clusters/none.m
r8587 r9751 30 30 end 31 31 %}}} 32 function IsConsistent(cluster) % {{{132 function checkconsistency(cluster,md) % {{{1 33 33 end 34 34 %}}} -
issm/trunk/src/m/classes/clusters/pfe.m
r9650 r9751 65 65 end 66 66 %}}} 67 function IsConsistent(cluster) % {{{167 function checkconsistency(cluster,md) % {{{1 68 68 69 69 available_queues={'long','debug'}; … … 77 77 if cluster.hyperthreading, 78 78 if ((cluster.cpuspernode>16 ) | (cluster.cpuspernode<1)), 79 error('IsConsistent error message:cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode');79 checkmessage('cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode'); 80 80 end 81 81 else 82 82 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)), 83 error('IsConsistent error message:cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');83 checkmessage('cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors'); 84 84 end 85 85 end … … 87 87 if cluster.hyperthreading, 88 88 if ((cluster.cpuspernode>24 ) | (cluster.cpuspernode<1)), 89 error('IsConsistent error message:cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode');89 checkmessage('cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode'); 90 90 end 91 91 else 92 92 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)), 93 error('IsConsistent error message:cpuspernode should be between 1 and 12 for ''wes'' processors');93 checkmessage('cpuspernode should be between 1 and 12 for ''wes'' processors'); 94 94 end 95 95 end 96 96 else 97 error('IsConsistent error message:unknown processor type, should be ''neh'',''wes'' or ''har''');97 checkmessage('unknown processor type, should be ''neh'',''wes'' or ''har'''); 98 98 end 99 99 100 100 %Miscelaneous 101 if isempty(cluster.login), error('IsConsistent error message:login empty'); end102 if isempty(cluster.codepath), error('IsConsistent error message:codepath empty'); end103 if isempty(cluster.executionpath), error('IsConsistent error message:executionpath empty'); end101 if isempty(cluster.login), checkmessage('login empty'); end 102 if isempty(cluster.codepath), checkmessage('codepath empty'); end 103 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end 104 104 105 105 end -
issm/trunk/src/m/classes/clusters/pollux.m
r9650 r9751 46 46 end 47 47 %}}} 48 function IsConsistent(cluster) % {{{148 function checkconsistency(cluster,md) % {{{1 49 49 50 50 available_queues={'shortp','longp'}; -
issm/trunk/src/m/classes/groundingline.m
r9739 r9751 44 44 function checkconsistency(obj,md) % {{{ 45 45 46 if ~ismember({obj.migration},{'None' 'AgressiveMigration' 'SoftMigration'}), 47 checkmessage(['groundingline.migration field should be ''None'' ''AgressiveMigration'' or ''SoftMigration''']); 48 end 49 if ~strcmp(obj.migration,'None'), 50 if (md.mesh.dimension==3 | strcmpi(md.cluster.name,'none')), 51 checkmessage(['requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']); 52 end 53 if isnan(md.geometry.bathymetry), 54 checkmessage(['requesting grounding line migration, but bathymetry is absent!']); 55 end 56 pos=find(md.mask.vertexongroundedice); 57 if any(md.geometry.bed(pos)-md.geometry.bathymetry(pos)), 58 checkmessage(['bathymetry not equal to bed on grounded ice !']); 59 end 60 pos=find(md.mask.vertexonfloatingice); 61 if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>tolerance), 62 checkmessage(['bathymetry superior to bed on floating ice !']); 63 end 64 end 65 46 66 end % }}} 47 67 end -
issm/trunk/src/m/classes/materials.m
r9749 r9751 85 85 fields={'rheology_B'}; 86 86 checksize(md,'materials',fields,[md.mesh.numberofvertices 1]); 87 88 if ~ismember({md.materials.rheology_law},{'None' 'Paterson' 'Arrhenius'}), 89 checkmessage(['model not consistent: model ' md.miscellaneous.name ' rheology_law field should be ''none'' ''paterson'' or ''arrhenius''']); 90 end 87 91 end % }}} 88 92 function disp(obj) % {{{ -
issm/trunk/src/m/classes/mesh.m
r9749 r9751 105 105 end 106 106 107 108 if (md.mesh.dimension==2), 109 if md.mesh.average_vertex_connectivity<9, 110 checkmessage('model not consistent: connectivity should be at least 9 for 2d models'); 111 end 112 end 113 if md.mesh.dimension==3, 114 if md.mesh.average_vertex_connectivity<24, 115 checkmessage('model not consistent: connectivity should be at least 24 for 3d models'); 116 end 117 end 118 107 119 %Solution specific checks 108 120 switch(md.private.solution), -
issm/trunk/src/m/classes/prognostic.m
r9739 r9751 47 47 end % }}} 48 48 function checkconsistency(obj,md) % {{{ 49 if ~ismember(obj.stabilization,[0 1 3]), 50 checkmessage('prognostic.stabilization should be a scalar (0 or 1 or 3)'); 51 end 49 52 53 if ~ismember(md.prognostic.hydrostatic_adjustment,{'Absolute' 'Incremental'}), 54 checkmessage(['model not consistent: model ' md.miscellaneous.name ' prognostic.hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']); 55 end 50 56 end % }}} 51 57 function disp(obj) % {{{ -
issm/trunk/src/m/classes/rifts.m
r9739 r9751 36 36 end % }}} 37 37 function checkconsistency(obj,md) % {{{ 38 38 if obj.numrifts, 39 if ~(md.mesh.dimension==2), 40 checkmessage(['model not consistent: models with rifts are only supported in 2d for now!']); 41 end 42 if ~isstruct(obj.riftstruct), 43 checkmessage(['rifts.riftstruct should be a structure!']); 44 end 45 if ~isempty(find(md.mesh.segmentmarkers>=2)), 46 %We have segments with rift markers, but no rift structure! 47 checkmessage(['model should be processed for rifts (run meshprocessrifts)!']); 48 end 49 %Check that rifts are filled with proper material 50 checkvalues(md,{'rifts.riftstruct.fill'},[WaterEnum() AirEnum() IceEnum() MelangeEnum()]); 51 else 52 if ~isnans(obj.riftstruct), 53 checkmessage(['riftstruct shoud be NaN since obj.numrifts is 0!']); 54 end 55 end 39 56 end % }}} 40 57 end -
issm/trunk/src/m/classes/thermal.m
r9739 r9751 51 51 end % }}} 52 52 function checkconsistency(obj,md) % {{{ 53 if ~ismember(obj.stabilization,[0 1 2]), 54 checkmessage('thermal.stabilization should be a scalar (0 or 1 or 2)'); 55 end 53 56 54 57 end % }}} -
issm/trunk/src/m/classes/timestepping.m
r9739 r9751 47 47 end % }}} 48 48 function checkconsistency(obj,md) % {{{ 49 49 if ~ismember(md.timestepping.time_adapt,[0 1]), 50 checkmessage(['model not consistent: model ' md.miscellaneous.name ' time_adapt field should be 0 or 1']); 51 end 50 52 end % }}} 51 53 end -
issm/trunk/src/m/model/ismodelselfconsistent.m
r9739 r9751 12 12 for i=1:length(fields), 13 13 field=fields{i}; 14 if ismember(field,{' cluster' 'results' 'debug' 'radaroverlay'}),14 if ismember(field,{'results' 'debug' 'radaroverlay'}), 15 15 continue; 16 16 end
Note:
See TracChangeset
for help on using the changeset viewer.