Go to the documentation of this file.
29 #include "triSurface.H"
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();
92 os <<
f[0] <<
' ' <<
f[1] <<
' ' <<
f[2] <<
endl;
102 os <<
f[0] <<
' ' <<
f[1] <<
' ' <<
f[2] <<
endl;
105 os <<
"attribute \"element type\" string \"triangles\"" <<
endl
106 <<
"attribute \"ref\" string \"positions\"" <<
endl <<
endl;
113 os <<
"# the field, with three components: \"positions\", \"connections\""
114 <<
", and \"data\"" <<
endl
115 <<
"object \"irregular positions irregular connections\" class field"
117 <<
"component \"positions\" value 1" <<
endl
118 <<
"component \"connections\" value 2" <<
endl
119 <<
"component \"data\" value 3" <<
endl;
128 os <<
"object 3 class array type float rank 0 items " <<
size()
129 <<
" data follows" <<
endl;
139 forAll(myPatches[patchI], patchFaceI)
141 os << patchI <<
endl;
155 os <<
endl <<
"attribute \"dep\" string \"connections\"" <<
endl <<
endl;
168 if (field.size() ==
size())
171 os <<
"object 3 class array type float rank 0 items " << field.size()
172 <<
" data follows" <<
endl;
175 os << field[faceI] <<
endl;
178 <<
"attribute \"dep\" string \"connections\"" <<
endl <<
endl;
180 else if (field.size() ==
nPoints())
183 os <<
"object 3 class array type float rank 0 items " << field.size()
184 <<
" data follows" <<
endl;
187 os << field[pointI] <<
endl;
190 <<
"attribute \"dep\" string \"positions\"" <<
endl <<
endl;
195 <<
"Illegal field size " << field.size() <<
" is not equal "
196 <<
" to number of faces " <<
size() <<
" or to number "
211 if (field.size() ==
size())
214 os <<
"object 3 class array type float rank 1 shape 3 items "
215 << field.size() <<
" data follows" <<
endl;
218 os << field[faceI].x() <<
' '
219 << field[faceI].y() <<
' '
220 << field[faceI].z() <<
endl;
223 <<
"attribute \"dep\" string \"connections\"" <<
endl <<
endl;
225 else if (field.size() ==
nPoints())
228 os <<
"object 3 class array type float rank 1 shape 3 items "
229 << field.size() <<
" data follows" <<
endl;
232 os << field[pointI].x() <<
' '
233 << field[pointI].y() <<
' '
234 << field[pointI].z() <<
endl;
237 <<
"attribute \"dep\" string \"positions\"" <<
endl <<
endl;
242 <<
"Illegal field size " << field.size() <<
" is not equal "
243 <<
" to number of faces " <<
size() <<
" or to number "
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
const Field< point > & localPoints() const
Return pointField of points in patch.
void writeDX(const bool, Ostream &) const
For DX writing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< vector > vectorField
Specialisation of Field<T> for vector.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void writeDXGeometry(const bool, Ostream &) const
label nPoints() const
Return number of points supporting patch faces.
void writeDXTrailer(Ostream &) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
label size() const
Return the number of elements in the UList.
surfacePatchList calcPatches(labelList &faceMap) const
Sort faces according to region. Returns patch list.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const List< labelledTri > & localFaces() const
Return patch faces addressing into local point list.
vector point
Point is a vector.
List< surfacePatch > surfacePatchList