Changeset 9730


Ignore:
Timestamp:
09/09/11 14:07:21 (14 years ago)
Author:
Mathieu Morlighem
Message:

Better consistency checks

Location:
issm/trunk
Files:
13 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/constants.m

    r9621 r9730  
    4545
    4646                end % }}}
     47                function flag = checkconsistency(obj,md) % {{{
     48
     49                end % }}}
    4750        end
    4851end
  • issm/trunk/src/m/classes/mesh.m

    r9729 r9730  
    6565                        obj.average_vertex_connectivity=25;
    6666                end % }}}
     67                function checkconsistency(obj,md) % {{{
     68
     69                        fields={'dimension'};
     70                        checkgreaterstrict(md,'mesh',fields,0);
     71
     72                end % }}}
    6773                function disp(obj) % {{{
    6874                        disp(sprintf('   Mesh:'));
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r9726 r9730  
    55%      ismodelselfconsistent(md),
    66
    7 %nothing for now
     7%initialize consistency as true
     8modelconsistency(true);
     9
     10%Always check mesh
     11md.mesh.checkconsistency(md);
     12
     13%error message if mode is not consistent
     14if modelconsistency==false,
     15        error(' ');
     16end
  • issm/trunk/src/m/utils/recursivepath.m

    r9724 r9730  
    1 function p = genpath_ice(d)
    2 %GENPATH_ICE - generate paths in a directory
     1function p = recursivepath(d)
     2%RECURSIVEPATH - generate paths in a directory
    33%
    44%   this routine is equivalent to Matlab's genpath except that it skips CVS and .svn directories
    55%
    66%   Usage:
    7 %      p = genpath_ice(d)
     7%      p = recursivepath(d)
    88
    99%initialize path to be returned
     
    3434                ~strcmp(dirname,'private')    %private directories not allowed in MATLAB path
    3535
    36                 p = [p genpath_ice(fullfile(d,dirname))];
     36                p = [p recursivepath(fullfile(d,dirname))];
    3737        end
    3838end
  • issm/trunk/startup.m

    r8969 r9730  
    2424
    2525%ISSM path
    26 addpath([ISSM_TIER '/src/m/utils/']); %loads genpath_ice
     26addpath([ISSM_TIER '/src/m/utils/']); %loads recursivepath
    2727addpath([ISSM_TIER '/doc']);
    2828addpath([ISSM_TIER '/bin']);
    29 addpath(genpath_ice([ISSM_TIER '/src/m']));
    30 addpath(genpath_ice([ISSM_TIER '/externalpackages/scotch']));
    31 addpath(genpath_ice([ISSM_TIER '/externalpackages/canos']));
    32 addpath(genpath_ice([ISSM_TIER '/externalpackages/kml']));
    33 addpath(genpath_ice([ISSM_TIER '/externalpackages/googleearthtoolbox/']));
    34 addpath(genpath_ice([ISSM_TIER '/externalpackages/export_fig']));
     29addpath(recursivepath([ISSM_TIER '/src/m']));
     30addpath(recursivepath([ISSM_TIER '/externalpackages/scotch']));
     31addpath(recursivepath([ISSM_TIER '/externalpackages/canos']));
     32addpath(recursivepath([ISSM_TIER '/externalpackages/kml']));
     33addpath(recursivepath([ISSM_TIER '/externalpackages/googleearthtoolbox/']));
     34addpath(recursivepath([ISSM_TIER '/externalpackages/export_fig']));
    3535
    3636%Check on any warning messages that might indicate that the paths were not correct.
     
    5757
    5858%Now, load personal startup preferences, using the local user name:
    59 rmpath(genpath_ice([ISSM_TIER '/src/m/usr']));
     59rmpath(recursivepath([ISSM_TIER '/src/m/usr']));
    6060if exist([ISSM_TIER '/src/m/usr/' USERNAME],'dir'),
    61         addpath(genpath_ice([ISSM_TIER '/src/m/usr/' USERNAME]));
     61        addpath(recursivepath([ISSM_TIER '/src/m/usr/' USERNAME]));
    6262end
    6363
Note: See TracChangeset for help on using the changeset viewer.