A surface formed by the iso value. After "Regularised Marching Tetrahedra: improved iso-surface extraction", G.M. Treece, R.W. Prager and A.H. Gee. More...
Public Member Functions | |
TypeName ("isoSurface") | |
Runtime type information. More... | |
isoSurface (const volScalarField &cellIsoVals, const scalarField &pointIsoVals, const scalar iso, const bool regularise, const boundBox &bounds=boundBox::greatBox, const scalar mergeTol=1e-6) | |
Construct from cell values and point values. Uses boundaryField. More... | |
const labelList & | meshCells () const |
For every triangle the original cell in mesh. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &cCoords, const Field< Type > &pCoords) const |
Interpolates cCoords,pCoords. Uses the references to the original. More... | |
template<class Type > | |
Foam::tmp< Foam::SlicedGeometricField< Type, Foam::fvPatchField, Foam::slicedFvPatchField, Foam::volMesh > > | adaptPatchFields (const GeometricField< Type, fvPatchField, volMesh > &fld) const |
template<class Type > | |
Foam::label | generateFaceTriPoints (const volScalarField &cVals, const scalarField &pVals, const GeometricField< Type, fvPatchField, volMesh > &cCoords, const Field< Type > &pCoords, const DynamicList< Type > &snappedPoints, const labelList &snappedCc, const labelList &snappedPoint, const label faceI, const scalar neiVal, const Type &neiPt, const bool hasNeiSnap, const Type &neiSnapPt, DynamicList< Type > &triPoints, DynamicList< label > &triMeshCells) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolate (const label nPoints, const labelList &triPointMergeMap, const labelList &interpolatedPoints, const List< FixedList< label, 3 > > &interpolatedOldPoints, const List< FixedList< scalar, 3 > > &interpolationWeights, const DynamicList< Type > &unmergedValues) |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolate (const GeometricField< Type, fvPatchField, volMesh > &cCoords, const Field< Type > &pCoords) const |
![]() | |
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 geometricSurfacePatchList & | patches () const |
geometricSurfacePatchList & | patches () |
const labelListList & | sortedEdgeFaces () const |
Return edge-face addressing sorted (for edges with more than. More... | |
const labelList & | edgeOwner () 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 geometricSurfacePatchList & | patches () const |
geometricSurfacePatchList & | patches () |
const labelListList & | sortedEdgeFaces () const |
Return edge-face addressing sorted (for edges with more than. More... | |
const labelList & | edgeOwner () 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 &) |
![]() | |
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 edgeList & | edges () const |
Return list of edges, address into LOCAL point list. More... | |
const edgeList & | edges () 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 labelList & | boundaryPoints () const |
Return list of boundary points,. More... | |
const labelList & | boundaryPoints () const |
Return list of boundary points,. More... | |
const labelListList & | faceFaces () const |
Return face-face addressing. More... | |
const labelListList & | faceFaces () const |
Return face-face addressing. More... | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. More... | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. More... | |
const labelListList & | faceEdges () const |
Return face-edge addressing. More... | |
const labelListList & | faceEdges () const |
Return face-edge addressing. More... | |
const labelListList & | pointEdges () const |
Return point-edge addressing. More... | |
const labelListList & | pointEdges () const |
Return point-edge addressing. More... | |
const labelListList & | pointFaces () const |
Return point-face addressing. More... | |
const labelListList & | pointFaces () 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 labelList & | meshPoints () const |
Return labelList of mesh points in patch. More... | |
const labelList & | meshPoints () 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 labelList & | localPointOrder () const |
Return orders the local points for most efficient search. More... | |
const labelList & | localPointOrder () 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< objectHit > | projectPoints (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< objectHit > | projectPoints (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::objectHit > | projectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const |
List< objectHit > | projectFaceCentres (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< objectHit > | projectFaceCentres (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::objectHit > | projectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const |
const labelListList & | edgeLoops () const |
Return list of closed loops of boundary vertices. More... | |
const labelListList & | edgeLoops () 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... | |
![]() | |
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... | |
T & | newElmt (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 | |
bool | noTransform (const tensor &tt) const |
Does tensor differ (to within mergeTolerance) from identity. More... | |
PackedBoolList | collocatedFaces (const coupledPolyPatch &) const |
Per face whether is collocated. More... | |
void | syncUnseparatedPoints (pointField &collapsedPoint, const point &nullValue) const |
Synchonise points on all non-separated coupled patches. More... | |
scalar | isoFraction (const scalar s0, const scalar s1) const |
Get location of iso value as fraction inbetween s0,s1. More... | |
bool | isEdgeOfFaceCut (const scalarField &pVals, const face &f, const bool ownLower, const bool neiLower) const |
Check if any edge of a face is cut. More... | |
void | getNeighbour (const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const label cellI, const label faceI, scalar &nbrValue, point &nbrPoint) const |
void | calcCutTypes (const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const scalarField &pVals) |
Set faceCutType,cellCutType. More... | |
void | calcSnappedCc (const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const scalarField &pVals, DynamicList< point > &snappedPoints, labelList &snappedCc) const |
Determine per cc whether all near cuts can be snapped to single. More... | |
void | calcSnappedPoint (const PackedBoolList &isBoundaryPoint, const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const scalarField &pVals, DynamicList< point > &snappedPoints, labelList &snappedPoint) const |
Determine per point whether all near cuts can be snapped to single. More... | |
template<class Type > | |
tmp< SlicedGeometricField< Type, fvPatchField, slicedFvPatchField, volMesh > > | adaptPatchFields (const GeometricField< Type, fvPatchField, volMesh > &fld) const |
Return input field with coupled (and empty) patch values rewritten. More... | |
template<class Type > | |
Type | generatePoint (const scalar s0, const Type &p0, const bool hasSnap0, const Type &snapP0, const scalar s1, const Type &p1, const bool hasSnap1, const Type &snapP1) const |
Generate single point by interpolation or snapping. More... | |
template<class Type > | |
void | generateTriPoints (const scalar s0, const Type &p0, const bool hasSnap0, const Type &snapP0, const scalar s1, const Type &p1, const bool hasSnap1, const Type &snapP1, const scalar s2, const Type &p2, const bool hasSnap2, const Type &snapP2, const scalar s3, const Type &p3, const bool hasSnap3, const Type &snapP3, DynamicList< Type > &points) const |
template<class Type > | |
label | generateFaceTriPoints (const volScalarField &cVals, const scalarField &pVals, const GeometricField< Type, fvPatchField, volMesh > &cCoords, const Field< Type > &pCoords, const DynamicList< Type > &snappedPoints, const labelList &snappedCc, const labelList &snappedPoint, const label faceI, const scalar neiVal, const Type &neiPt, const bool hasNeiSnap, const Type &neiSnapPt, DynamicList< Type > &triPoints, DynamicList< label > &triMeshCells) const |
template<class Type > | |
void | generateTriPoints (const volScalarField &cVals, const scalarField &pVals, const GeometricField< Type, fvPatchField, volMesh > &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 |
Static Private Member Functions | |
static bool | collocatedPatch (const polyPatch &) |
Is patch a collocated (i.e. non-separated) coupled patch? More... | |
static point | calcCentre (const triSurface &) |
template<class Type > | |
static tmp< Field< Type > > | interpolate (const label nPoints, const labelList &triPointMergeMap, const labelList &interpolatedPoints, const List< FixedList< label, 3 > > &interpolatedOldPoints, const List< FixedList< scalar, 3 > > &interpolationWeights, const DynamicList< Type > &unmergedValues) |
static void | trimToPlanes (const PtrList< plane > &planes, const triPointRef &tri, DynamicList< point > &newTriPoints) |
Trim triangle to planes. More... | |
static void | trimToBox (const treeBoundBox &bb, DynamicList< point > &triPoints, DynamicList< label > &triMeshCells) |
Trim all triangles to box. More... | |
static void | trimToBox (const treeBoundBox &bb, DynamicList< point > &triPoints, DynamicList< label > &triMap, labelList &triPointMap, labelList &interpolatedPoints, List< FixedList< label, 3 > > &interpolatedOldPoints, List< FixedList< scalar, 3 > > &interpolationWeights) |
Trim all triangles to box. Determine interpolation. More... | |
static bool | validTri (const triSurface &, const label) |
Check single triangle for (topological) validity. More... | |
static triSurface | subsetMesh (const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints) |
Private Attributes | |
const fvMesh & | mesh_ |
Reference to mesh. More... | |
const scalarField & | pVals_ |
autoPtr< slicedVolScalarField > | cValsPtr_ |
Input volScalarField with separated coupled patches rewritten. More... | |
const scalar | iso_ |
Isosurface value. More... | |
const Switch | regularise_ |
Regularise? More... | |
const boundBox | bounds_ |
Optional bounds. More... | |
const scalar | mergeDistance_ |
When to merge points. More... | |
List< cellCutType > | faceCutType_ |
Whether face might be cut. More... | |
List< cellCutType > | cellCutType_ |
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< label > | interpolatedPoints_ |
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... | |
Friends | |
class | isoSurfaceCell |
Declare friendship with isoSurfaceCell to share some functionality. More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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< labelledTri > | FaceListType |
typedef List< labelledTri > | FaceListType |
typedef pointField | PointFieldType |
typedef pointField | PointFieldType |
![]() | |
typedef SubList< T > | subList |
Declare type of subList. More... | |
![]() | |
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 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 const List< T > & | null () |
Return a null List. More... | |
![]() | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
List< Face > & | storedFaces () |
Non-const access to the faces. More... | |
pointField & | storedPoints () |
Non-const access to global points. More... | |
List< Face > & | storedFaces () |
Non-const access to the faces. More... | |
![]() | |
void | size (const label) |
Override size to be inconsistent with allocated storage. More... | |
A surface formed by the iso value. After "Regularised Marching Tetrahedra: improved iso-surface extraction", G.M. Treece, R.W. Prager and A.H. Gee.
The handling on coupled patches is a bit complex. All fields (values and coordinates) get rewritten so
Now the triangle generation on non-separated processor patch faces can use the neighbouring value. Any separated processor face or cyclic face gets handled just like any boundary face.
Definition at line 85 of file isoSurface.H.
|
private |
Enumerator | |
---|---|
NEARFIRST | |
NEARSECOND | |
NOTNEAR |
Definition at line 91 of file isoSurface.H.
|
private |
Enumerator | |
---|---|
NOTCUT | |
SPHERE | |
CUT |
Definition at line 98 of file isoSurface.H.
isoSurface | ( | const volScalarField & | cellIsoVals, |
const scalarField & | pointIsoVals, | ||
const scalar | iso, | ||
const bool | regularise, | ||
const boundBox & | bounds = boundBox::greatBox , |
||
const scalar | mergeTol = 1e-6 |
||
) |
Construct from cell values and point values. Uses boundaryField.
for boundary values. Holds reference to cellIsoVals and pointIsoVals.
Definition at line 1414 of file isoSurface.C.
References polyPatch::coupled(), Foam::dimLength, Foam::endl(), f(), forAll, boundBox::greatBox, Foam::inplaceRenumber(), GeometricField::internalField(), Foam::max(), Foam::min(), Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, patches, polyPatch::patchSlice(), fileName::path(), Foam::Pout, PackedBoolList::set(), List::setSize(), List::size(), FixedList::size(), polyPatch::start(), List::transfer(), and triSurface::write().
|
private |
Does tensor differ (to within mergeTolerance) from identity.
Definition at line 70 of file isoSurface.C.
References Foam::mag(), isoSurface::mergeDistance_, Tensor::xx(), Tensor::xy(), Tensor::xz(), Tensor::yx(), Tensor::yy(), Tensor::yz(), Tensor::zx(), Tensor::zy(), and Tensor::zz().
|
staticprivate |
Is patch a collocated (i.e. non-separated) coupled patch?
Definition at line 86 of file isoSurface.C.
References coupledPolyPatch::parallel(), and coupledPolyPatch::separated().
|
private |
Per face whether is collocated.
Definition at line 95 of file isoSurface.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and forAll.
|
private |
Synchonise points on all non-separated coupled patches.
Definition at line 133 of file isoSurface.C.
References UPstream::blocking, cyclicPolyPatch::coupledPoints(), Foam::e, forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), cyclicPolyPatch::neighbPatch(), processorPolyPatch::neighbPoints(), processorPolyPatch::neighbProcNo(), globalMeshData::nGlobalPoints(), nPoints, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), cyclicPolyPatch::owner(), UPstream::parRun(), patches, globalMeshData::sharedPointAddr(), globalMeshData::sharedPointLabels(), and List::size().
|
private |
Get location of iso value as fraction inbetween s0,s1.
Definition at line 281 of file isoSurface.C.
References Foam::mag().
|
private |
Check if any edge of a face is cut.
Definition at line 300 of file isoSurface.C.
|
private |
Definition at line 326 of file isoSurface.C.
References GeometricField::boundaryField(), polyPatch::boundaryMesh(), and polyPatch::start().
|
private |
Set faceCutType,cellCutType.
Definition at line 360 of file isoSurface.C.
References Foam::endl(), f(), forAll, patches, Foam::Pout, List::setSize(), and polyPatch::start().
|
staticprivate |
Definition at line 499 of file isoSurface.C.
References forAll, s(), Foam::sum(), and Vector< scalar >::zero.
|
private |
Determine per cc whether all near cuts can be snapped to single.
point.
Definition at line 514 of file isoSurface.C.
References DynamicList::append(), DynamicList::clear(), f(), forAll, triSurface::markZones(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), points, s(), List::setSize(), Foam::sum(), and Vector< scalar >::zero.
|
private |
Determine per point whether all near cuts can be snapped to single.
point.
Definition at line 681 of file isoSurface.C.
References DynamicList::append(), DynamicList::clear(), f(), Foam::findIndex(), forAll, PackedList::get(), triSurface::markZones(), Vector< scalar >::max, PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), pFaces, points, s(), List::setSize(), Foam::sum(), and Vector< scalar >::zero.
|
private |
Return input field with coupled (and empty) patch values rewritten.
|
private |
Generate single point by interpolation or snapping.
Definition at line 152 of file isoSurfaceTemplates.C.
References Foam::mag(), and s().
|
private |
Definition at line 196 of file isoSurfaceTemplates.C.
References points, and Foam::Swap().
|
private |
|
private |
Definition at line 516 of file isoSurfaceTemplates.C.
References Foam::abort(), GeometricField::boundaryField(), DynamicList::clear(), polyPatch::coupled(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, patches, DynamicList::shrink(), List::size(), and polyPatch::start().
|
staticprivate |
|
private |
Definition at line 877 of file isoSurface.C.
References Foam::abort(), DynamicList::append(), triFace::centre(), Foam::endl(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::invertManyToMany(), Foam::mergePoints(), pFaces, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, List::setSize(), List::size(), FixedList::size(), and List::transfer().
|
staticprivate |
Trim triangle to planes.
Definition at line 1055 of file isoSurface.C.
References triangle::a(), DynamicList::append(), triangle::b(), triangle::c(), forAll, and storeOp::tris_.
|
staticprivate |
Trim all triangles to box.
Definition at line 1128 of file isoSurface.C.
References DynamicList::append(), Foam::endl(), f(), treeBoundBox::faceNormals, treeBoundBox::faces, forAll, n, Foam::Pout, PtrList::set(), DynamicList::setCapacity(), FixedList::size(), and FixedList::transfer().
Referenced by isoSurfaceCell::isoSurfaceCell().
|
staticprivate |
Trim all triangles to box. Determine interpolation.
for existing and new points
Definition at line 1188 of file isoSurface.C.
References DynamicList::append(), triangle::barycentric(), forAll, List::setSize(), List::size(), FixedList::size(), and List::transfer().
|
staticprivate |
Check single triangle for (topological) validity.
Definition at line 1269 of file isoSurface.C.
References triFace::centre(), Foam::endl(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and WarningInFunction.
|
staticprivate |
Definition at line 1340 of file isoSurface.C.
References forAll, s(), List::setSize(), and List::size().
TypeName | ( | "isoSurface" | ) |
Runtime type information.
|
inline |
For every triangle the original cell in mesh.
Definition at line 414 of file isoSurface.H.
References isoSurface::meshCells_.
tmp<Field<Type> > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | cCoords, |
const Field< Type > & | pCoords | ||
) | const |
Interpolates cCoords,pCoords. Uses the references to the original.
fields used to create the iso surface.
Foam::tmp<Foam::SlicedGeometricField< Type, Foam::fvPatchField, Foam::slicedFvPatchField, Foam::volMesh> > adaptPatchFields | ( | const GeometricField< Type, fvPatchField, volMesh > & | fld | ) | const |
Definition at line 44 of file isoSurfaceTemplates.C.
References f(), fld(), forAll, mesh, patches, fvPatchField::patchInternalField(), fvPatchField::patchNeighbourField(), UList::size(), and w().
Foam::label generateFaceTriPoints | ( | const volScalarField & | cVals, |
const scalarField & | pVals, | ||
const GeometricField< Type, fvPatchField, volMesh > & | cCoords, | ||
const Field< Type > & | pCoords, | ||
const DynamicList< Type > & | snappedPoints, | ||
const labelList & | snappedCc, | ||
const labelList & | snappedPoint, | ||
const label | faceI, | ||
const scalar | neiVal, | ||
const Type & | neiPt, | ||
const bool | hasNeiSnap, | ||
const Type & | neiSnapPt, | ||
DynamicList< Type > & | triPoints, | ||
DynamicList< label > & | triMeshCells | ||
) | const |
Definition at line 433 of file isoSurfaceTemplates.C.
References DynamicList::append(), f(), forAll, and FixedList::size().
Foam::tmp<Foam::Field<Type> > interpolate | ( | const label | nPoints, |
const labelList & | triPointMergeMap, | ||
const labelList & | interpolatedPoints, | ||
const List< FixedList< label, 3 > > & | interpolatedOldPoints, | ||
const List< FixedList< scalar, 3 > > & | interpolationWeights, | ||
const DynamicList< Type > & | unmergedValues | ||
) |
Definition at line 745 of file isoSurfaceTemplates.C.
References forAll, nPoints, and w().
Foam::tmp<Foam::Field<Type> > interpolate | ( | const GeometricField< Type, fvPatchField, volMesh > & | cCoords, |
const Field< Type > & | pCoords | ||
) | const |
Definition at line 808 of file isoSurfaceTemplates.C.
References Foam::constant::physicoChemical::c2, Foam::MULES::interpolate(), and points.
|
friend |
Declare friendship with isoSurfaceCell to share some functionality.
Definition at line 388 of file isoSurface.H.
|
private |
Reference to mesh.
Definition at line 107 of file isoSurface.H.
|
private |
Definition at line 109 of file isoSurface.H.
|
private |
Input volScalarField with separated coupled patches rewritten.
Definition at line 112 of file isoSurface.H.
|
private |
Isosurface value.
Definition at line 115 of file isoSurface.H.
|
private |
Regularise?
Definition at line 118 of file isoSurface.H.
|
private |
Optional bounds.
Definition at line 121 of file isoSurface.H.
|
private |
When to merge points.
Definition at line 124 of file isoSurface.H.
Referenced by isoSurface::noTransform().
|
private |
Whether face might be cut.
Definition at line 127 of file isoSurface.H.
|
private |
Whether cell might be cut.
Definition at line 130 of file isoSurface.H.
|
private |
Estimated number of cut cells.
Definition at line 133 of file isoSurface.H.
|
private |
For every triangle the original cell in mesh.
Definition at line 136 of file isoSurface.H.
Referenced by isoSurface::meshCells().
|
private |
For every unmerged triangle point the point in the triSurface.
Definition at line 139 of file isoSurface.H.
|
private |
triSurface points that have weighted interpolation
Definition at line 142 of file isoSurface.H.
|
private |
corresponding original, unmerged points
Definition at line 145 of file isoSurface.H.
|
private |
corresponding weights
Definition at line 148 of file isoSurface.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.