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

Function writeGeometry

src/conversion/ensight/part/ensightPartIO.C:168–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168void Foam::ensightPart::writeGeometry
169(
170 ensightGeoFile& os,
171 const pointField& points
172) const
173{
174 if (size())
175 {
176 const localPoints ptList = calcLocalPoints();
177 const labelUList& pointMap = ptList.list;
178
179 writeHeader(os, true);
180
181 // write points
182 os.writeKeyword("coordinates");
183 os.write(ptList.nPoints);
184 os.newline();
185
186 for (direction cmpt=0; cmpt < point::nComponents; ++cmpt)
187 {
188 forAll(pointMap, ptI)
189 {
190 if (pointMap[ptI] > -1)
191 {
192 os.write(points[ptI].component(cmpt));
193 os.newline();
194 }
195 }
196 }
197
198 // write parts
199 forAll(elementTypes(), elemI)
200 {
201 if (elemLists_[elemI].size())
202 {
203 writeConnectivity
204 (
205 os,
206 elementTypes()[elemI],
207 elemLists_[elemI],
208 pointMap
209 );
210 }
211 }
212 }
213}
214
215
216void Foam::ensightPart::writeScalarField

Callers

nothing calls this directly

Calls 7

sizeFunction · 0.85
writeHeaderFunction · 0.70
writeConnectivityFunction · 0.70
forAllFunction · 0.50
writeMethod · 0.45
componentMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected