Changeset 16301
- Timestamp:
- 10/04/13 15:57:44 (11 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 5 added
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r16289 r16301 542 542 543 543 #}}} 544 #Responses sources {{{ 545 responses_sources = ./classes/Massfluxatgate.h \ 546 ./modules/ModelProcessorx/CreateOutputDefinitions.cpp 547 #}}} 544 548 #Damage sources {{{ 545 549 damage_sources = ./analyses/damage_core.cpp\ … … 878 882 endif 879 883 884 if RESPONSES 885 issm_sources += $(responses_sources) 886 endif 887 880 888 if PETSC 881 889 issm_sources += $(petsc_sources) -
issm/trunk-jpl/src/c/classes/IoModel.cpp
r16291 r16301 891 891 } 892 892 /*}}}*/ 893 /*FUNCTION IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){{{*/ 894 void IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){ 895 896 int my_rank; 897 898 int i; 899 int num_instances; 900 901 /*output: */ 902 int numstrings=0; 903 char** strings=NULL; 904 905 /*intermediary: */ 906 char* string=NULL; 907 int string_size; 908 int* code=NULL; 909 FILE** file_instances=NULL; 910 FILE* file_id=NULL; 911 912 /*recover my_rank:*/ 913 my_rank=IssmComm::GetRank(); 914 915 /*Get file pointers to beginning of the data (multiple instances of it): */ 916 file_instances=this->SetFilePointerToData(&codes,NULL,&num_instances,data_enum); 917 918 if(num_instances){ 919 920 strings=xNew<char*>(num_instances); 921 922 for(i=0;i<num_instances;i++){ 923 924 file_id=file_instances[i]; 925 926 /*check we are indeed finding a string, not something else: */ 927 if(codes[i]!=4)_error_("expecting a string for enum " << EnumToStringx(data_enum)); 928 929 /*We have to read a string from disk. First read the dimensions of the string, then the string: */ 930 if(my_rank==0){ 931 if(fread(&string_size,sizeof(int),1,file_id)!=1) _error_("could not read length of string "); 932 } 933 934 ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 935 936 /*Now allocate string: */ 937 if(string_size){ 938 string=xNew<char>((string_size+1)); 939 string[string_size]='\0'; 940 941 /*Read string on node 0, then broadcast: */ 942 if(my_rank==0){ 943 if(fread(string,string_size*sizeof(char),1,file_id)!=1)_error_(" could not read string "); 944 } 945 ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 946 } 947 else{ 948 string=xNew<char>(1); 949 string[0]='\0'; 950 } 951 strings[i]=string; 952 } 953 } 954 955 /*Assign output pointers: */ 956 *pstrings=strings; 957 *pnumstrings=num_instances; 958 } 959 /*}}}*/ 893 960 /*FUNCTION IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/ 894 961 void IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){ … … 975 1042 *pndims=ndims; 976 1043 *pnumrecords=numrecords; 1044 } 1045 /*}}}*/ 1046 /*FUNCTION IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/ 1047 void IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){ 1048 1049 int i; 1050 int num_instances; 1051 int my_rank; 1052 1053 FILE** file_instances=NULL; 1054 FILE* file_id=NULL; 1055 1056 /*output: */ 1057 IssmDouble** matrices=NULL; 1058 int* mdims=NULL; 1059 int* ndims=NULL; 1060 int numrecords=0; 1061 1062 /*intermediary: */ 1063 int M, N; 1064 IssmPDouble *pmatrix = NULL; 1065 IssmDouble *matrix = NULL; 1066 int code; 1067 1068 /*recover my_rank:*/ 1069 my_rank=IssmComm::GetRank(); 1070 1071 /*Get file pointers to beginning of the data (multiple instances of it): */ 1072 file_instances=this->SetFilePointerToData(&codes,NULL,&num_instances,data_enum); 1073 1074 if(num_instances){ 1075 1076 /*Allocate matrices :*/ 1077 matrices=xNew<IssmDouble*>(numrecords); 1078 mdims=xNew<int>(numrecords); 1079 ndims=xNew<int>(numrecords); 1080 1081 for(i=0;i<num_instances;i++){ 1082 1083 file_id=file_instances[i]; 1084 code=codes[i]; 1085 1086 if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum)); 1087 1088 /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */ 1089 /*numberofelements: */ 1090 if(my_rank==0){ 1091 if(fread(&M,sizeof(int),1,file_id)!=1) _error_("could not read number of rows for matrix "); 1092 } 1093 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1094 1095 if(my_rank==0){ 1096 if(fread(&N,sizeof(int),1,file_id)!=1) _error_("could not read number of columns for matrix "); 1097 } 1098 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1099 1100 /*Now allocate matrix: */ 1101 if(M*N){ 1102 pmatrix=xNew<IssmPDouble>(M*N); 1103 1104 /*Read matrix on node 0, then broadcast: */ 1105 if(my_rank==0){ 1106 if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,file_id)!=1) _error_("could not read matrix "); 1107 } 1108 ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 1109 1110 _assert_(this->independents); 1111 if (this->independents[data_enum]){ 1112 /*this data has already been checked out! So cancel all that we've done here, and return 1113 * the data[data_enum] directly: */ 1114 matrix=this->data[data_enum]; 1115 } 1116 else{ 1117 matrix=xNew<IssmDouble>(M*N); 1118 for (int i=0;i<M*N;++i) matrix[i]=pmatrix[i]; 1119 } 1120 xDelete<IssmPDouble>(matrix); 1121 } 1122 else 1123 matrix=NULL; 1124 1125 /*Assign: */ 1126 mdims[i]=M; 1127 matrices[i]=matrix; 1128 ndims[i]=N; 1129 } 1130 } 1131 1132 /*Assign output pointers: */ 1133 *pmatrices=matrices; 1134 *pmdims=mdims; 1135 *pndims=ndims; 1136 *pnumrecords=num_instances; 977 1137 } 978 1138 /*}}}*/ … … 1257 1417 ISSM_MPI_Bcast(&record_code,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1258 1418 ISSM_MPI_Bcast(&vector_type,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1259 if(record_code==5) ISSM_MPI_Bcast(&vector_type,1,ISSM_MPI_INT,0,IssmComm::GetComm());1260 1419 1261 1420 /*Assign output pointers:*/ … … 1266 1425 } 1267 1426 /*}}}*/ 1427 /*FUNCTION IoModel::SetFilePointersToData{{{*/ 1428 FILE** IoModel::SetFilePointersToData(int** pcodes,int** pvector_types, int* pnum_instances, int data_enum){ 1429 1430 int my_rank; 1431 int found = 0; 1432 int record_enum; 1433 int record_length; 1434 int record_code; //1 to 7 number 1435 int vector_type; //1 to 7 number 1436 int* vector_types = NULL; 1437 int* codes= NULL; 1438 int num_instances = 0; 1439 int counter; 1440 FILE** file_instances =NULL; 1441 1442 /*recover my_rank:*/ 1443 my_rank=IssmComm::GetRank(); 1444 1445 /*Go find in the binary file, the data we want to fetch and count the number of 1446 * instances it appears: */ 1447 if(my_rank==0){ 1448 1449 /*First set FILE* position to the beginning of the file: */ 1450 fseek(fid,0,SEEK_SET); 1451 1452 /*Now march through file looking for the correct data identifier: */ 1453 for(;;){ 1454 /*Read enum for this size of first string name: */ 1455 if(fread(&record_enum,sizeof(int),1,fid)==0){ 1456 /*Ok, we have reached the end of the file. break: */ 1457 break; 1458 } 1459 1460 /*Is this the record sought for? : */ 1461 if (data_enum==record_enum) num_instances++; 1462 1463 /*Read the record length, and use it to skip the record: */ 1464 if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length"); 1465 fseek(fid,record_length,SEEK_CUR); 1466 } 1467 1468 /*Ok, initialize the number of file handles we are going to return: */ 1469 if(num_instances){ 1470 file_instances = xNew<FILE*>(num_instances); 1471 codes = xNew<int>(num_instances); 1472 vector_types = xNew<int>(num_instances); 1473 } 1474 1475 1476 /*Reset FILE* position to the beginning of the file, and start again, this time saving the data information 1477 * as we find it: */ 1478 counter=0; 1479 fseek(fid,0,SEEK_SET); 1480 1481 for(;;){ 1482 /*Read enum for this size of first string name: */ 1483 if(fread(&record_enum,sizeof(int),1,fid)==0){ 1484 /*Ok, we have reached the end of the file. break: */ 1485 break; 1486 } 1487 1488 /*Is this the record sought for? : */ 1489 if (data_enum==record_enum){ 1490 /*Ok, we have found the correct string. Pass the record length, and read data type code: */ 1491 fseek(fid,sizeof(int),SEEK_CUR); 1492 if(fread(&record_code,sizeof(int),1,fid)!=1) _error_("Could not read record_code"); 1493 1494 /*if record_code points to a vector, get its type (nodal or elementary): */ 1495 if(5<=record_code && record_code<=7){ 1496 if(fread(&vector_type,sizeof(int),1,fid)!=1) _error_("Could not read vector_type"); 1497 } 1498 codes[counter]=record_code; 1499 vector_types[counter]=vector_type; 1500 file_instances[counter]=fid; 1501 counter++; 1502 break; 1503 } 1504 else{ 1505 /*This is not the correct string, read the record length, and use it to skip this record: */ 1506 if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length"); 1507 /*skip: */ 1508 fseek(fid,record_length,SEEK_CUR); 1509 } 1510 } 1511 } 1512 1513 /*Broadcast data: */ 1514 ISSM_MPI_Bcast(&num_instances,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1515 ISSM_MPI_Bcast(codes,num_instances,ISSM_MPI_INT,0,IssmComm::GetComm()); 1516 ISSM_MPI_Bcast(vector_types,num_instances,ISSM_MPI_INT,0,IssmComm::GetComm()); 1517 1518 /*Assign output pointers:*/ 1519 *pcodes=codes; 1520 *pnum_instances=num_instances; 1521 if(pvector_types)*pvector_types=vector_types; 1522 return file_instances; 1523 } 1524 /*}}}*/ -
issm/trunk-jpl/src/c/classes/IoModel.h
r16291 r16301 76 76 void FetchData(char*** pstringarray,int* pnumstrings,int data_enum); 77 77 void FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum); 78 void FetchMultipleData(char*** pstringarray,int* pnumstrings,int data_enum); 79 void FetchMultipleData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum); 78 80 void FetchData(Option **poption,int data_enum); 79 81 void FetchData(int num,...); … … 81 83 void FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value); 82 84 void LastIndex(int *pindex); 85 FILE** SetFilePointersToData(int** pcodes,int** pvector_types, int data_enum); 83 86 FILE* SetFilePointerToData(int* pcode,int* pvector_type, int data_enum); 84 87 void DeclareIndependents(void); -
issm/trunk-jpl/src/c/classes/classes.h
r16167 r16301 17 17 #include "./IndependentObject.h" 18 18 #include "./Segment.h" 19 #include "./Massfluxatgate.h" 19 20 20 21 /*Constraints: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r16298 r16301 24 24 IssmDouble time; 25 25 bool ispdd,isdelta18o; 26 27 /*parameters for mass flux: {{{*/28 int mass_flux_num_profiles = 0;29 bool qmu_mass_flux_present = false;30 bool mass_flux_present = false;31 IssmDouble **array = NULL;32 int *mdims_array = NULL;33 int *ndims_array = NULL;34 IssmDouble *temp_matrix = NULL;35 int temp_m,temp_n;36 IssmDouble *matrix = NULL;37 int count;38 /*}}}*/39 26 40 27 if(*pparameters)return; //do not create parameters twice! … … 150 137 iomodel->DeleteData(requestedoutputs,MasstransportRequestedOutputsEnum); 151 138 152 /*Deal with mass flux segments: {{{*/ 153 iomodel->FetchData(&qmu_mass_flux_present,QmuMassFluxSegmentsPresentEnum); 154 155 if(qmu_mass_flux_present)mass_flux_present=true; 156 else mass_flux_present=false; 157 parameters->AddObject(new BoolParam(MassFluxSegmentsPresentEnum,mass_flux_present)); 158 159 if(mass_flux_present){ 160 161 /*Fetch the mass flux segments necessary to compute the mass fluxes. Build a DoubleMatArrayParam object out of them: */ 162 iomodel->FetchData(&array,&mdims_array,&ndims_array,&mass_flux_num_profiles,MassFluxSegmentsEnum); 163 if(mass_flux_num_profiles==0)_error_("mass_flux_num_profiles is 0, when MassFlux computations were requested!"); 164 165 /*Go through segments, and extract those that belong to this cpu: */ 166 for(i=0;i<mass_flux_num_profiles;i++){ 167 temp_matrix=array[i]; 168 temp_m=mdims_array[i]; 169 temp_n=ndims_array[i]; 170 _assert_(temp_n==5); 171 172 m=0; 173 for(j=0;j<temp_m;j++){ 174 if ( iomodel->my_elements[reCast<int>(*(temp_matrix+5*j+4))-1] )m++; 175 } 176 if(m){ 177 matrix=xNewZeroInit<IssmDouble>(5*m); 178 count=0; 179 for(j=0;j<temp_m;j++){ 180 if (iomodel->my_elements[reCast<int>(*(temp_matrix+5*j+4))-1]){ 181 for(k=0;k<5;k++)*(matrix+5*count+k)=*(temp_matrix+5*j+k); 182 count++; 183 } 184 } 185 } 186 else{ 187 matrix=NULL; 188 } 189 190 /*Assign: */ 191 array[i]=matrix; 192 mdims_array[i]=m; 193 ndims_array[i]=5; 194 195 /*Free temporary matrix: */ 196 xDelete<IssmDouble>(temp_matrix); 197 } 198 199 /*Ok, we have an array of segments, different on every cpu. Create a DoubleMatArrayParam object with it: */ 200 parameters->AddObject(new DoubleMatArrayParam(MassFluxSegmentsEnum,array,mass_flux_num_profiles,mdims_array,ndims_array)); 201 202 /*Free data: */ 203 for(i=0;i<mass_flux_num_profiles;i++){ 204 IssmDouble* matrix=array[i]; 205 xDelete<IssmDouble>(matrix); 206 } 207 xDelete<int>(mdims_array); 208 xDelete<int>(ndims_array); 209 xDelete<IssmDouble*>(array); 210 } 211 /*}}}*/ 139 /*Output definitions dataset: */ 140 CreateOutputDefinitions(¶meters,iomodel); 212 141 213 142 /*Solution specific parameters*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
r16240 r16301 160 160 void DistributeNumDofs(DofIndexing* index,int analysis_type,int node_type); 161 161 162 #ifdef _HAVE_RESPONSES_ 163 void CreateParametersOutputDefinitions(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type); 162 164 #endif 165 166 #endif -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r16298 r16301 212 212 MasstransportNumRequestedOutputsEnum, 213 213 MasstransportRequestedOutputsEnum, 214 MassFluxSegmentsEnum,215 MassFluxSegmentsPresentEnum,216 MassfluxatgateNameEnum,217 MassfluxatgateSegmentsEnum,218 214 QmuIsdakotaEnum, 219 215 QmuNumberofpartitionsEnum, … … 543 539 WaterColumnOldEnum, 544 540 /*}}}*/ 541 /*Output Definitions{{{*/ 542 OutputdefinitionEnum, 543 OutputdefinitionEnumsEnum, 544 MassfluxatgateEnum, 545 MassfluxatgateNameEnum, 546 MassfluxatgateSegmentsEnum, 547 /*}}}*/ 545 548 /*Responses{{{*/ 546 549 MinVelEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r16298 r16301 220 220 case MasstransportNumRequestedOutputsEnum : return "MasstransportNumRequestedOutputs"; 221 221 case MasstransportRequestedOutputsEnum : return "MasstransportRequestedOutputs"; 222 case MassFluxSegmentsEnum : return "MassFluxSegments";223 case MassFluxSegmentsPresentEnum : return "MassFluxSegmentsPresent";224 case MassfluxatgateNameEnum : return "MassfluxatgateName";225 case MassfluxatgateSegmentsEnum : return "MassfluxatgateSegments";226 222 case QmuIsdakotaEnum : return "QmuIsdakota"; 227 223 case QmuNumberofpartitionsEnum : return "QmuNumberofpartitions"; … … 532 528 case TriaP1ElementResultEnum : return "TriaP1ElementResult"; 533 529 case WaterColumnOldEnum : return "WaterColumnOld"; 530 case OutputdefinitionEnum : return "Outputdefinition"; 531 case OutputdefinitionEnumsEnum : return "OutputdefinitionEnums"; 532 case MassfluxatgateEnum : return "Massfluxatgate"; 533 case MassfluxatgateNameEnum : return "MassfluxatgateName"; 534 case MassfluxatgateSegmentsEnum : return "MassfluxatgateSegments"; 534 535 case MinVelEnum : return "MinVel"; 535 536 case MaxVelEnum : return "MaxVel"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r16298 r16301 223 223 else if (strcmp(name,"MasstransportNumRequestedOutputs")==0) return MasstransportNumRequestedOutputsEnum; 224 224 else if (strcmp(name,"MasstransportRequestedOutputs")==0) return MasstransportRequestedOutputsEnum; 225 else if (strcmp(name,"MassFluxSegments")==0) return MassFluxSegmentsEnum;226 else if (strcmp(name,"MassFluxSegmentsPresent")==0) return MassFluxSegmentsPresentEnum;227 else if (strcmp(name,"MassfluxatgateName")==0) return MassfluxatgateNameEnum;228 else if (strcmp(name,"MassfluxatgateSegments")==0) return MassfluxatgateSegmentsEnum;229 225 else if (strcmp(name,"QmuIsdakota")==0) return QmuIsdakotaEnum; 230 226 else if (strcmp(name,"QmuNumberofpartitions")==0) return QmuNumberofpartitionsEnum; … … 260 256 else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum; 261 257 else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum; 258 else if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum; 259 else if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum; 260 else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum; 261 else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum; 262 262 else stage=3; 263 263 } 264 264 if(stage==3){ 265 if (strcmp(name,"SurfaceforcingsDesfac")==0) return SurfaceforcingsDesfacEnum; 266 else if (strcmp(name,"SurfaceforcingsS0p")==0) return SurfaceforcingsS0pEnum; 267 else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum; 268 else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum; 269 else if (strcmp(name,"SurfaceforcingsHref")==0) return SurfaceforcingsHrefEnum; 265 if (strcmp(name,"SurfaceforcingsHref")==0) return SurfaceforcingsHrefEnum; 270 266 else if (strcmp(name,"SurfaceforcingsSmbref")==0) return SurfaceforcingsSmbrefEnum; 271 267 else if (strcmp(name,"SurfaceforcingsBPos")==0) return SurfaceforcingsBPosEnum; … … 383 379 else if (strcmp(name,"Input")==0) return InputEnum; 384 380 else if (strcmp(name,"IntInput")==0) return IntInputEnum; 381 else if (strcmp(name,"IntParam")==0) return IntParamEnum; 382 else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum; 383 else if (strcmp(name,"TransientParam")==0) return TransientParamEnum; 384 else if (strcmp(name,"Matice")==0) return MaticeEnum; 385 385 else stage=4; 386 386 } 387 387 if(stage==4){ 388 if (strcmp(name,"IntParam")==0) return IntParamEnum; 389 else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum; 390 else if (strcmp(name,"TransientParam")==0) return TransientParamEnum; 391 else if (strcmp(name,"Matice")==0) return MaticeEnum; 392 else if (strcmp(name,"Matpar")==0) return MatparEnum; 388 if (strcmp(name,"Matpar")==0) return MatparEnum; 393 389 else if (strcmp(name,"Node")==0) return NodeEnum; 394 390 else if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum; … … 506 502 else if (strcmp(name,"StressTensorxz")==0) return StressTensorxzEnum; 507 503 else if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum; 504 else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum; 505 else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum; 506 else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum; 507 else if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum; 508 508 else stage=5; 509 509 } 510 510 if(stage==5){ 511 if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum; 512 else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum; 513 else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum; 514 else if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum; 515 else if (strcmp(name,"GiaW")==0) return GiaWEnum; 511 if (strcmp(name,"GiaW")==0) return GiaWEnum; 516 512 else if (strcmp(name,"P0")==0) return P0Enum; 517 513 else if (strcmp(name,"P1")==0) return P1Enum; … … 544 540 else if (strcmp(name,"TriaP1ElementResult")==0) return TriaP1ElementResultEnum; 545 541 else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum; 542 else if (strcmp(name,"Outputdefinition")==0) return OutputdefinitionEnum; 543 else if (strcmp(name,"OutputdefinitionEnums")==0) return OutputdefinitionEnumsEnum; 544 else if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum; 545 else if (strcmp(name,"MassfluxatgateName")==0) return MassfluxatgateNameEnum; 546 else if (strcmp(name,"MassfluxatgateSegments")==0) return MassfluxatgateSegmentsEnum; 546 547 else if (strcmp(name,"MinVel")==0) return MinVelEnum; 547 548 else if (strcmp(name,"MaxVel")==0) return MaxVelEnum; -
issm/trunk-jpl/src/m/classes/outputdefinition.m
r16298 r16301 47 47 obj.enums(i)=StringToEnum(class(obj.definitions{i})); 48 48 end 49 WriteData(fid,'object',obj,'fieldname','enums','format','DoubleMat','mattype',1,'scale',1./yts,'forcinglength',md.mesh.numberofvertices+1); 49 obj.enums=unique(obj.enums); 50 51 WriteData(fid,'object',obj,'fieldname','enums','format','DoubleMat','mattype',1); 50 52 end % }}} 51 53 end -
issm/trunk-jpl/src/m/enum/EnumDefinitions.py
r16298 r16301 212 212 def MasstransportNumRequestedOutputsEnum(): return StringToEnum("MasstransportNumRequestedOutputs")[0] 213 213 def MasstransportRequestedOutputsEnum(): return StringToEnum("MasstransportRequestedOutputs")[0] 214 def MassFluxSegmentsEnum(): return StringToEnum("MassFluxSegments")[0]215 def MassFluxSegmentsPresentEnum(): return StringToEnum("MassFluxSegmentsPresent")[0]216 def MassfluxatgateNameEnum(): return StringToEnum("MassfluxatgateName")[0]217 def MassfluxatgateSegmentsEnum(): return StringToEnum("MassfluxatgateSegments")[0]218 214 def QmuIsdakotaEnum(): return StringToEnum("QmuIsdakota")[0] 219 215 def QmuNumberofpartitionsEnum(): return StringToEnum("QmuNumberofpartitions")[0] … … 524 520 def TriaP1ElementResultEnum(): return StringToEnum("TriaP1ElementResult")[0] 525 521 def WaterColumnOldEnum(): return StringToEnum("WaterColumnOld")[0] 522 def OutputdefinitionEnum(): return StringToEnum("Outputdefinition")[0] 523 def OutputdefinitionEnumsEnum(): return StringToEnum("OutputdefinitionEnums")[0] 524 def MassfluxatgateEnum(): return StringToEnum("Massfluxatgate")[0] 525 def MassfluxatgateNameEnum(): return StringToEnum("MassfluxatgateName")[0] 526 def MassfluxatgateSegmentsEnum(): return StringToEnum("MassfluxatgateSegments")[0] 526 527 def MinVelEnum(): return StringToEnum("MinVel")[0] 527 528 def MaxVelEnum(): return StringToEnum("MaxVel")[0]
Note:
See TracChangeset
for help on using the changeset viewer.