Triangulated surface description with patch information. More...
#include <triSurface/triSurface.H>
Triangulated surface description with patch information.
Definition at line 58 of file triSurface.H.
Public Types | |
typedef bool | BoundaryMesh |
Placeholder only, but do not remove - it is needed for GeoMesh.
| |
Public Member Functions | |
ClassName ("triSurface") | |
Runtime type information.
| |
triSurface () | |
Construct null.
| |
triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &) | |
Construct from triangles, patches, points.
| |
triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse) | |
Construct from triangles, patches, points. Reuse storage.
| |
triSurface (const List< labelledTri > &, const pointField &) | |
Construct from triangles, points. Set patchnames to default.
| |
triSurface (const triFaceList &, const pointField &) | |
Construct from triangles, points. Set region to 0 and default.
| |
triSurface (const fileName &) | |
Construct from file name (uses extension to determine type)
| |
triSurface (Istream &) | |
Construct from Istream.
| |
triSurface (const Time &d) | |
Construct from objectRegistry.
| |
triSurface (const triSurface &) | |
Construct as copy.
| |
~triSurface () | |
void | clearOut () |
void | clearTopology () |
void | clearPatchMeshAddr () |
const geometricSurfacePatchList & | patches () const |
geometricSurfacePatchList & | patches () |
const labelListList & | sortedEdgeFaces () const |
Return edge-face addressing sorted (for edges with more than.
| |
const labelList & | edgeOwner () const |
If 2 face neighbours: label of face where ordering of edge.
| |
virtual void | movePoints (const pointField &) |
Move points.
| |
virtual void | scalePoints (const scalar &) |
Scale points. A non-positive factor is ignored.
| |
void | checkTriangles (const bool verbose) |
Check/remove duplicate/degenerate triangles.
| |
void | checkEdges (const bool verbose) |
Check triply (or more) connected edges.
| |
void | cleanup (const bool verbose) |
Remove non-valid triangles.
| |
void | markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const |
Fill faceZone with currentZone for every face reachable.
| |
label | markZones (const boolList &borderEdge, labelList &faceZone) const |
(size and) fills faceZone with zone of face. Zone is area
| |
void | subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const |
'Create' sub mesh, including only faces for which
| |
triSurface | subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const |
Return new surface. Returns pointMap, faceMap from.
| |
void | write (Ostream &) const |
Write to Ostream in simple FOAM format.
| |
void | write (const fileName &, const bool sortByRegion=false) const |
Generic write routine. Chooses writer based on extension.
| |
void | write (const Time &) const |
Write to database.
| |
void | writeDX (const scalarField &, Ostream &) const |
Write to Ostream in OpenDX format.
| |
void | writeDX (const vectorField &, Ostream &) const |
void | writeStats (Ostream &) const |
Write some statistics.
| |
void | operator= (const triSurface &) |
Static Public Member Functions | |
static fileName | triSurfInstance (const Time &) |
Name of triSurface directory to use.
| |
Protected Member Functions | |
pointField & | storedPoints () |
Non-const access to global points.
| |
List< Face > & | storedFaces () |
Non-const access to the faces.
| |
Friends | |
Ostream & | operator<< (Ostream &, const triSurface &) |
typedef bool BoundaryMesh |
Placeholder only, but do not remove - it is needed for GeoMesh.
Definition at line 227 of file triSurface.H.
triSurface | ( | ) |
Construct null.
Definition at line 605 of file triSurface.C.
triSurface | ( | const List< labelledTri > & | triangles, |
const geometricSurfacePatchList & | patches, | ||
const pointField & | points | ||
) |
Construct from triangles, patches, points.
Definition at line 616 of file triSurface.C.
triSurface | ( | List< labelledTri > & | triangles, |
const geometricSurfacePatchList & | patches, | ||
pointField & | points, | ||
const bool | reUse | ||
) |
Construct from triangles, patches, points. Reuse storage.
Definition at line 630 of file triSurface.C.
triSurface | ( | const List< labelledTri > & | triangles, |
const pointField & | points | ||
) |
Construct from triangles, points. Set patchnames to default.
Definition at line 645 of file triSurface.C.
triSurface | ( | const triFaceList & | triangles, |
const pointField & | points | ||
) |
Construct from triangles, points. Set region to 0 and default.
patchName.
Definition at line 660 of file triSurface.C.
triSurface | ( | const fileName & | name ) |
Construct from file name (uses extension to determine type)
Definition at line 674 of file triSurface.C.
References fileName::ext().
triSurface | ( | Istream & | is ) |
Construct from Istream.
Definition at line 689 of file triSurface.C.
triSurface | ( | const Time & | d ) |
Construct from objectRegistry.
Definition at line 702 of file triSurface.C.
References Time::caseName(), Time::path(), and triSurface::triSurfInstance().
triSurface | ( | const triSurface & | ts ) |
Construct as copy.
Definition at line 721 of file triSurface.C.
~triSurface | ( | ) |
Definition at line 732 of file triSurface.C.
pointField& storedPoints | ( | ) | [inline, protected]
|
Non-const access to global points.
Definition at line 211 of file triSurface.H.
References PrimitivePatch< labelledTri,::Foam::List, pointField, point >::points().
Non-const access to the faces.
Definition at line 217 of file triSurface.H.
ClassName | ( | "triSurface" | ) |
Runtime type information.
Foam::fileName triSurfInstance | ( | const Time & | d ) | [static]
|
Name of triSurface directory to use.
Definition at line 44 of file triSurface.C.
References Time::caseName(), Foam::endl(), Foam::isFile(), IOstream::name(), OSstream::name(), fileName::name(), Time::path(), Foam::Pout, TimeState::timeOutputValue(), and Time::times().
Referenced by triSurface::triSurface().
void clearOut | ( | ) |
Reimplemented from PrimitivePatch< labelledTri,::Foam::List, pointField, point >.
Reimplemented in distributedTriSurfaceMesh, and triSurfaceMesh.
Definition at line 754 of file triSurface.C.
Referenced by triSurfaceMesh::clearOut().
void clearTopology | ( | ) |
Reimplemented from PrimitivePatch< labelledTri,::Foam::List, pointField, point >.
Definition at line 740 of file triSurface.C.
References Foam::deleteDemandDrivenData().
void clearPatchMeshAddr | ( | ) |
Reimplemented from PrimitivePatch< labelledTri,::Foam::List, pointField, point >.
Definition at line 748 of file triSurface.C.
const geometricSurfacePatchList& patches | ( | ) | const [inline]
|
Definition at line 298 of file triSurface.H.
Referenced by triSurfaceTools::collapseEdges(), triSurfaceTools::greenRefine(), intersectedSurface::intersectedSurface(), triSurfaceTools::mergePoints(), triSurface::operator=(), boundaryMesh::readTriSurface(), triSurfaceTools::triangulate(), and triSurfaceTools::triangulateFaceCentre().
geometricSurfacePatchList& patches | ( | ) | [inline]
|
Definition at line 303 of file triSurface.H.
const Foam::labelListList & sortedEdgeFaces | ( | ) | const |
Return edge-face addressing sorted (for edges with more than.
2 faces) according to the angle around the edge. Orientation is anticlockwise looking from edge.vec(localPoints())
Definition at line 763 of file triSurface.C.
const Foam::labelList & edgeOwner | ( | ) | const |
If 2 face neighbours: label of face where ordering of edge.
is consistent with righthand walk. If 1 neighbour: label of only face. If >2 neighbours: undetermined.
Definition at line 774 of file triSurface.C.
void movePoints | ( | const pointField & | newPoints ) | [virtual]
|
Move points.
Reimplemented in triSurfaceMesh.
Definition at line 786 of file triSurface.C.
References Foam::deleteDemandDrivenData().
Referenced by triSurfaceMesh::movePoints().
void scalePoints | ( | const scalar & | scaleFactor ) | [virtual]
|
Scale points. A non-positive factor is ignored.
Definition at line 800 of file triSurface.C.
Referenced by triSurfaceMesh::triSurfaceMesh().
void checkTriangles | ( | const bool | verbose ) |
Check/remove duplicate/degenerate triangles.
Definition at line 187 of file triSurface.C.
References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, points, List< T >::size(), Foam::Warning, and WarningIn.
void checkEdges | ( | const bool | verbose ) |
Check triply (or more) connected edges.
Definition at line 321 of file triSurface.C.
References UList< T >::empty(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and WarningIn.
void cleanup | ( | const bool | verbose ) |
void markZone | ( | const boolList & | borderEdge, |
const label | faceI, | ||
const label | currentZone, | ||
labelList & | faceZone | ||
) | const |
Fill faceZone with currentZone for every face reachable.
from faceI without crossing edge marked in borderEdge. Note: faceZone has to be sized nFaces before calling this fun.
Definition at line 834 of file triSurface.C.
References Foam::abort(), List< T >::append(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and List< T >::transfer().
(size and) fills faceZone with zone of face. Zone is area
reachable by edge crossing without crossing borderEdge (bool for every edge in surface). Returns number of zones.
Definition at line 903 of file triSurface.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, List< T >::setSize(), and List< T >::size().
Referenced by booleanSurface::booleanSurface().
'Create' sub mesh, including only faces for which
boolList entry is true Sets: pointMap: from new to old localPoints faceMap: new to old faces
Definition at line 952 of file triSurface.C.
References b, forAll, nPoints, List< T >::setSize(), and List< T >::size().
Foam::triSurface subsetMesh | ( | const boolList & | include, |
labelList & | pointMap, | ||
labelList & | faceMap | ||
) | const |
Return new surface. Returns pointMap, faceMap from.
subsetMeshMap
Definition at line 1010 of file triSurface.C.
References forAll, patches, and List< T >::size().
Referenced by booleanSurface::booleanSurface().
void write | ( | Ostream & | os ) | const |
Write to Ostream in simple FOAM format.
Definition at line 1061 of file triSurface.C.
References IOstream::check(), Foam::endl(), Foam::nl, patches, and points.
Referenced by booleanSurface::booleanSurface().
void write | ( | const fileName & | name, |
const bool | sortByRegion = false
|
||
) | const |
Generic write routine. Chooses writer based on extension.
Definition at line 1052 of file triSurface.C.
References fileName::ext().
void write | ( | const Time & | d ) | const |
Write to database.
Definition at line 1074 of file triSurface.C.
References Time::caseName(), and Time::path().
void writeDX | ( | const scalarField & | field, |
Ostream & | os | ||
) | const |
Write to Ostream in OpenDX format.
Definition at line 165 of file writeDX.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< labelledTri,::Foam::List, pointField, point >::nPoints(), List< labelledTri >::size(), and List< T >::size().
void writeDX | ( | const vectorField & | field, |
Ostream & | os | ||
) | const |
Definition at line 210 of file writeDX.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< labelledTri,::Foam::List, pointField, point >::nPoints(), List< labelledTri >::size(), and List< T >::size().
void writeStats | ( | Ostream & | os ) | const |
Write some statistics.
Reimplemented in distributedTriSurfaceMesh.
Definition at line 1086 of file triSurface.C.
References Foam::endl(), forAll, boundBox::invertedBox, Foam::max(), boundBox::max(), Foam::min(), boundBox::min(), nPoints, points, and PackedList< nBits >::set().
Referenced by booleanSurface::booleanSurface().
void operator= | ( | const triSurface & | ts ) |
Definition at line 1119 of file triSurface.C.
References List< T >::operator=(), triSurface::patches(), and PrimitivePatch< Face, FaceList, PointField, PointType >::points().
Referenced by booleanSurface::booleanSurface(), distributedTriSurfaceMesh::distribute(), and intersectedSurface::intersectedSurface().
Ostream& operator<< | ( | Ostream & | , |
const triSurface & | |||
) | [friend]
|