| 187 | |
| 188 | |
| 189 | void 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 | |
| 219 | void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const |