Go to the documentation of this file.
20 const vtk::outputOptions writeOpts = vtk::formatType::INLINE_ASCII;
22 const polyMesh&
topoMesh = blocks.topology();
25 vtk::internalMeshWriter
writer
33 Info<<
"Writing block topology in vtk format: "
46 for (
direction cmpt = 0; cmpt < vector::nComponents; ++cmpt)
48 const label faceMin = label(2*cmpt);
49 const label faceMax = faceMin+1;
51 localNormal.resize(blocks.size());
55 const cellShape& shape = blocks[blocki].blockShape();
56 const pointField& verts = blocks[blocki].vertices();
65 shape.face(faceMax).centre(verts)
66 - shape.face(faceMin).centre(verts)
71 shape.face(faceMax).areaNormal(verts)
72 - shape.face(faceMin).areaNormal(verts)
79 localNormal[blocki] =
Zero;
88 word(
"local-direction" +
name(cmpt)),
vectorField pointField
pointField is a vectorField.
static constexpr const zero Zero
Global zero (0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vtk::internalMeshWriter writer(topoMesh, topoCells, writeOpts, runTime.path()/"blockTopology")
messageStream Info
Information stream (uses stdout - output is on the master only)
const polyMesh & topoMesh
word name(const complex &c)
Return string representation of complex.
const vtk::vtuCells topoCells(topoMesh, writeOpts)
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::argList args(argc, argv)
fileName relativePath(const fileName &input, const bool caseTag=false) const