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