34void 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
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 edgeList & edges() const
const labelList & meshPoints() const
const Field< point_type > & points() const noexcept
const labelListList & faceEdges() const
label size() const noexcept
The number of elements in the container.
const geometricSurfacePatchList & patches() const noexcept
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
List< edge > edgeList
List of edge.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< surfacePatch > surfacePatchList
List of surfacePatch.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void sort(UList< T > &list)
Sort the list.
vector point
Point is a vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.