Changeset 22380 for issm/trunk-jpl/src/c/bamg/Mesh.cpp
- Timestamp:
- 01/29/18 14:39:39 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/bamg/Mesh.cpp
r22253 r22380 30 30 _printf_("WARNING: mesh present but no geometry found. Reconstructing...\n"); 31 31 BuildGeometryFromMesh(bamgopts); 32 Gh.PostRead( );32 Gh.PostRead(true); 33 33 } 34 34 … … 1215 1215 /*Construction of the edges*/ 1216 1216 1217 / /initialize st and edge41217 /*initialize st and edge4*/ 1218 1218 SetOfEdges4* edge4= new SetOfEdges4(nbt*3,nbv); 1219 1219 long* st = new long[nbt*3]; 1220 1220 1221 / /initialize st as -1 (chaining algorithm)1221 /*initialize st as -1 (chaining algorithm)*/ 1222 1222 for (i=0;i<nbt*3;i++) st[i]=-1; 1223 1223 1224 / /build edge4 (chain)1224 /*build edge4 (chain)*/ 1225 1225 for (i=0;i<nbe;i++){ 1226 1226 edge4->SortAndAdd(GetId(edges[i][0]),GetId(edges[i][1])); 1227 1227 } 1228 / /check that there is no double edge1228 /*check that there is no double edge*/ 1229 1229 if (nbe != edge4->nb()){ 1230 1230 delete [] st; … … 1234 1234 long nbeold = nbe; 1235 1235 1236 //Go through the triangles and a ssthe edges in edge4 if they are not there yet1236 //Go through the triangles and add the edges in edge4 if they are not there yet 1237 1237 for (i=0;i<nbt;i++){ 1238 1238 //3 edges per triangle … … 1251 1251 _error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)"); 1252 1252 } 1253 / /OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list1253 /*OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list*/ 1254 1254 triangles[i].SetAdj2(j,triangles + st[k] / 3,(int) (st[k]%3)); 1255 1255 if (invisible) triangles[i].SetHidden(j); 1256 / / if k < nbe mark the edge as on Boundary (Locked)1256 /* if k < nbe mark the edge as on Boundary (Locked)*/ 1257 1257 if (k<nbe) { 1258 1258 triangles[i].SetLocked(j); 1259 1259 } 1260 / /set st[k] as negative so that the edge should not be called again1260 /*set st[k] as negative so that the edge should not be called again*/ 1261 1261 st[k]=-2-st[k]; 1262 1262 } 1263 //else (see 3 lines above), the edge has been called more than twice: return error1264 1263 else { 1264 /*else (see 3 lines above), the edge has been called more than twice: return error*/ 1265 1265 _printf_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << "," << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles (" << k << ")\n"); 1266 1266 _printf_("Edge " << j << " of triangle " << i << "\n"); … … 1286 1286 } 1287 1287 1288 / / check consistency of edge[].adj and geometrical required vertices1288 /*check consistency of edge[].adj and geometrical required vertices*/ 1289 1289 k=0; kk=0; 1290 1290 for (i=0;i<nbedges;i++){ … … 1304 1304 1305 1305 /*Constructions of edges*/ 1306 1307 1306 k += kk; 1308 1307 kk=0;
Note:
See TracChangeset
for help on using the changeset viewer.