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

Function writeHeader

src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormatCore.C:31–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
30
31void 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// ************************************************************************* //

Callers 1

OFSsurfaceFormat.CFile · 0.70

Calls 2

forAllFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected