MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / writeConnectivity

Function writeConnectivity

src/conversion/ensight/part/ensightPartFaces.C:253–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251
252
253void Foam::ensightPartFaces::writeConnectivity
254(
255 ensightGeoFile& os,
256 const word& key,
257 const faceList& faces,
258 const labelUList& idList,
259 const labelUList& pointMap
260) const
261{
262 os.writeKeyword(key);
263 os.write(idList.size());
264 os.newline();
265
266 // write (polygon) face sizes
267 if (key == "nsided")
268 {
269 // write the number of points per face
270 forAll(idList, i)
271 {
272 const label id = idList[i] + offset_;
273 const face& f = faces[id];
274
275 os.write(f.size());
276 os.newline();
277 }
278 }
279
280 // write the points describing the face
281 forAll(idList, i)
282 {
283 const label id = idList[i] + offset_;
284 const face& f = faces[id];
285
286 // convert global -> local index
287 // (note: Ensight indices start with 1)
288 forAll(f, fp)
289 {
290 os.write(pointMap[f[fp]] + 1);
291 }
292 os.newline();
293 }
294}
295
296
297void Foam::ensightPartFaces::writeConnectivity

Callers 1

writeGeometryFunction · 0.70

Calls 3

forAllFunction · 0.50
writeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected