Go to the documentation of this file.
44 #ifndef isoSurfaceCell_H
45 #define isoSurfaceCell_H
47 #include "triSurface.H"
265 const bool checkDuplicates,
325 const bool regularise,
327 const scalar mergeTol = 1
e-6
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.
const Field< point > & points() const
Return reference to global points.
void calcCutTypes(const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues)
DynamicList< label > interpolatedPoints_
triSurface points that have weighted interpolation
A class for managing temporary objects.
const Field< point > & localPoints() const
Return pointField of points in patch.
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.
DynamicList< FixedList< label, 3 > > interpolatedOldPoints_
corresponding original, unmerged points
scalar isoFraction(const scalar s0, const scalar s1) const
Get location of iso value as fraction inbetween s0,s1.
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
A HashTable to objects of type <T> with a label key.
const labelListList & faceEdges() const
Return face-edge addressing.
Mesh consisting of general polyhedral cells.
A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons",...
TypeName("isoSurfaceCell")
Runtime type information.
static labelPair findCommonPoints(const labelledTri &, const labelledTri &)
const scalarField & pVals_
static bool danglingTriangle(const FixedList< label, 3 > &fEdges, const labelList &edgeFace1)
Is triangle (given by 3 edges) not fully connected?
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
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.
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.
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.
Triangulated surface description with patch information.
const labelList & meshCells() const
For every face original cell in mesh.
static bool validTri(const triSurface &, const label)
Check single triangle for (topological) validity.
triSurface stitchTriPoints(const bool checkDuplicates, const List< point > &triPoints, labelList &triPointReverseMap, labelList &triMap) const
label nCutCells_
Estimated number of cut cells.
void calcAddressing() const
Calculate addressing.
const scalarField & cVals_
DynamicList< FixedList< scalar, 3 > > interpolationWeights_
corresponding weights
const double e
Elementary charge.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
labelList triPointMergeMap_
For every unmerged triangle point the point in the triSurface.
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.
cellCutType calcCutType(const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues, const label) const
Determine whether cell is cut.
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.
const boundBox bounds_
Optional bounds.
const scalar iso_
isoSurfaceCell value
List< cellCutType > cellCutType_
Whether cell might be cut.
An ordered pair of two objects of type <T> with first() and second() elements.
A triangular face using a FixedList of labels corresponding to mesh vertices.
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
tmp< Field< Type > > interpolate(const Field< Type > &cCoords, const Field< Type > &pCoords) const
Interpolates cCoords,pCoords.
bool isTriCut(const triFace &tri, const scalarField &pointValues) const
Does any edge of triangle cross iso value?
pointIndexHit collapseSurface(const label cellI, pointField &localPoints, DynamicList< labelledTri, 64 > &localTris) const
const scalar mergeDistance_
When to merge points.
Triangle with additional region number.
A bounding box defined in terms of the points at its extremities.
static triSurface subsetMesh(const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints)
labelList meshCells_
For every triangle the original cell in mesh.
const polyMesh & mesh_
Reference to mesh.
static point calcCentre(const triSurface &)