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: " 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,
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);
List< cell > cellList
List of cell.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
#define forAll(list, i)
Loop across all elements in list.
List< face > faceList
List of faces.
PtrList< polyPatch > polyPatchList
Store lists of polyPatch as a PtrList.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const polyMesh & topoMesh
fileName relativePath(const fileName &input, const bool caseTag=false) const
Return the input relative to the globalPath by stripping off a leading value of the globalPath...
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
const polyBoundaryMesh & patches
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
Foam::argList args(argc, argv)
refPtr< polyMesh > topoMeshPtr(blocks.topology(true))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)