MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / writePoints

Function writePoints

src/conversion/meshWriter/starcd/STARCDMeshWriter.C:189–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188
189void Foam::meshWriters::STARCD::writePoints(const fileName& prefix) const
190{
191 OFstream os(prefix + ".vrt");
192 writeHeader(os, "VERTEX");
193
194 // Set the precision of the points data to 10
195 os.precision(10);
196
197 // force decimal point for Fortran input
198 os.setf(std::ios::showpoint);
199
200 const pointField& points = mesh_.points();
201
202 Info<< "Writing " << os.name() << " : "
203 << points.size() << " points" << endl;
204
205 forAll(points, ptI)
206 {
207 // convert [m] -> [mm]
208 os
209 << ptI + 1 << " "
210 << scaleFactor_ * points[ptI].x() << " "
211 << scaleFactor_ * points[ptI].y() << " "
212 << scaleFactor_ * points[ptI].z() << nl;
213 }
214 os.flush();
215
216}
217
218
219void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const

Callers 1

writeFunction · 0.70

Calls 11

precisionMethod · 0.80
setfMethod · 0.80
flushMethod · 0.80
writeHeaderFunction · 0.70
forAllFunction · 0.50
pointsMethod · 0.45
nameMethod · 0.45
sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45
zMethod · 0.45

Tested by

no test coverage detected