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: "
39 <<
args.relativePath(
writer.output()).c_str() << endl;
48 vectorField localNormal(blocks.size());
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();
63 if (shape.model() == cellModel::ref(cellModel::HEX))
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;
89 localNormal.resize(
topoMesh.nCells(), Zero);
93 word(
"local-direction" +
name(cmpt)),
108 const label nBndFaces =
topoMesh.nBoundaryFaces();
116 vtk::formatType::INLINE_ASCII,
132 label bndFacei =
pp.offset();
133 label meshFacei =
pp.start();
137 const label celli = own[meshFacei];
138 const label cellFacei =
cells[celli].find(meshFacei);
140 blockIds[bndFacei] = celli;
141 cellFaceIds[bndFacei] = cellFacei;
150 Info<<
"Writing block boundary faces in vtk format: "
156 writer.writeCellData(
"block", blockIds);
157 writer.writeCellData(
"face", cellFaceIds);
const polyMesh & topoMesh
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
refPtr< polyMesh > topoMeshPtr(blocks.topology(true))
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edgesCentres")))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & patches
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
List< face > faceList
List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< cell > cellList
List of cell.
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.