| 29 | // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // |
| 30 | |
| 31 | void Foam::fileFormats::OFSsurfaceFormatCore::writeHeader |
| 32 | ( |
| 33 | Ostream& os, |
| 34 | const pointField& pointLst, |
| 35 | const UList<surfZone>& zoneLst |
| 36 | ) |
| 37 | { |
| 38 | // just emit some information until we get a nice IOobject |
| 39 | IOobject::writeBanner(os) |
| 40 | << "// OpenFOAM Surface Format - written " |
| 41 | << clock::dateTime().c_str() << nl |
| 42 | << "// ~~~~~~~~~~~~~~~~~~~~~~~" << nl << nl |
| 43 | << "// surfZones:" << nl; |
| 44 | |
| 45 | |
| 46 | // treat a single zone as being unzoned |
| 47 | if (zoneLst.size() <= 1) |
| 48 | { |
| 49 | os << "0" << token::BEGIN_LIST << token::END_LIST << nl << nl; |
| 50 | } |
| 51 | else |
| 52 | { |
| 53 | os << zoneLst.size() << nl << token::BEGIN_LIST << incrIndent << nl; |
| 54 | |
| 55 | forAll(zoneLst, zoneI) |
| 56 | { |
| 57 | zoneLst[zoneI].writeDict(os); |
| 58 | } |
| 59 | os << decrIndent << token::END_LIST << nl << nl; |
| 60 | } |
| 61 | |
| 62 | // Note: write with global point numbering |
| 63 | |
| 64 | IOobject::writeDivider(os) |
| 65 | << "\n// points:" << nl << pointLst << nl; |
| 66 | |
| 67 | IOobject::writeDivider(os); |
| 68 | } |
| 69 | |
| 70 | |
| 71 | // ************************************************************************* // |
no test coverage detected