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

Function writeDX

src/triSurface/triSurface/interfaces/DX/writeDX.C:124–160  ·  view source on GitHub ↗

Geometry only (data field is either faceIndex or patchIndex)

Source from the content-addressed store, hash-verified

122
123// Geometry only (data field is either faceIndex or patchIndex)
124void triSurface::writeDX(const bool writeSorted, Ostream& os) const
125{
126 writeDXGeometry(writeSorted, os);
127
128 os << "object 3 class array type float rank 0 items " << size()
129 << " data follows" << endl;
130 if (writeSorted)
131 {
132 // Write patch number as data
133
134 labelList faceMap;
135 surfacePatchList patches(calcPatches(faceMap));
136
137 forAll(patches, patchi)
138 {
139 forAll(patches[patchi], patchFacei)
140 {
141 os << patchi << endl;
142 }
143 }
144 }
145 else
146 {
147 // Write face number as data
148
149 forAll(*this, facei)
150 {
151 os << facei << endl;
152 }
153 }
154
155 os << endl << "attribute \"dep\" string \"connections\"" << endl << endl;
156
157 writeDXTrailer(os);
158
159 os << "end" << endl;
160}
161
162
163// Geometry + scalar data

Callers 1

writeFunction · 0.85

Calls 9

writeDXGeometryFunction · 0.85
sizeFunction · 0.85
writeDXTrailerFunction · 0.85
forAllFunction · 0.50
exitFunction · 0.50
sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45
zMethod · 0.45

Tested by

no test coverage detected