Changeset 6314 for issm/trunk
- Timestamp:
- 10/15/10 11:14:29 (14 years ago)
- Location:
- issm/trunk/src/c/shared/Numerics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/shared/Numerics/Synchronize.sh ¶
r6310 r6314 46 46 #Get name of the line i 47 47 FILENAME=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$2);}'); 48 LEVELNAME=$(echo $FILENAME | sed -e "s/Verb//g"); 48 49 49 50 let POWER=$i-1 … … 55 56 cat <<END > $ISSM_TIER"/src/m/shared/"$(echo $FILENAME".m") 56 57 function bool=$(echo $FILENAME)() 57 %$(echo $FILENAME | awk {'print toupper($1)'}) - Enum of $(echo $NAME)58 %$(echo $FILENAME | awk {'print toupper($1)'}) - Return true if $(echo $LEVELNAME | awk {'print tolower($1)'}) level is activated 58 59 % 59 60 % WARNING: DO NOT MODIFY THIS FILE … … 67 68 END 68 69 #}}} 70 #Add case to verbose.m FIELDS{{{ 71 if [ $i -eq 1 ]; then cat <<END >> FIELDS 72 %BEGINFIELDS 73 END 74 fi 75 cat <<END >> FIELDS 76 $(echo $LEVELNAME | awk {'print tolower($1)'})=false; 77 END 78 if [ $i -eq $NUMBEROFLINES ]; then cat <<END >> FIELDS 79 %ENDFIELDS 80 END 81 fi 82 #}}} 83 #Add case to verbose.m VERB2BIN{{{ 84 if [ $i -eq 1 ]; then cat <<END >> VERB2BIN 85 %BEGINVERB2BIN 86 binary=0; 87 END 88 fi 89 cat <<END >> VERB2BIN 90 if (verbose.$(echo $LEVELNAME | awk {'print tolower($1)'})), binary=bitor(binary,$BINARY); end 91 END 92 if [ $i -eq $NUMBEROFLINES ]; then cat <<END >> VERB2BIN 93 %ENDVERB2BIN 94 END 95 fi 96 #}}} 97 #Add case to verbose.m BIN2VERB{{{ 98 if [ $i -eq 1 ]; then cat <<END >> BIN2VERB 99 %BEGINBIN2VERB 100 END 101 fi 102 cat <<END >> BIN2VERB 103 if bitand(binary,$BINARY), verbose.$(echo $LEVELNAME | awk {'print tolower($1)'})=true; else verbose.$(echo $LEVELNAME | awk {'print tolower($1)'})=false; end 104 END 105 if [ $i -eq $NUMBEROFLINES ]; then cat <<END >> BIN2VERB 106 %ENDBIN2VERB 107 END 108 fi 109 #}}} 110 #Add case to verbose.m DISP{{{ 111 if [ $i -eq 1 ]; then cat <<END >> DISP 112 %BEGINDISP 113 disp(sprintf('class ''%s'' = ',class(verbose))); 114 END 115 fi 116 cat <<END >> DISP 117 disp(sprintf(' %10s : %s','$(echo $LEVELNAME | awk {'print tolower($1)'})',mat2str(verbose.$(echo $LEVELNAME | awk {'print tolower($1)'})))); 118 END 119 if [ $i -eq $NUMBEROFLINES ]; then cat <<END >> DISP 120 %ENDDISP 121 END 122 fi 123 #}}} 69 124 #Add case to Verbosity.cpp {{{ 70 125 cat <<END >> Verbosity.cpp … … 120 175 END 121 176 #}}} 177 #Complete verbose.m {{{1 178 VERBOSEPATH="$ISSM_TIER/src/m/classes/verbose.m" 179 cat $VERBOSEPATH | sed "/%BEGINFIELDS/,$ d" > temp_begin 180 cat $VERBOSEPATH | sed "1,/%ENDFIELDS/d" > temp_end 181 cat temp_begin FIELDS temp_end > $VERBOSEPATH 182 rm temp_begin temp_end FIELDS 183 184 cat $VERBOSEPATH | sed "/%BEGINVERB2BIN/,$ d" > temp_begin 185 cat $VERBOSEPATH | sed "1,/%ENDVERB2BIN/d" > temp_end 186 cat temp_begin VERB2BIN temp_end > $VERBOSEPATH 187 rm temp_begin temp_end VERB2BIN 188 189 cat $VERBOSEPATH | sed "/%BEGINBIN2VERB/,$ d" > temp_begin 190 cat $VERBOSEPATH | sed "1,/%ENDBIN2VERB/d" > temp_end 191 cat temp_begin BIN2VERB temp_end > $VERBOSEPATH 192 rm temp_begin temp_end BIN2VERB 193 194 cat $VERBOSEPATH | sed "/%BEGINDISP/,$ d" > temp_begin 195 cat $VERBOSEPATH | sed "1,/%ENDDISP/d" > temp_end 196 cat temp_begin DISP temp_end > $VERBOSEPATH 197 rm temp_begin temp_end DISP 198 #}}} 122 199 123 200 #clean up{{{ -
TabularUnified issm/trunk/src/c/shared/Numerics/Verbosity.h ¶
r6310 r6314 6 6 #define _VERBOSITY_H_ 7 7 8 /*List of Verbosity levels (Add your own and Synchronize )*/8 /*List of Verbosity levels (Add your own and Synchronize: must begin with "Verb")*/ 9 9 bool VerbModule(void); 10 10 bool VerbConverge(void);
Note:
See TracChangeset
for help on using the changeset viewer.