Go to the documentation of this file.
33 void Foam::triSurface::writeGTS
35 const fileName& filename,
39 OFstream os(filename);
43 <<
"Cannot open file for writing " << filename
48 os <<
"# GTS file" <<
endl
49 <<
"# Regions:" <<
endl;
57 os <<
"# " << patchi <<
" "
64 os <<
"# nPoints nEdges nTriangles" <<
nl
65 << pts.size() <<
' ' <<
nEdges() <<
' ' << size() <<
nl;
68 for (
const point& pt : pts)
70 os << pt.x() <<
' ' << pt.y() <<
' ' << pt.z() <<
nl;
78 for (
const edge&
e : es)
80 os << meshPts[
e.start()] + 1 <<
' '
81 << meshPts[
e.end()] + 1 <<
nl;
90 for (
const surfacePatch&
p :
patches)
92 const label nLocalFaces =
p.size();
94 for (
label i = 0; i<nLocalFaces; ++i)
100 os << fEdges[0] + 1 <<
' '
101 << fEdges[1] + 1 <<
' '
102 << fEdges[2] + 1 <<
' '
103 << (*this)[facei].region() <<
nl;
113 os << fEdges[0] + 1 <<
' '
114 << fEdges[1] + 1 <<
' '
115 << fEdges[2] + 1 <<
' '
116 << (*this)[facei].region() <<
nl;
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const Field< point > & points() const
Return reference to global points.
List< edge > edgeList
A List of edges.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
label nEdges() const
Return number of edges in patch.
List< surfacePatch > surfacePatchList
Ostream & endl(Ostream &os)
Add newline and flush stream.
const labelListList & faceEdges() const
Return face-edge addressing.
const geometricSurfacePatchList & patches() const
#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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar e
Elementary charge.
vector point
Point is a vector.
const labelList & meshPoints() const
Return labelList of mesh points in patch.