Go to the documentation of this file.
33 #include "primitivePatch.H"
50 os <<
"v " << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
endl;
64 const face&
f = localFaces[faceI];
66 const labelList& myEdges = faceEdges[faceI];
72 if (edges[myEdges[fp]] !=
edge(
f[fp],
f[fp1]))
75 <<
"Edges of face not in face point order:"
76 <<
"face:" << faceI <<
" localF:" <<
f
77 <<
" faceEdges:" << myEdges
89 const label nInternalEdges
92 Info<<
"Writing internal edges to internalEdges.obj" <<
nl <<
endl;
94 OFstream intStream(
"internalEdges.obj");
98 for (
label edgeI = 0; edgeI < nInternalEdges; edgeI++)
100 const edge&
e = edges[edgeI];
102 intStream <<
"l " <<
e.start()+1 <<
' ' <<
e.end()+1 <<
endl;
105 Info<<
"Writing boundary edges to boundaryEdges.obj" <<
nl <<
endl;
107 OFstream bndStream(
"boundaryEdges.obj");
111 for (
label edgeI = nInternalEdges; edgeI < edges.
size(); edgeI++)
113 const edge&
e = edges[edgeI];
115 bndStream <<
"l " <<
e.start()+1 <<
' ' <<
e.end()+1 <<
endl;
127 Info<<
"Writing faceEdges per face to faceEdges.obj" <<
nl <<
endl;
135 const labelList& myEdges = faceEdges[faceI];
139 const edge&
e = edges[myEdges[i]];
141 feStream<<
"l " <<
e.start()+1 <<
' ' <<
e.end()+1 <<
endl;
155 Info<<
"Writing edgeFaces per face to edgeFaces.obj" <<
nl <<
endl;
163 ctrs[faceI] = localFaces[faceI].centre(localPoints);
170 const labelList& myFaces = edgeFaces[edgeI];
174 efStream<<
"l " << myFaces[0]+1 <<
' ' << myFaces[i]+1 <<
endl;
187 Info<<
"Writing faceFaces per face to faceFaces.obj" <<
nl <<
endl;
195 ctrs[faceI] = localFaces[faceI].centre(localPoints);
201 const labelList& nbrs = faceFaces[faceI];
205 ffStream <<
"l " << faceI+1 <<
' ' << nbrs[nbI]+1 <<
endl;
213 int main(
int argc,
char *argv[])
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const Field< PointType > & points() const
Return reference to global points.
const labelListList & edgeFaces() const
Return edge-face addressing.
A class for handling words, derived from string.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
#define forAll(list, i)
Loop across all elements in list.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const labelListList & faceEdges() const
Return face-edge addressing.
void writeFaceEdges(const pointField &localPoints, const edgeList &edges, const labelListList &faceEdges)
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
PrimitivePatch< face, List, const pointField & > myPrimitivePatch
int main(int argc, char *argv[])
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
void writeEdgeFaces(const pointField &localPoints, const faceList &localFaces, const edgeList &edges, const labelListList &edgeFaces)
void writeObj(Ostream &os, const pointField &points)
errorManip< error > abort(error &err)
void checkFaceEdges(const faceList &localFaces, const edgeList &edges, const labelListList &faceEdges)
const double e
Elementary charge.
label nInternalEdges() const
Number of internal edges.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void writeEdges(const pointField &localPoints, const edgeList &edges, const label nInternalEdges)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static void noParallel()
Remove the parallel options.
void writeFaceFaces(const pointField &localPoints, const faceList &localFaces, const labelListList &faceFaces)
const labelListList & faceFaces() const
Return face-face addressing.
Foam::argList args(argc, argv)
const word & name() const
Return name.
A list of faces which address into the list of points.