40 void triSurface::writeDXGeometry
42 const bool writeSorted,
50 os <<
"# Patches:" <<
endl;
53 os <<
"# " << patchI <<
" "
54 << myPatches[patchI].name() <<
endl;
60 os <<
"# The irregular positions" << endl
61 <<
"object 1 class array type float rank 1 shape 3 items "
66 os << pt.x() <<
' ' << pt.y() <<
' ' << pt.z() <<
endl;
70 os <<
"# The irregular connections (triangles)" << endl
71 <<
"object 2 class array type int rank 1 shape 3 items "
72 <<
size() <<
" data follows" <<
endl;
85 patchFaceI < myPatches[patchI].size();
89 const label faceI = faceMap[faceIndex++];
93 os << f[0] <<
' ' << f[1] <<
' ' << f[2] <<
endl;
103 os << f[0] <<
' ' << f[1] <<
' ' << f[2] <<
endl;
106 os <<
"attribute \"element type\" string \"triangles\"" << endl
107 <<
"attribute \"ref\" string \"positions\"" << endl <<
endl;
112 void triSurface::writeDXTrailer(Ostream& os)
const
114 os <<
"# the field, with three components: \"positions\", \"connections\""
115 <<
", and \"data\"" << endl
116 <<
"object \"irregular positions irregular connections\" class field"
118 <<
"component \"positions\" value 1" << endl
119 <<
"component \"connections\" value 2" << endl
120 <<
"component \"data\" value 3" <<
endl;
125 void triSurface::writeDX(
const bool writeSorted, Ostream& os)
const
127 writeDXGeometry(writeSorted, os);
129 os <<
"object 3 class array type float rank 0 items " <<
size()
130 <<
" data follows" <<
endl;
140 forAll(myPatches[patchI], patchFaceI)
142 os << patchI <<
endl;
156 os << endl <<
"attribute \"dep\" string \"connections\"" << endl <<
endl;
167 writeDXGeometry(
false, os);
172 os <<
"object 3 class array type float rank 0 items " << field.
size()
173 <<
" data follows" <<
endl;
176 os << field[faceI] <<
endl;
179 <<
"attribute \"dep\" string \"connections\"" << endl <<
endl;
184 os <<
"object 3 class array type float rank 0 items " << field.
size()
185 <<
" data follows" <<
endl;
188 os << field[pointI] <<
endl;
191 <<
"attribute \"dep\" string \"positions\"" << endl <<
endl;
197 "writeDX(const scalarField&, Ostream&)"
198 ) <<
"Illegal field size " << field.
size() <<
" is not equal "
199 <<
" to number of faces " <<
size() <<
" or to number "
212 writeDXGeometry(
false, os);
217 os <<
"object 3 class array type float rank 1 shape 3 items "
218 << field.
size() <<
" data follows" <<
endl;
221 os << field[faceI].x() <<
' '
222 << field[faceI].y() <<
' '
223 << field[faceI].z() <<
endl;
226 <<
"attribute \"dep\" string \"connections\"" << endl <<
endl;
231 os <<
"object 3 class array type float rank 1 shape 3 items "
232 << field.
size() <<
" data follows" <<
endl;
235 os << field[pointI].x() <<
' '
236 << field[pointI].y() <<
' '
237 << field[pointI].z() <<
endl;
240 <<
"attribute \"dep\" string \"positions\"" << endl <<
endl;
246 "writeDX(const vectorField&, Ostream&)"
247 ) <<
"Illegal field size " << field.
size() <<
" is not equal "
248 <<
" to number of faces " <<
size() <<
" or to number "