Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
isoSurfaceCell Class Reference

A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons", Paul Bourke (http://paulbourke.net/geometry/polygonise) and "Regularised Marching Tetrahedra: improved iso-surface extraction", G.M. Treece, R.W. Prager and A.H. Gee. More...

Inheritance diagram for isoSurfaceCell:
Inheritance graph
[legend]
Collaboration diagram for isoSurfaceCell:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("isoSurfaceCell")
 Runtime type information. More...
 
 isoSurfaceCell (const polyMesh &mesh, const scalarField &cellValues, const scalarField &pointValues, const scalar iso, const bool regularise, const boundBox &bounds=boundBox::greatBox, const scalar mergeTol=1e-6)
 Construct from dictionary. More...
 
const labelListmeshCells () const
 For every face original cell in mesh. More...
 
template<class Type >
tmp< Field< Type > > interpolate (const Field< Type > &cCoords, const Field< Type > &pCoords) const
 Interpolates cCoords,pCoords. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > interpolate (const Field< Type > &cCoords, const Field< Type > &pCoords) const
 
- Public Member Functions inherited from triSurface
 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 
void clearOut ()
 Clear all data. More...
 
void clearTopology ()
 Clear topology. More...
 
void clearPatchMeshAddr ()
 Clear patch addressing. More...
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar &)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose=false)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose=false)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose=false)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
 ClassName ("triSurface")
 Runtime type information. More...
 
 triSurface ()
 Construct null. More...
 
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points. More...
 
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage. More...
 
 triSurface (const Xfer< List< labelledTri > > &, const geometricSurfacePatchList &, const Xfer< List< point > > &)
 Construct from triangles, patches, points. More...
 
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default. More...
 
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default. More...
 
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type) More...
 
 triSurface (Istream &)
 Construct from Istream. More...
 
 triSurface (const Time &d)
 Construct from objectRegistry. More...
 
 triSurface (const triSurface &)
 Construct as copy. More...
 
 ~triSurface ()
 Destructor. More...
 
void clearOut ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
const geometricSurfacePatchListpatches () const
 
geometricSurfacePatchListpatches ()
 
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than. More...
 
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge. More...
 
virtual void movePoints (const pointField &)
 Move points. More...
 
virtual void scalePoints (const scalar)
 Scale points. A non-positive factor is ignored. More...
 
void checkTriangles (const bool verbose)
 Check/remove duplicate/degenerate triangles. More...
 
void checkEdges (const bool verbose)
 Check triply (or more) connected edges. More...
 
void cleanup (const bool verbose)
 Remove non-valid triangles. More...
 
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable. More...
 
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area More...
 
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which More...
 
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from. More...
 
void write (Ostream &) const
 Write to Ostream in simple FOAM format. More...
 
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension. More...
 
void write (const Time &) const
 Write to database. More...
 
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format. More...
 
void writeDX (const vectorField &, Ostream &) const
 
void writeStats (Ostream &) const
 Write some statistics. More...
 
void operator= (const triSurface &)
 
- Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
 PrimitivePatch (const List< labelledTri > &faces, const Field< point > &points)
 Construct from components. More...
 
 PrimitivePatch (const Xfer< List< labelledTri > > &faces, const Xfer< List< point > > &points)
 Construct from components. More...
 
 PrimitivePatch (List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Construct as copy. More...
 
virtual ~PrimitivePatch ()
 
virtual ~PrimitivePatch ()
 Destructor. More...
 
void clearOut ()
 
void clearOut ()
 
void clearGeom ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void clearPatchMeshAddr ()
 
const Field< point > & points () const
 Return reference to global points. More...
 
const Field< point > & points () const
 Return reference to global points. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nPoints () const
 Return number of points supporting patch faces. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
label nEdges () const
 Return number of edges in patch. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
bool isInternalEdge (const label edgeI) const
 Is internal edge? More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListboundaryPoints () const
 Return list of boundary points,. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. More...
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. They are constructed. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const Field< point > & localPoints () const
 Return pointField of points in patch. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point index. More...
 
label whichEdge (const edge &e) const
 Given an edge in local point labels, return its index. More...
 
label whichEdge (const edge &) const
 Given an edge in local point labels, return its. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using. More...
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceCentres () const
 Return face centres for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & faceNormals () const
 Return face normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
const Field< point > & pointNormals () const
 Return point normals for patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch. More...
 
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
void writeVTK (const fileName &name) const
 Write VTK patch. More...
 
void writeVTKNormals (const fileName &name) const
 Write VTK patch normals. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
virtual void movePoints (const Field< point > &)
 Correct patch after moving points. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
void operator= (const PrimitivePatch< labelledTri, List, pointField, point > &)
 Assignment. More...
 
- Public Member Functions inherited from List< labelledTri >
label size () const
 Return the number of elements in the UList. More...
 
 List ()
 Null constructor. More...
 
 List (const label)
 Construct with given size. More...
 
 List (const label, const T &)
 Construct with given size and value for all elements. More...
 
 List (const List< T > &)
 Copy constructor. More...
 
 List (const Xfer< List< T > > &)
 Construct by transferring the parameter contents. More...
 
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 List (const UList< T > &, const labelUList &mapAddressing)
 Construct as subset. More...
 
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators. More...
 
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size> More...
 
 List (const PtrList< T > &)
 Construct as copy of PtrList<T> More...
 
 List (const SLList< T > &)
 Construct as copy of SLList<T> More...
 
 List (const UIndirectList< T > &)
 Construct as copy of UIndirectList<T> More...
 
 List (const BiIndirectList< T > &)
 Construct as copy of BiIndirectList<T> More...
 
 List (Istream &)
 Construct from Istream. More...
 
 List (const label s)
 
 List (const label s, const T &a)
 
 List (const List< T > &a)
 
 List (const Xfer< List< T > > &lst)
 
 List (List< T > &a, bool reUse)
 
 List (const UList< T > &a, const labelUList &map)
 
 List (const PtrList< T > &lst)
 
 List (const SLList< T > &lst)
 
 List (const UIndirectList< T > &lst)
 
 List (const BiIndirectList< T > &lst)
 
 List ()
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 Clone. More...
 
 ~List ()
 Destructor. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void resize (const label, const T &)
 Alias for setSize(const label, const T&) More...
 
void setSize (const label)
 Reset size of List. More...
 
void setSize (const label, const T &)
 Reset size of List and value for new elements. More...
 
void clear ()
 Clear the list, i.e. set size to zero. More...
 
void append (const T &)
 Append an element at the end of the list. More...
 
void append (const UList< T > &)
 Append a List at the end of this list. More...
 
void append (const UIndirectList< T > &)
 Append a UIndirectList at the end of this list. More...
 
void transfer (List< T > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (SortableList< T > &)
 Transfer the contents of the argument List into this list. More...
 
void transfer (List< T > &a)
 
void transfer (SortableList< T > &a)
 
Xfer< List< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
TnewElmt (const label)
 Return subscript-checked element of UList. More...
 
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const List< T > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const UIndirectList< T > &)
 Assignment from UIndirectList operator. Takes linear time. More...
 
void operator= (const BiIndirectList< T > &)
 Assignment from BiIndirectList operator. Takes linear time. More...
 
void operator= (const T &)
 Assignment of all entries to the given value. More...
 

Private Types

enum  segmentCutType { NEARFIRST, NEARSECOND, NOTNEAR }
 
enum  cellCutType { NOTCUT, SPHERE, CUT }
 

Private Member Functions

scalar isoFraction (const scalar s0, const scalar s1) const
 Get location of iso value as fraction inbetween s0,s1. More...
 
bool isTriCut (const triFace &tri, const scalarField &pointValues) const
 Does any edge of triangle cross iso value? More...
 
cellCutType calcCutType (const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues, const label) const
 Determine whether cell is cut. More...
 
void calcCutTypes (const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues)
 
pointIndexHit collapseSurface (const label cellI, pointField &localPoints, DynamicList< labelledTri, 64 > &localTris) const
 
void calcSnappedCc (const PackedBoolList &isTet, const scalarField &cVals, const scalarField &pVals, DynamicList< point > &triPoints, labelList &snappedCc) const
 Determine per cc whether all near cuts can be snapped to single. More...
 
void genPointTris (const scalarField &cellValues, const scalarField &pointValues, const label pointI, const label faceI, const label cellI, DynamicList< point, 64 > &localTriPoints) const
 Generate triangles for face connected to pointI. More...
 
void genPointTris (const scalarField &pointValues, const label pointI, const label faceI, const label cellI, DynamicList< point, 64 > &localTriPoints) const
 Generate triangles for tet connected to pointI. More...
 
void calcSnappedPoint (const PackedBoolList &isTet, const scalarField &cVals, const scalarField &pVals, DynamicList< point > &triPoints, labelList &snappedPoint) const
 Determine per point whether all near cuts can be snapped to single. More...
 
template<class Type >
Type generatePoint (const DynamicList< Type > &snappedPoints, const scalar s0, const Type &p0, const label p0Index, const scalar s1, const Type &p1, const label p1Index) const
 Generate single point by interpolation or snapping. More...
 
template<class Type >
void generateTriPoints (const DynamicList< Type > &snapped, const scalar s0, const Type &p0, const label p0Index, const scalar s1, const Type &p1, const label p1Index, const scalar s2, const Type &p2, const label p2Index, const scalar s3, const Type &p3, const label p3Index, DynamicList< Type > &points) const
 
template<class Type >
void generateTriPoints (const scalarField &cVals, const scalarField &pVals, const Field< Type > &cCoords, const Field< Type > &pCoords, const DynamicList< Type > &snappedPoints, const labelList &snappedCc, const labelList &snappedPoint, DynamicList< Type > &triPoints, DynamicList< label > &triMeshCells) const
 
triSurface stitchTriPoints (const bool checkDuplicates, const List< point > &triPoints, labelList &triPointReverseMap, labelList &triMap) const
 
void calcAddressing (const triSurface &surf, List< FixedList< label, 3 > > &faceEdges, labelList &edgeFace0, labelList &edgeFace1, Map< labelList > &edgeFacesRest) const
 Determine edge-face addressing. More...
 

Static Private Member Functions

static labelPair findCommonPoints (const labelledTri &, const labelledTri &)
 
static point calcCentre (const triSurface &)
 
static bool validTri (const triSurface &, const label)
 Check single triangle for (topological) validity. More...
 
static bool danglingTriangle (const FixedList< label, 3 > &fEdges, const labelList &edgeFace1)
 Is triangle (given by 3 edges) not fully connected? More...
 
static label markDanglingTriangles (const List< FixedList< label, 3 > > &faceEdges, const labelList &edgeFace0, const labelList &edgeFace1, const Map< labelList > &edgeFacesRest, boolList &keepTriangles)
 Mark all non-fully connected triangles. More...
 
static triSurface subsetMesh (const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints)
 

Private Attributes

const polyMeshmesh_
 Reference to mesh. More...
 
const scalarFieldcVals_
 
const scalarFieldpVals_
 
const scalar iso_
 isoSurfaceCell value More...
 
const boundBox bounds_
 Optional bounds. More...
 
const scalar mergeDistance_
 When to merge points. More...
 
List< cellCutTypecellCutType_
 Whether cell might be cut. More...
 
label nCutCells_
 Estimated number of cut cells. More...
 
labelList meshCells_
 For every triangle the original cell in mesh. More...
 
labelList triPointMergeMap_
 For every unmerged triangle point the point in the triSurface. More...
 
DynamicList< labelinterpolatedPoints_
 triSurface points that have weighted interpolation More...
 
DynamicList< FixedList< label, 3 > > interpolatedOldPoints_
 corresponding original, unmerged points More...
 
DynamicList< FixedList< scalar, 3 > > interpolationWeights_
 corresponding weights More...
 

Additional Inherited Members

- Public Types inherited from triSurface
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh. More...
 
- Public Types inherited from PrimitivePatch< labelledTri, List, pointField, point >
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
 
typedef labelledTri FaceType
 
typedef labelledTri FaceType
 
typedef List< labelledTriFaceListType
 
typedef List< labelledTriFaceListType
 
typedef pointField PointFieldType
 
typedef pointField PointFieldType
 
- Public Types inherited from List< labelledTri >
typedef SubList< TsubList
 Declare type of subList. More...
 
- Static Public Member Functions inherited from triSurface
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use. More...
 
- Static Public Member Functions inherited from PrimitivePatch< labelledTri, List, pointField, point >
static void writeVTK (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch, HJ, 14/Jan/2009. More...
 
static void writeVTKNormals (const fileName &name, const FaceListType &faces, const Field< point > &points)
 Write generic VTK patch normals, HJ, 14/Jan/2009. More...
 
- Static Public Member Functions inherited from List< labelledTri >
static const List< T > & null ()
 Return a null List. More...
 
- Protected Member Functions inherited from triSurface
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
pointFieldstoredPoints ()
 Non-const access to global points. More...
 
List< Face > & storedFaces ()
 Non-const access to the faces. More...
 
- Protected Member Functions inherited from List< labelledTri >
void size (const label)
 Override size to be inconsistent with allocated storage. More...
 

Detailed Description

A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons", Paul Bourke (http://paulbourke.net/geometry/polygonise) and "Regularised Marching Tetrahedra: improved iso-surface extraction", G.M. Treece, R.W. Prager and A.H. Gee.

See isoSurface. This is a variant which does tetrahedrisation from triangulation of face to cell centre instead of edge of face to two neighbouring cell centres. This gives much lower quality triangles but they are local to a cell.

Source files

Definition at line 64 of file isoSurfaceCell.H.

Member Enumeration Documentation

◆ segmentCutType

enum segmentCutType
private
Enumerator
NEARFIRST 
NEARSECOND 
NOTNEAR 

Definition at line 70 of file isoSurfaceCell.H.

◆ cellCutType

enum cellCutType
private
Enumerator
NOTCUT 
SPHERE 
CUT 

Definition at line 77 of file isoSurfaceCell.H.

Constructor & Destructor Documentation

◆ isoSurfaceCell()

isoSurfaceCell ( const polyMesh mesh,
const scalarField cellValues,
const scalarField pointValues,
const scalar  iso,
const bool  regularise,
const boundBox bounds = boundBox::greatBox,
const scalar  mergeTol = 1e-6 
)

Member Function Documentation

◆ isoFraction()

Foam::scalar isoFraction ( const scalar  s0,
const scalar  s1 
) const
private

Get location of iso value as fraction inbetween s0,s1.

Definition at line 48 of file isoSurfaceCell.C.

References Foam::mag().

Here is the call graph for this function:

◆ isTriCut()

bool isTriCut ( const triFace tri,
const scalarField pointValues 
) const
private

Does any edge of triangle cross iso value?

Definition at line 67 of file isoSurfaceCell.C.

◆ calcCutType()

Foam::isoSurfaceCell::cellCutType calcCutType ( const PackedBoolList isTet,
const scalarField cellValues,
const scalarField pointValues,
const label  cellI 
) const
private

Determine whether cell is cut.

Definition at line 81 of file isoSurfaceCell.C.

References f(), forAll, PackedList::get(), List::size(), and triFace().

Here is the call graph for this function:

◆ calcCutTypes()

void calcCutTypes ( const PackedBoolList isTet,
const scalarField cellValues,
const scalarField pointValues 
)
private

Definition at line 192 of file isoSurfaceCell.C.

References Foam::endl(), forAll, and Foam::Pout.

Here is the call graph for this function:

◆ findCommonPoints()

Foam::labelPair findCommonPoints ( const labelledTri tri0,
const labelledTri tri1 
)
staticprivate

Definition at line 221 of file isoSurfaceCell.C.

References FixedList::fcIndex(), Foam::findIndex(), and FixedList::rcIndex().

Here is the call graph for this function:

◆ calcCentre()

Foam::point calcCentre ( const triSurface s)
staticprivate

Definition at line 257 of file isoSurfaceCell.C.

References forAll, s(), Foam::sum(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ collapseSurface()

Foam::pointIndexHit collapseSurface ( const label  cellI,
pointField localPoints,
DynamicList< labelledTri, 64 > &  localTris 
) const
private

◆ calcSnappedCc()

void calcSnappedCc ( const PackedBoolList isTet,
const scalarField cVals,
const scalarField pVals,
DynamicList< point > &  triPoints,
labelList snappedCc 
) const
private

Determine per cc whether all near cuts can be snapped to single.

point.

Definition at line 365 of file isoSurfaceCell.C.

References DynamicList::append(), DynamicList::clear(), f(), forAll, PackedList::get(), PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), s(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ genPointTris() [1/2]

void genPointTris ( const scalarField cellValues,
const scalarField pointValues,
const label  pointI,
const label  faceI,
const label  cellI,
DynamicList< point, 64 > &  localTriPoints 
) const
private

Generate triangles for face connected to pointI.

Definition at line 540 of file isoSurfaceCell.C.

References DynamicList::append(), Foam::constant::physicoChemical::b, Foam::constant::universal::c, f(), FixedList::fcIndex(), Foam::findIndex(), FixedList::rcIndex(), s(), and List::size().

Here is the call graph for this function:

◆ genPointTris() [2/2]

void genPointTris ( const scalarField pointValues,
const label  pointI,
const label  faceI,
const label  cellI,
DynamicList< point, 64 > &  localTriPoints 
) const
private

Generate triangles for tet connected to pointI.

Definition at line 613 of file isoSurfaceCell.C.

References DynamicList::append(), Foam::constant::physicoChemical::b, Foam::constant::universal::c, f(), f1, Foam::findIndex(), forAll, and s().

Here is the call graph for this function:

◆ calcSnappedPoint()

void calcSnappedPoint ( const PackedBoolList isTet,
const scalarField cVals,
const scalarField pVals,
DynamicList< point > &  triPoints,
labelList snappedPoint 
) const
private

◆ generatePoint()

Type generatePoint ( const DynamicList< Type > &  snappedPoints,
const scalar  s0,
const Type &  p0,
const label  p0Index,
const scalar  s1,
const Type &  p1,
const label  p1Index 
) const
private

Generate single point by interpolation or snapping.

Definition at line 35 of file isoSurfaceCellTemplates.C.

References Foam::mag(), and s().

Here is the call graph for this function:

◆ generateTriPoints() [1/2]

void generateTriPoints ( const DynamicList< Type > &  snapped,
const scalar  s0,
const Type &  p0,
const label  p0Index,
const scalar  s1,
const Type &  p1,
const label  p1Index,
const scalar  s2,
const Type &  p2,
const label  p2Index,
const scalar  s3,
const Type &  p3,
const label  p3Index,
DynamicList< Type > &  points 
) const
private

Definition at line 77 of file isoSurfaceCellTemplates.C.

References DynamicList::append(), and Foam::Swap().

Here is the call graph for this function:

◆ generateTriPoints() [2/2]

void generateTriPoints ( const scalarField cVals,
const scalarField pVals,
const Field< Type > &  cCoords,
const Field< Type > &  pCoords,
const DynamicList< Type > &  snappedPoints,
const labelList snappedCc,
const labelList snappedPoint,
DynamicList< Type > &  triPoints,
DynamicList< label > &  triMeshCells 
) const
private

Definition at line 323 of file isoSurfaceCellTemplates.C.

References DynamicList::append(), Foam::endl(), f(), f1, Foam::findIndex(), forAll, tetMatcher::isA(), DynamicList::shrink(), FixedList::size(), and WarningInFunction.

Here is the call graph for this function:

◆ stitchTriPoints()

Foam::triSurface stitchTriPoints ( const bool  checkDuplicates,
const List< point > &  triPoints,
labelList triPointReverseMap,
labelList triMap 
) const
private

◆ validTri()

bool validTri ( const triSurface surf,
const label  faceI 
)
staticprivate

Check single triangle for (topological) validity.

Definition at line 1060 of file isoSurfaceCell.C.

References Foam::endl(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and WarningInFunction.

Here is the call graph for this function:

◆ calcAddressing()

void calcAddressing ( const triSurface surf,
List< FixedList< label, 3 > > &  faceEdges,
labelList edgeFace0,
labelList edgeFace1,
Map< labelList > &  edgeFacesRest 
) const
private

Determine edge-face addressing.

Definition at line 1128 of file isoSurfaceCell.C.

References Foam::endl(), forAll, Foam::mergePoints(), points, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, List::setSize(), and List::size().

Here is the call graph for this function:

◆ danglingTriangle()

bool danglingTriangle ( const FixedList< label, 3 > &  fEdges,
const labelList edgeFace1 
)
staticprivate

Is triangle (given by 3 edges) not fully connected?

Definition at line 1230 of file isoSurfaceCell.C.

References forAll.

◆ markDanglingTriangles()

Foam::label markDanglingTriangles ( const List< FixedList< label, 3 > > &  faceEdges,
const labelList edgeFace0,
const labelList edgeFace1,
const Map< labelList > &  edgeFacesRest,
boolList keepTriangles 
)
staticprivate

Mark all non-fully connected triangles.

Definition at line 1257 of file isoSurfaceCell.C.

References forAll, forAllConstIter(), and List::setSize().

Here is the call graph for this function:

◆ subsetMesh()

Foam::triSurface subsetMesh ( const triSurface s,
const labelList newToOldFaces,
labelList oldToNewPoints,
labelList newToOldPoints 
)
staticprivate

Definition at line 1305 of file isoSurfaceCell.C.

References f(), forAll, s(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "isoSurfaceCell"  )

Runtime type information.

◆ meshCells()

const labelList& meshCells ( ) const
inline

For every face original cell in mesh.

Definition at line 333 of file isoSurfaceCell.H.

References isoSurfaceCell::meshCells_.

Referenced by sampledIsoSurfaceCell::updateGeometry().

Here is the caller graph for this function:

◆ interpolate() [1/2]

tmp<Field<Type> > interpolate ( const Field< Type > &  cCoords,
const Field< Type > &  pCoords 
) const

Interpolates cCoords,pCoords.

◆ interpolate() [2/2]

Foam::tmp<Foam::Field<Type> > interpolate ( const Field< Type > &  cCoords,
const Field< Type > &  pCoords 
) const

Definition at line 528 of file isoSurfaceCellTemplates.C.

References Foam::MULES::interpolate(), and points.

Here is the call graph for this function:

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Reference to mesh.

Definition at line 86 of file isoSurfaceCell.H.

◆ cVals_

const scalarField& cVals_
private

Definition at line 88 of file isoSurfaceCell.H.

◆ pVals_

const scalarField& pVals_
private

Definition at line 90 of file isoSurfaceCell.H.

◆ iso_

const scalar iso_
private

isoSurfaceCell value

Definition at line 93 of file isoSurfaceCell.H.

◆ bounds_

const boundBox bounds_
private

Optional bounds.

Definition at line 96 of file isoSurfaceCell.H.

◆ mergeDistance_

const scalar mergeDistance_
private

When to merge points.

Definition at line 99 of file isoSurfaceCell.H.

◆ cellCutType_

List<cellCutType> cellCutType_
private

Whether cell might be cut.

Definition at line 102 of file isoSurfaceCell.H.

◆ nCutCells_

label nCutCells_
private

Estimated number of cut cells.

Definition at line 105 of file isoSurfaceCell.H.

◆ meshCells_

labelList meshCells_
private

For every triangle the original cell in mesh.

Definition at line 108 of file isoSurfaceCell.H.

Referenced by isoSurfaceCell::meshCells().

◆ triPointMergeMap_

labelList triPointMergeMap_
private

For every unmerged triangle point the point in the triSurface.

Definition at line 111 of file isoSurfaceCell.H.

◆ interpolatedPoints_

DynamicList<label> interpolatedPoints_
private

triSurface points that have weighted interpolation

Definition at line 114 of file isoSurfaceCell.H.

◆ interpolatedOldPoints_

DynamicList<FixedList<label, 3> > interpolatedOldPoints_
private

corresponding original, unmerged points

Definition at line 117 of file isoSurfaceCell.H.

◆ interpolationWeights_

DynamicList<FixedList<scalar, 3> > interpolationWeights_
private

corresponding weights

Definition at line 120 of file isoSurfaceCell.H.


The documentation for this class was generated from the following files: