Changeset 20925
- Timestamp:
- 07/16/16 16:49:31 (9 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IoModel.cpp
r20918 r20925 650 650 string[0]='\0'; 651 651 } 652 653 /*Add string to parameters: */ 654 this->AddConstant(new IoConstant(string,record_name)); 652 /*Convert strings to enums if needed*/ 653 if(strcmp(record_name,"md.flowequation.fe_SSA")==0){ 654 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 655 } else if(strcmp(record_name,"md.flowequation.fe_HO")==0){ 656 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 657 } else if(strcmp(record_name,"md.flowequation.fe_FS")==0){ 658 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 659 } else { 660 /*Add string to parameters: */ 661 this->AddConstant(new IoConstant(string,record_name)); 662 } 655 663 656 664 /*Free string*/ … … 770 778 string[0]='\0'; 771 779 } 772 /*Add string to parameters: */ 773 this->AddConstant(new IoConstant(string,record_name)); 780 if(strcmp(record_name,"md.flowequation.fe_SSA")==0){ 781 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 782 } else if(strcmp(record_name,"md.flowequation.fe_HO")==0){ 783 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 784 } else if(strcmp(record_name,"md.flowequation.fe_FS")==0){ 785 this->AddConstant(new IoConstant(StringToEnumx(string),record_name)); 786 } else { 787 /*Add string to parameters: */ 788 this->AddConstant(new IoConstant(string,record_name)); 789 } 774 790 775 791 /*Free string*/ -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.cpp
r20918 r20925 89 89 } 90 90 }/*}}}*/ 91 -
issm/trunk-jpl/src/c/shared/io/Marshalling/IoCodeConversions.h
r20918 r20925 9 9 int IoCodeToEnumHydrology(int enum_in); 10 10 int IoCodeToEnumMaterials(int enum_in); 11 11 12 #endif -
issm/trunk-jpl/src/m/classes/flowequation.m
r20690 r20925 160 160 WriteData(fid,prefix,'object',self,'fieldname','isHO','format','Boolean'); 161 161 WriteData(fid,prefix,'object',self,'fieldname','isFS','format','Boolean'); 162 WriteData(fid,prefix,'object',self,'fieldname','fe_SSA','data', StringToEnum(self.fe_SSA),'format','Integer');163 WriteData(fid,prefix,'object',self,'fieldname','fe_HO' ,'data', StringToEnum(self.fe_HO) ,'format','Integer');164 WriteData(fid,prefix,'object',self,'fieldname','fe_FS' ,'data', StringToEnum(self.fe_FS) ,'format','Integer');162 WriteData(fid,prefix,'object',self,'fieldname','fe_SSA','data',self.fe_SSA,'format','String'); 163 WriteData(fid,prefix,'object',self,'fieldname','fe_HO' ,'data',self.fe_HO,'format','String'); 164 WriteData(fid,prefix,'object',self,'fieldname','fe_FS' ,'data',self.fe_FS,'format','String'); 165 165 WriteData(fid,prefix,'object',self,'fieldname','augmented_lagrangian_r','format','Double'); 166 166 WriteData(fid,prefix,'object',self,'fieldname','augmented_lagrangian_rhop','format','Double'); -
issm/trunk-jpl/src/m/classes/flowequation.py
r20690 r20925 126 126 WriteData(fid,prefix,'object',self,'fieldname','isHO','format','Boolean') 127 127 WriteData(fid,prefix,'object',self,'fieldname','isFS','format','Boolean') 128 WriteData(fid,prefix,'object',self,'fieldname','fe_SSA','data', StringToEnum(self.fe_SSA)[0],'format','Integer')129 WriteData(fid,prefix,'object',self,'fieldname','fe_HO','data', StringToEnum(self.fe_HO)[0] ,'format','Integer')130 WriteData(fid,prefix,'object',self,'fieldname','fe_FS','data', StringToEnum(self.fe_FS)[0] ,'format','Integer')128 WriteData(fid,prefix,'object',self,'fieldname','fe_SSA','data',self.fe_SSA,'format','String') 129 WriteData(fid,prefix,'object',self,'fieldname','fe_HO','data',self.fe_HO,'format','String') 130 WriteData(fid,prefix,'object',self,'fieldname','fe_FS','data',self.fe_FS ,'format','String') 131 131 WriteData(fid,prefix,'object',self,'fieldname','augmented_lagrangian_r','format','Double'); 132 132 WriteData(fid,prefix,'object',self,'fieldname','augmented_lagrangian_rhop','format','Double');
Note:
See TracChangeset
for help on using the changeset viewer.