Changeset 13435
- Timestamp:
- 09/25/12 09:40:27 (12 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh
r12495 r13435 2 2 #Synchronize Verbosity 3 3 #first remove existing files 4 rm $ISSM_DIR/src/m/ shared/Verb*.m4 rm $ISSM_DIR/src/m/classes/Verb*.m 5 5 6 6 echo "Synchronizing Verbosity levels..." … … 50 50 echo "$FILENAME -> 2^$POWER = $BINARY" 51 51 52 #Add Verbosity Matlab file{{{53 cat <<END > $ISSM_DIR"/src/m/shared/"$(echo $FILENAME".m")54 function bool=$(echo $FILENAME)()55 %$(echo $FILENAME | awk {'print toupper($1)'}) - Return true if $(echo $LEVELNAME | awk {'print tolower($1)'}) level is activated56 %57 % WARNING: DO NOT MODIFY THIS FILE58 % this file has been automatically generated by src/c/shared/Numerics/Synchronize.sh59 % Please read src/c/shared/Numerics/README for more information60 %61 % Usage:62 % bool=$FILENAME()63 64 bool=logical(bitand(GetVerbosityLevel(),$BINARY));65 END66 #}}}67 52 #Add case to verbose.m FIELDS{{{ 68 53 if [ $i -eq 1 ]; then cat <<END >> FIELDS … … 135 120 void SetVerbosityLevel(int level){ 136 121 137 if(level<0) _error 2_("vebosity level should be a positive integer (user provided " << level << ")");122 if(level<0) _error_("vebosity level should be a positive integer (user provided " << level << ")"); 138 123 139 124 verbositylevel = level; -
issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp
r13056 r13435 28 28 bool VerboseControl(void){return (GetVerbosityLevel() & 32);} /* 2^5*/ 29 29 bool VerboseQmu(void){return (GetVerbosityLevel() & 64);} /* 2^6*/ 30 bool VerboseAutodiff(void){return (GetVerbosityLevel() & 128);} /* 2^7*/ 30 31 31 32 /*Verbosity Setup*/ … … 41 42 /*FUNCTION GetVerbosityLevel {{{*/ 42 43 int GetVerbosityLevel(void){ 43 44 44 _assert_(verbositylevel>=0); 45 45 return verbositylevel; 46 47 46 }/*}}}*/ -
issm/trunk-jpl/src/c/shared/Numerics/Verbosity.h
r6324 r13435 14 14 bool VerboseControl(void); 15 15 bool VerboseQmu(void); 16 bool VerboseAutodiff(void); 16 17 17 18 /*Setup Verbosity level*/ -
issm/trunk-jpl/src/m/classes/verbose.m
r13020 r13435 9 9 % control : control method 10 10 % qmu : sensitivity analysis 11 % autodiff : AD analysis 11 12 % 12 13 % Usage: … … 23 24 % {{{ 24 25 %BEGINFIELDS 25 mprocessor = false; 26 module = false; 27 solution = false; 28 solver = false; 29 convergence = false; 30 control = false; 31 qmu = false; 26 mprocessor=false; 27 module=false; 28 solution=false; 29 solver=false; 30 convergence=false; 31 control=false; 32 qmu=false; 33 autodiff=false; 32 34 %ENDFIELDS 33 35 % }}} … … 83 85 if (verbose.control), binary=bitor(binary,32); end 84 86 if (verbose.qmu), binary=bitor(binary,64); end 87 if (verbose.autodiff), binary=bitor(binary,128); end 85 88 %ENDVERB2BIN 86 89 … … 90 93 91 94 %BEGINBIN2VERB 92 verbose.mprocessor =logical(bitand(binary, 1)); 93 verbose.module =logical(bitand(binary, 2)); 94 verbose.solution =logical(bitand(binary, 4)); 95 verbose.solver =logical(bitand(binary, 8)); 96 verbose.convergence=logical(bitand(binary,16)); 97 verbose.control =logical(bitand(binary,32)); 98 verbose.qmu =logical(bitand(binary,64)); 95 if bitand(binary,1), verbose.mprocessor=true; else verbose.mprocessor=false; end 96 if bitand(binary,2), verbose.module=true; else verbose.module=false; end 97 if bitand(binary,4), verbose.solution=true; else verbose.solution=false; end 98 if bitand(binary,8), verbose.solver=true; else verbose.solver=false; end 99 if bitand(binary,16), verbose.convergence=true; else verbose.convergence=false; end 100 if bitand(binary,32), verbose.control=true; else verbose.control=false; end 101 if bitand(binary,64), verbose.qmu=true; else verbose.qmu=false; end 102 if bitand(binary,128), verbose.autodiff=true; else verbose.autodiff=false; end 99 103 %ENDBIN2VERB 100 104 … … 115 119 disp(sprintf(' %15s : %s','control',mat2str(verbose.control))); 116 120 disp(sprintf(' %15s : %s','qmu',mat2str(verbose.qmu))); 121 disp(sprintf(' %15s : %s','autodiff',mat2str(verbose.autodiff))); 117 122 %ENDDISP 118 123
Note:
See TracChangeset
for help on using the changeset viewer.