60 <<
"Cannot read file " << filename
65 string line = this->getLineNoComment(is);
90 line = this->getLineNoComment(is);
97 pointLst[pointi] =
point(x, y, z);
105 line = this->getLineNoComment(is);
111 edges[edgei] =
edge(beg - 1, end - 1);
119 label e0Label, e1Label, e2Label;
122 line = this->getLineNoComment(is);
126 >> e0Label >> e1Label >> e2Label;
133 if (!lineStream.
bad())
148 const edge& e0 = edges[e0Label - 1];
149 const edge& e1 = edges[e1Label - 1];
150 const edge& e2 = edges[e2Label - 1];
156 <<
"Edges 0 and 1 of triangle " << facei
157 <<
" do not share a point.\n" 158 <<
" edge0:" << e0 <<
nl 170 <<
"Edges 1 and 2 of triangle " << facei
171 <<
" do not share a point.\n" 172 <<
" edge1:" << e1 <<
nl 179 if (common12 != e1Far || e2Far != e0Far)
182 <<
"Edges of triangle " << facei
183 <<
" reference more than three points.\n" 184 <<
" edge0:" << e0 <<
nl 185 <<
" edge1:" << e1 <<
nl 186 <<
" edge2:" << e2 <<
nl 190 faceLst[facei] =
triFace(e0Far, common01, e1Far);
191 zoneIds[facei] = zoneI;
205 this->storedZoneToc().transfer(newZones);
225 : surfaceFormatsCore::oneZone(faceLst)
236 if (faceLst[facei].size() != 3)
245 <<
"Surface has " << nNonTris <<
"/" << faceLst.
size()
246 <<
" non-triangulated faces - not writing!" <<
endl;
256 <<
"Cannot open file for writing " << filename
262 os <<
"# GTS file" <<
nl 267 os <<
"# " << zoneI <<
" " 268 << zones[zoneI].name() <<
nl;
272 os <<
"# nPoints nEdges nTriangles" << nl
273 << pointLst.
size() <<
' ' << surf.
nEdges() <<
' ' 280 const point& pt = pointLst[pointi];
282 os << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
293 os << meshPts[es[edgei].start()] + 1 <<
' ' 294 << meshPts[es[edgei].
end()] + 1 <<
endl;
307 const labelList& fEdges = faceEs[faceIndex++];
309 os << fEdges[0] + 1 <<
' ' 310 << fEdges[1] + 1 <<
' ' 311 << fEdges[2] + 1 <<
' ' 338 if (faceLst[facei].size() != 3)
347 <<
"Surface has " << nNonTris <<
"/" << faceLst.
size()
348 <<
" non-triangulated faces - not writing!" <<
endl;
358 <<
"Cannot open file for writing " << filename
364 os <<
"# GTS file" <<
nl 369 os <<
"# " << zoneI <<
" " 370 << zoneToc[zoneI].name() <<
nl;
375 os <<
"# nPoints nEdges nTriangles" << nl
376 << pointLst.
size() <<
' ' << surf.
nEdges() <<
' ' 383 os << pointLst[pointi].x() <<
' ' 384 << pointLst[pointi].y() <<
' ' 385 << pointLst[pointi].z() <<
endl;
396 os << meshPts[es[edgeI].start()] + 1 <<
' ' 397 << meshPts[es[edgeI].
end()] + 1 <<
endl;
408 os << fEdges[0] + 1 <<
' ' 409 << fEdges[1] + 1 <<
' ' 410 << fEdges[2] + 1 <<
' ' 411 << zoneIds[facei] <<
endl;
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
An identifier for a surface zone on a meshed surface.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool bad() const
Return true if stream is corrupted.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
A surface zone on a MeshedSurface.
void size(const label)
Override size to be inconsistent with allocated storage.
const List< label > & zoneIds() const
Return const access to the zone ids.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label otherVertex(const label a) const
Given one vertex, return the other.
iterator end()
Return an iterator to end traversing the UList.
label commonVertex(const edge &a) const
Return common vertex.
bool good() const
Return true if next operation might succeed.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
label size() const
The surface size is the number of faces.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const Field< PointType > & points() const
Return reference to global points.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
label nEdges() const
Return number of edges in patch.
word name(const complex &)
Return a string representation of a complex.
const List< Face > & faces() const
Return const access to the faces.
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
void setSize(const label)
Reset size of List.
label size() const
The surface size is the number of faces.
vector point
Point is a vector.
Input from memory buffer stream.
const labelListList & faceEdges() const
Return face-edge addressing.
const List< surfZone > & surfZones() const
Const access to the surface zones.