Go to the documentation of this file.
34 void Foam::triSurface::writeGTS
36 const fileName& filename,
40 OFstream
os(filename);
44 <<
"Cannot write file " << filename <<
nl
50 <<
"# Regions:" <<
endl;
58 os <<
"# " << patchi <<
" "
65 os <<
"# nPoints nEdges nTriangles" <<
nl
66 << pts.size() <<
' ' <<
nEdges() <<
' ' << size() <<
nl;
69 for (
const point& pt : pts)
71 os << pt.x() <<
' ' << pt.y() <<
' ' << pt.z() <<
nl;
79 for (
const edge&
e : es)
81 os << meshPts[
e.start()] + 1 <<
' '
82 << meshPts[
e.end()] + 1 <<
nl;
91 for (
const surfacePatch&
p :
patches)
93 for (label nLocal =
p.size(); nLocal--; ++faceIndex)
95 const label facei =
faceMap[faceIndex];
99 os << fEdges[0] + 1 <<
' '
100 << fEdges[1] + 1 <<
' '
101 << fEdges[2] + 1 <<
' '
102 << (*this)[facei].region() <<
nl;
112 os << fEdges[0] + 1 <<
' '
113 << fEdges[1] + 1 <<
' '
114 << fEdges[2] + 1 <<
' '
115 << (*this)[facei].region() <<
nl;
const Field< point_type > & points() const noexcept
Return reference to global points.
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)
List< edge > edgeList
A List of edges.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
label nEdges() const
Number of edges in patch.
List< surfacePatch > surfacePatchList
A List of surfacePatch.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const labelListList & faceEdges() const
Return face-edge addressing.
const geometricSurfacePatchList & patches() const noexcept
#define forAll(list, i)
Loop across all elements in list.
OBJstream os(runTime.globalPath()/outputName)
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.