Changeset 3865
- Timestamp:
- 05/20/10 09:26:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/MeshPartitionx/MeshPartitionx.cpp
r3775 r3865 41 41 42 42 /*Partition using Metis:*/ 43 METIS_PartMeshNodal(&numberofelements,&numberofgrids, index, &etype, &numflag, &num_procs, &edgecut, epart, npart); 43 if (num_procs>1){ 44 METIS_PartMeshNodal(&numberofelements,&numberofgrids, index, &etype, &numflag, &num_procs, &edgecut, epart, npart); 45 } 46 else if (num_procs==1){ 47 /*METIS does not know how to deal with one cpu only!*/ 48 for (i=0;i<numberofelements;i++) epart[i]=0; 49 for (i=0;i<numberofgrids;i++) npart[i]=0; 50 } 51 else ISSMERROR("At least one processor is required"); 44 52 } 45 53 else{ … … 57 65 } 58 66 59 METIS_PartMeshNodal(&numberofelements2d,&numberofgrids2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d); 67 /*Partition using Metis:*/ 68 if (num_procs>1){ 69 METIS_PartMeshNodal(&numberofelements2d,&numberofgrids2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d); 70 } 71 else if (num_procs==1){ 72 /*METIS does not know how to deal with one cpu only!*/ 73 for (i=0;i<numberofelements2d;i++) epart2d[i]=0; 74 for (i=0;i<numberofgrids2d;i++) npart2d[i]=0; 75 } 76 else ISSMERROR("At least one processor is required"); 60 77 61 78 /*Extrude epart2d to epart, using numlayers: */
Note:
See TracChangeset
for help on using the changeset viewer.