Changeset 21074
- Timestamp:
- 08/04/16 09:33:28 (9 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/DepthAverageAnalysis.cpp
r20690 r21074 113 113 /*Retrieve all inputs and parameters*/ 114 114 element->GetVerticesCoordinates(&xyz_list); 115 element->FindParam(&input_enum,InputToDepthaverage Enum);115 element->FindParam(&input_enum,InputToDepthaverageInEnum); 116 116 Input* input = element->GetInput(input_enum); _assert_(input); 117 117 … … 166 166 167 167 int inputenum; 168 element->FindParam(&inputenum,InputToDepthaverage Enum);168 element->FindParam(&inputenum,InputToDepthaverageOutEnum); 169 169 element->InputUpdateFromSolutionOneDof(solution,inputenum); 170 170 }/*}}}*/ -
issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
r20690 r21074 275 275 else{ 276 276 if(dim==1){ 277 vxaverage_input=element->GetInput(Vx Enum); _assert_(vxaverage_input);277 vxaverage_input=element->GetInput(VxAverageEnum); _assert_(vxaverage_input); 278 278 } 279 279 if(dim==2){ -
issm/trunk-jpl/src/c/cores/masstransport_core.cpp
r19527 r21074 49 49 else{ 50 50 if(VerboseSolution()) _printf0_(" call computational core\n"); 51 femmodel->parameters->SetParam(VxEnum,InputToDepthaverageInEnum); 52 femmodel->parameters->SetParam(VxAverageEnum,InputToDepthaverageOutEnum); 53 depthaverage_core(femmodel); 54 if(domaintype!=Domain2DverticalEnum){ 55 femmodel->parameters->SetParam(VyEnum,InputToDepthaverageInEnum); 56 femmodel->parameters->SetParam(VyAverageEnum,InputToDepthaverageOutEnum); 57 depthaverage_core(femmodel); 58 } 51 59 if(stabilization==4){ 52 60 solutionsequence_fct(femmodel); -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r20999 r21074 604 604 InputToExtrudeEnum, 605 605 InputToL2ProjectEnum, 606 InputToDepthaverageEnum, 606 InputToDepthaverageInEnum, 607 InputToDepthaverageOutEnum, 607 608 InputToSmoothEnum, 608 609 SmoothThicknessMultiplierEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r20999 r21074 594 594 case InputToExtrudeEnum : return "InputToExtrude"; 595 595 case InputToL2ProjectEnum : return "InputToL2Project"; 596 case InputToDepthaverageEnum : return "InputToDepthaverage"; 596 case InputToDepthaverageInEnum : return "InputToDepthaverageIn"; 597 case InputToDepthaverageOutEnum : return "InputToDepthaverageOut"; 597 598 case InputToSmoothEnum : return "InputToSmooth"; 598 599 case SmoothThicknessMultiplierEnum : return "SmoothThicknessMultiplier"; -
issm/trunk-jpl/src/c/shared/Enum/README
r14960 r21074 3 3 - StringToEnumx.cpp 4 4 - EnumToStringx.cpp 5 - src/m/enum/*6 5 all these files are automatically synchronized with EnumDefinitions.h 7 6 -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r20999 r21074 606 606 else if (strcmp(name,"InputToExtrude")==0) return InputToExtrudeEnum; 607 607 else if (strcmp(name,"InputToL2Project")==0) return InputToL2ProjectEnum; 608 else if (strcmp(name,"InputToDepthaverage")==0) return InputToDepthaverageEnum; 608 else if (strcmp(name,"InputToDepthaverageIn")==0) return InputToDepthaverageInEnum; 609 else if (strcmp(name,"InputToDepthaverageOut")==0) return InputToDepthaverageOutEnum; 609 610 else if (strcmp(name,"InputToSmooth")==0) return InputToSmoothEnum; 610 611 else if (strcmp(name,"SmoothThicknessMultiplier")==0) return SmoothThicknessMultiplierEnum; … … 628 629 else if (strcmp(name,"Masscon")==0) return MassconEnum; 629 630 else if (strcmp(name,"MassconName")==0) return MassconNameEnum; 630 else if (strcmp(name,"MassconDefinitionenum")==0) return MassconDefinitionenumEnum;631 631 else stage=6; 632 632 } 633 633 if(stage==6){ 634 if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum; 634 if (strcmp(name,"MassconDefinitionenum")==0) return MassconDefinitionenumEnum; 635 else if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum; 635 636 else if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum; 636 637 else if (strcmp(name,"MassconaxpbyName")==0) return MassconaxpbyNameEnum; … … 751 752 else if (strcmp(name,"DeviatoricStressxy")==0) return DeviatoricStressxyEnum; 752 753 else if (strcmp(name,"DeviatoricStressxz")==0) return DeviatoricStressxzEnum; 753 else if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 757 if (strcmp(name,"DeviatoricStressyy")==0) return DeviatoricStressyyEnum; 758 else if (strcmp(name,"DeviatoricStressyz")==0) return DeviatoricStressyzEnum; 758 759 else if (strcmp(name,"DeviatoricStresszz")==0) return DeviatoricStresszzEnum; 759 760 else if (strcmp(name,"DeviatoricStresseffective")==0) return DeviatoricStresseffectiveEnum; … … 874 875 else if (strcmp(name,"Outputdefinition68")==0) return Outputdefinition68Enum; 875 876 else if (strcmp(name,"Outputdefinition69")==0) return Outputdefinition69Enum; 876 else if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum; 880 if (strcmp(name,"Outputdefinition70")==0) return Outputdefinition70Enum; 881 else if (strcmp(name,"Outputdefinition71")==0) return Outputdefinition71Enum; 881 882 else if (strcmp(name,"Outputdefinition72")==0) return Outputdefinition72Enum; 882 883 else if (strcmp(name,"Outputdefinition73")==0) return Outputdefinition73Enum; … … 997 998 else if (strcmp(name,"RestartFileName")==0) return RestartFileNameEnum; 998 999 else if (strcmp(name,"ToolkitsOptionsAnalyses")==0) return ToolkitsOptionsAnalysesEnum; 999 else if (strcmp(name,"ToolkitsOptionsStrings")==0) return ToolkitsOptionsStringsEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"QmuErrName")==0) return QmuErrNameEnum; 1003 if (strcmp(name,"ToolkitsOptionsStrings")==0) return ToolkitsOptionsStringsEnum; 1004 else if (strcmp(name,"QmuErrName")==0) return QmuErrNameEnum; 1004 1005 else if (strcmp(name,"QmuInName")==0) return QmuInNameEnum; 1005 1006 else if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum; -
issm/trunk-jpl/src/c/shared/Enum/Synchronize.sh
r19804 r21074 6 6 7 7 #Removed existing files 8 rm $ISSM_DIR/src/m/enum/*.m9 rm $ISSM_DIR/src/m/enum/*.py10 rm $ISSM_DIR/src/m/enum/*.js11 8 rm $ISSM_DIR/src/c/shared/Enum/EnumToStringx.cpp 12 9 rm $ISSM_DIR/src/c/shared/Enum/StringToEnumx.cpp … … 181 178 #}}} 182 179 183 #Deal with Python Enums184 #Build EnumDefinitions.py{{{185 cat <<END > $ISSM_DIR/src/m/enum/EnumDefinitions.py186 from StringToEnum import StringToEnum187 188 """189 190 WARNING: DO NOT MODIFY THIS FILE191 this file has been automatically generated by src/c/shared/Enum/Synchronize.sh192 Please read src/c/shared/Enum/README for more information193 194 """195 196 END197 #core198 cat temp | awk '{print "def " $1"(): return StringToEnum(\"" substr($1,1,length($1)-4) "\")[0]"}' >> $ISSM_DIR/src/m/enum/EnumDefinitions.py199 #}}}200 201 #Deal with Javascript Enums202 #Build EnumDefinitions.js{{{203 cat <<END > $ISSM_DIR/src/m/enum/EnumDefinitions.js204 //WARNING: DO NOT MODIFY THIS FILE205 //this file has been automatically generated by src/c/shared/Enum/Synchronize.sh206 //Please read src/c/shared/Enum/README for more information207 END208 #core209 ENUM=0;210 for NAMEENUM in $(cat temp); do211 #Get name and enum of the line i212 NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")213 echo "function ${NAME}Enum(){ return $ENUM;}" >> $ISSM_DIR/src/m/enum/EnumDefinitions.js214 #offset Enum by one (Enum begins with 0 and not 1!)215 let ENUM=$ENUM+1216 done217 #}}}218 219 #Deal with Matlab Enums`220 ENUM=0;221 222 for NAMEENUM in $(cat temp); do223 224 #Get name and enum of the line i225 NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")226 #offset Enum by one (Enum begins with 0 and not 1!)227 let ENUM=$ENUM+1228 229 #print info {{{230 if [ $ENUM -lt 10 ]231 then232 printf "\r "233 printf "\r $ENUM/$NUMENUMS Adding "$NAME"..."234 else235 if [ $ENUM -lt 100 ]236 then237 printf "\r "238 printf "\r $ENUM/$NUMENUMS Adding "$NAME"..."239 else240 printf "\r "241 printf "\r$ENUM/$NUMENUMS Adding "$NAME"..."242 fi243 fi244 #}}}245 #Add case to matlabenum file{{{246 cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".m")247 function macro=$(echo $NAMEENUM)()248 %$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME)249 %250 % WARNING: DO NOT MODIFY THIS FILE251 % this file has been automatically generated by src/c/shared/Enum/Synchronize.sh252 % Please read src/c/shared/Enum/README for more information253 %254 % Usage:255 % macro=$NAMEENUM()256 257 macro=StringToEnum('$NAME');258 END259 #}}}260 261 done262 180 #clean up{{{ 263 181 rm temp
Note:
See TracChangeset
for help on using the changeset viewer.