| 251 | |
| 252 | |
| 253 | void 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 | |
| 297 | void Foam::ensightPartFaces::writeConnectivity |
no test coverage detected