Changeset 14101
- Timestamp:
- 12/05/12 14:32:40 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/pairoptions.m
r13731 r14101 84 84 %CHANGEOPTIONVALUE - change the value of an option in an option list 85 85 86 %track occur ance of field86 %track occurrence of field 87 87 lines=find(strcmpi(obj.list(:,1),field)); 88 88 … … 100 100 %DELETEDUPLICATES - delete duplicates in an option list 101 101 102 %track the first occur ance of each option102 %track the first occurrence of each option 103 103 [dummy lines]=unique(obj.list(:,1),'first'); 104 104 clear dummy … … 109 109 for i=1:numoptions, 110 110 if ~ismember(i,lines), 111 disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occur ence will be kept'])111 disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurrence will be kept']) 112 112 end 113 113 end … … 137 137 end % }}} 138 138 function bool = exist(obj,field) % {{{ 139 %EXIST - check if the option exist 139 %EXIST - check if the option exists 140 140 141 141 %some argument checking: … … 150 150 bool=any(strcmpi(field,obj.list(:,1))); 151 151 end % }}} 152 function num = fieldoccur ences(obj,field), % {{{153 %FIELDOCCUR ENCES - get number of occurence of a field152 function num = fieldoccurrences(obj,field), % {{{ 153 %FIELDOCCURRENCES - get number of occurrence of a field 154 154 155 155 %check input 156 156 if ~ischar(field), 157 error('fieldoccur ences error message: field should be a string');158 end 159 160 %get number of occur ence157 error('fieldoccurrences error message: field should be a string'); 158 end 159 160 %get number of occurrence 161 161 num=sum(strcmpi(field,obj.list(:,1))); 162 162 end % }}} … … 204 204 % obj=removefield(obj,field,warn) 205 205 % 206 % if warn==1 display an info message to wa n user that206 % if warn==1 display an info message to warn user that 207 207 % some of his options have been removed. 208 208 -
issm/trunk-jpl/src/m/classes/pairoptions.py
r13424 r14101 78 78 # %DELETEDUPLICATES - delete duplicates in an option list 79 79 # 80 # %track the first occur ance of each option80 # %track the first occurrence of each option 81 81 # [dummy lines]=unique(obj.list(:,1),'first'); 82 82 # clear dummy … … 87 87 # for i=1:numoptions, 88 88 # if ~ismember(i,lines), 89 # disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occur ence will be kept'])89 # disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurrence will be kept']) 90 90 # end 91 91 # end … … 128 128 # }}} 129 129 130 #def fieldoccur ences(self,field): #{{{130 #def fieldoccurrences(self,field): #{{{ 131 131 # ''' 132 # FIELDOCCUR ENCES - get number of occurence of a field132 # FIELDOCCURRENCES - get number of occurrence of a field 133 133 # ''' 134 134 # 135 135 # #check input 136 136 # if not isinstance(field,(str,unicode)): 137 # raise TypeError("fieldoccur ences error message: field should be a string")138 139 # #get number of occur ence137 # raise TypeError("fieldoccurrences error message: field should be a string") 138 139 # #get number of occurrence 140 140 # # ?? 141 141 # #return num -
issm/trunk-jpl/src/m/classes/plotoptions.m
r12365 r14101 68 68 69 69 %get number of data to be plotted 70 numberofplots=fieldoccur ences(rawoptions,'data');70 numberofplots=fieldoccurrences(rawoptions,'data'); 71 71 opt.numberofplots=numberofplots; 72 72 -
issm/trunk-jpl/src/m/classes/settings.m
r13040 r14101 38 38 %onto the model after a parallel run by waiting for the lock file 39 39 %N minutes that is generated once the solution has converged 40 %0 to de sactivate40 %0 to deactivate 41 41 obj.waitonlock=Inf; 42 42 end % }}} -
issm/trunk-jpl/src/m/classes/settings.py
r13040 r14101 56 56 #onto the model after a parallel run by waiting for the lock file 57 57 #N minutes that is generated once the solution has converged 58 #0 to de sactivate59 self.waitonlock= float('Inf')58 #0 to deactivate 59 self.waitonlock=2**31-1 60 60 61 61 return self
Note:
See TracChangeset
for help on using the changeset viewer.