Changeset 24398
- Timestamp:
- 11/25/19 16:16:43 (5 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r24387 r24398 3234 3234 case SurfaceCrevasseEnum: this->CalvingCrevasseDepth(); break; 3235 3235 case SigmaVMEnum: this->CalvingRateVonmises(); break; 3236 case PartitioningEnum: this->inputs2->SetInput(PartitioningEnum,this->lid,IssmComm::GetRank()); break; 3236 3237 } 3237 3238 … … 3253 3254 *parray_size = 1; 3254 3255 break; 3256 case IntInput2Enum: 3257 *pinterpolation = P0Enum; 3258 *pnodesperelement = 1; 3259 *parray_size = 1; 3260 break; 3255 3261 case ArrayInput2Enum:{ 3256 3262 int M; … … 3336 3342 this->GetInput2Value(&bvalue,output_enum); 3337 3343 vector->SetValue(this->Sid(),reCast<IssmDouble>(bvalue),INS_VAL); 3344 break; 3345 case IntInput2Enum: 3346 int ivalue; 3347 this->GetInput2Value(&ivalue,output_enum); 3348 vector->SetValue(this->Sid(),reCast<IssmDouble>(ivalue),INS_VAL); 3338 3349 break; 3339 3350 default: -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
r24396 r24398 60 60 } 61 61 62 /*Use ice levelset for weights*/ 63 int fordan = 0; 64 int* weights = NULL; 65 if(fordan){ 66 IssmDouble* icelevelset = NULL; 67 iomodel->FetchData(&icelevelset,NULL,NULL,"md.mask.ice_levelset"); 68 69 weights = xNew<int>(iomodel->numberofvertices); 70 for(int i=0;i<iomodel->numberofvertices;i++){ 71 if(icelevelset[i]>=0) weights[i] = 1; 72 if(icelevelset[i]<0) weights[i] = 100; 73 } 74 xDelete<IssmDouble>(icelevelset); 75 } 76 62 77 /*Partition and free resouces*/ 63 MeshPartitionx(&epart,&npart,iomodel->numberofelements,iomodel->numberofvertices,iomodel->elements,numberofelements2d,numberofvertices2d,elements2d, NULL,numlayers,elements_width,iomodel->meshelementtype,num_procs);78 MeshPartitionx(&epart,&npart,iomodel->numberofelements,iomodel->numberofvertices,iomodel->elements,numberofelements2d,numberofvertices2d,elements2d,weights,numlayers,elements_width,iomodel->meshelementtype,num_procs); 64 79 xDelete<int>(elements2d); 65 80 xDelete<int>(npart); 81 xDelete<int>(weights); 82 83 if(fordan){ 84 for(int i=0;i<IssmComm::GetSize();i++){ 85 if(i==IssmComm::GetRank()){ 86 int temp =0; 87 for(int j=0;j<iomodel->numberofelements;j++) if(epart[j]==i) temp++; 88 _printf_("Partition #"<<i<<" number of elements: "<<temp<<"\n"); 89 } 90 ISSM_MPI_Barrier(IssmComm::GetComm()); 91 } 92 } 66 93 67 94 /*Deal with rifts, they have to be included into one partition only, not several: */ -
issm/trunk-jpl/src/c/shared/Enum/Enum.vim
r24335 r24398 633 633 syn keyword cConstant P0Enum 634 634 syn keyword cConstant P1Enum 635 syn keyword cConstant PartitioningEnum 635 636 syn keyword cConstant PressureEnum 636 637 syn keyword cConstant RadarEnum … … 1316 1317 syn keyword cType AmrBamg 1317 1318 syn keyword cType ArrayInput2 1318 syn keyword cType BoolInput1319 1319 syn keyword cType BoolInput2 1320 1320 syn keyword cType BoolParam … … 1328 1328 syn keyword cType Contour 1329 1329 syn keyword cType Contours 1330 syn keyword cType ControlInput1331 1330 syn keyword cType ControlInput2 1332 1331 syn keyword cType Covertree 1333 syn keyword cType DatasetInput1334 1332 syn keyword cType DatasetInput2 1335 1333 syn keyword cType DataSetParam 1336 1334 syn keyword cType Definition 1337 1335 syn keyword cType DependentObject 1338 syn keyword cType DoubleArrayInput1339 syn keyword cType DoubleInput1340 1336 syn keyword cType DoubleMatArrayParam 1341 1337 syn keyword cType DoubleMatParam … … 1366 1362 syn keyword cType GiaDeflectionCoreArgs 1367 1363 syn keyword cType Hook 1368 syn keyword cType Input1369 1364 syn keyword cType Input2 1370 syn keyword cType Inputs1371 1365 syn keyword cType Inputs2 1372 syn keyword cType IntInput1373 1366 syn keyword cType IntInput2 1374 1367 syn keyword cType IntMatParam … … 1409 1402 syn keyword cType Penpair 1410 1403 syn keyword cType Penta 1411 syn keyword cType PentaInput1412 1404 syn keyword cType PentaInput2 1413 1405 syn keyword cType PentaRef … … 1421 1413 syn keyword cType RiftStruct 1422 1414 syn keyword cType Seg 1423 syn keyword cType SegInput1424 1415 syn keyword cType SegInput2 1425 1416 syn keyword cType Segment … … 1432 1423 syn keyword cType StringParam 1433 1424 syn keyword cType Tetra 1434 syn keyword cType TetraInput1435 1425 syn keyword cType TetraRef 1436 1426 syn keyword cType TransientArrayParam 1437 syn keyword cType TransientInput1438 1427 syn keyword cType TransientInput2 1439 1428 syn keyword cType TransientParam 1440 1429 syn keyword cType Tria 1441 syn keyword cType TriaInput1442 1430 syn keyword cType TriaInput2 1443 1431 syn keyword cType TriaRef -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r24335 r24398 629 629 P0Enum, 630 630 P1Enum, 631 PartitioningEnum, 631 632 PressureEnum, 632 633 RadarEnum, -
issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
r24335 r24398 635 635 case P0Enum : return "P0"; 636 636 case P1Enum : return "P1"; 637 case PartitioningEnum : return "Partitioning"; 637 638 case PressureEnum : return "Pressure"; 638 639 case RadarEnum : return "Radar"; -
issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
r24335 r24398 650 650 else if (strcmp(name,"P0")==0) return P0Enum; 651 651 else if (strcmp(name,"P1")==0) return P1Enum; 652 else if (strcmp(name,"Partitioning")==0) return PartitioningEnum; 652 653 else if (strcmp(name,"Pressure")==0) return PressureEnum; 653 654 else if (strcmp(name,"Radar")==0) return RadarEnum; … … 751 752 else if (strcmp(name,"SmbPrecipitationsLgm")==0) return SmbPrecipitationsLgmEnum; 752 753 else if (strcmp(name,"SmbPrecipitationsPresentday")==0) return SmbPrecipitationsPresentdayEnum; 753 else if (strcmp(name,"SmbPrecipitationsReconstructed")==0) return SmbPrecipitationsReconstructedEnum;754 754 else stage=7; 755 755 } 756 756 if(stage==7){ 757 if (strcmp(name,"SmbRe")==0) return SmbReEnum; 757 if (strcmp(name,"SmbPrecipitationsReconstructed")==0) return SmbPrecipitationsReconstructedEnum; 758 else if (strcmp(name,"SmbRe")==0) return SmbReEnum; 758 759 else if (strcmp(name,"SmbRefreeze")==0) return SmbRefreezeEnum; 759 760 else if (strcmp(name,"SmbReini")==0) return SmbReiniEnum; … … 874 875 else if (strcmp(name,"Outputdefinition31")==0) return Outputdefinition31Enum; 875 876 else if (strcmp(name,"Outputdefinition32")==0) return Outputdefinition32Enum; 876 else if (strcmp(name,"Outputdefinition33")==0) return Outputdefinition33Enum;877 877 else stage=8; 878 878 } 879 879 if(stage==8){ 880 if (strcmp(name,"Outputdefinition34")==0) return Outputdefinition34Enum; 880 if (strcmp(name,"Outputdefinition33")==0) return Outputdefinition33Enum; 881 else if (strcmp(name,"Outputdefinition34")==0) return Outputdefinition34Enum; 881 882 else if (strcmp(name,"Outputdefinition35")==0) return Outputdefinition35Enum; 882 883 else if (strcmp(name,"Outputdefinition36")==0) return Outputdefinition36Enum; … … 997 998 else if (strcmp(name,"Closed")==0) return ClosedEnum; 998 999 else if (strcmp(name,"Colinear")==0) return ColinearEnum; 999 else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;1000 1000 else stage=9; 1001 1001 } 1002 1002 if(stage==9){ 1003 if (strcmp(name,"Contact")==0) return ContactEnum; 1003 if (strcmp(name,"Constraints")==0) return ConstraintsEnum; 1004 else if (strcmp(name,"Contact")==0) return ContactEnum; 1004 1005 else if (strcmp(name,"Contour")==0) return ContourEnum; 1005 1006 else if (strcmp(name,"Contours")==0) return ContoursEnum; … … 1120 1121 else if (strcmp(name,"Internal")==0) return InternalEnum; 1121 1122 else if (strcmp(name,"Intersect")==0) return IntersectEnum; 1122 else if (strcmp(name,"InversionVzObs")==0) return InversionVzObsEnum;1123 1123 else stage=10; 1124 1124 } 1125 1125 if(stage==10){ 1126 if (strcmp(name,"J")==0) return JEnum; 1126 if (strcmp(name,"InversionVzObs")==0) return InversionVzObsEnum; 1127 else if (strcmp(name,"J")==0) return JEnum; 1127 1128 else if (strcmp(name,"L1L2Approximation")==0) return L1L2ApproximationEnum; 1128 1129 else if (strcmp(name,"L2ProjectionBaseAnalysis")==0) return L2ProjectionBaseAnalysisEnum; … … 1243 1244 else if (strcmp(name,"SMBpdd")==0) return SMBpddEnum; 1244 1245 else if (strcmp(name,"SMBpddSicopolis")==0) return SMBpddSicopolisEnum; 1245 else if (strcmp(name,"SMBsemic")==0) return SMBsemicEnum;1246 1246 else stage=11; 1247 1247 } 1248 1248 if(stage==11){ 1249 if (strcmp(name,"SSAApproximation")==0) return SSAApproximationEnum; 1249 if (strcmp(name,"SMBsemic")==0) return SMBsemicEnum; 1250 else if (strcmp(name,"SSAApproximation")==0) return SSAApproximationEnum; 1250 1251 else if (strcmp(name,"SSAFSApproximation")==0) return SSAFSApproximationEnum; 1251 1252 else if (strcmp(name,"SSAHOApproximation")==0) return SSAHOApproximationEnum; -
issm/trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
r24396 r24398 60 60 61 61 /*create vwgt (Weight per node)*/ 62 idx_t* vwgts=xNew<idx_t>(numberofnodes); 63 for(int i=0;i<numberofnodes;i++) vwgts[i]=1; 62 idx_t* vwgts=NULL; 63 if(vweights){ 64 vwgts=xNew<idx_t>(numberofnodes); 65 for(int i=0;i<numberofnodes;i++) vwgts[i]=reCast<idx_t>(vweights[i]); 66 } 64 67 65 68 /*Call METIS*/
Note:
See TracChangeset
for help on using the changeset viewer.