23 refPtr<polyMesh>
topoMeshPtr(blocks.topology(
true));
28 const vtk::vtuCells topoCells(
topoMesh, vtk::formatType::INLINE_ASCII);
30 vtk::internalMeshWriter
writer
34 vtk::formatType::INLINE_ASCII,
38 Info<<
"Writing block topology in vtk format: "
51 for (
direction cmpt = 0; cmpt < vector::nComponents; ++cmpt)
53 const label faceMin = label(2*cmpt);
54 const label faceMax = faceMin+1;
56 localNormal.resize(blocks.size());
60 const cellShape& shape = blocks[blocki].blockShape();
61 const pointField& verts = blocks[blocki].vertices();
70 shape.face(faceMax).centre(verts)
71 - shape.face(faceMin).centre(verts)
76 shape.face(faceMax).areaNormal(verts)
77 - shape.face(faceMin).areaNormal(verts)
84 localNormal[blocki] =
Zero;
93 word(
"local-direction" +
name(cmpt)),
107 const label nIntFaces =
topoMesh.nInternalFaces();
108 const label nBndFaces =
topoMesh.nBoundaryFaces();
112 faceList::subList(
topoMesh.faces(), nBndFaces, nIntFaces)
119 vtk::formatType::INLINE_ASCII,
133 for (
const polyPatch& pp :
patches)
135 label bndFacei = pp.start() - nIntFaces;
136 label meshFacei = pp.start();
140 const label celli = own[meshFacei];
141 const label cellFacei =
cells[celli].find(meshFacei);
143 blockIds[bndFacei] = celli;
144 cellFaceIds[bndFacei] = cellFacei;
153 Info<<
"Writing block boundary faces in vtk format: "
159 writer.writeCellData(
"block", blockIds);
160 writer.writeCellData(
"face", cellFaceIds);