Go to the documentation of this file.
66 #include "triSurface.H"
169 const point& nullValue
303 const bool hasNeiSnap,
304 const Type& neiSnapPt,
340 const bool checkDuplicates,
406 const bool regularise,
408 const scalar mergeTol = 1
e-6
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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.
const scalarField & pVals_
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
PackedBoolList collocatedFaces(const coupledPolyPatch &) const
Per face whether is collocated.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
const Field< point > & points() const
Return reference to global points.
TypeName("isoSurface")
Runtime type information.
DynamicList< label > interpolatedPoints_
triSurface points that have weighted interpolation
static bool collocatedPatch(const polyPatch &)
Is patch a collocated (i.e. non-separated) coupled patch?
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
static point calcCentre(const triSurface &)
scalar isoFraction(const scalar s0, const scalar s1) const
Get location of iso value as fraction inbetween s0,s1.
Standard boundBox + extra functionality for use in octree.
triSurface stitchTriPoints(const bool checkDuplicates, const List< point > &triPoints, labelList &triPointReverseMap, labelList &triMap) const
const fvMesh & mesh_
Reference to mesh.
The boundaryRegion persistent data saved as a Map<dictionary>.
const scalar iso_
Isosurface value.
tmp< SlicedGeometricField< Type, fvPatchField, slicedFvPatchField, volMesh > > adaptPatchFields(const GeometricField< Type, fvPatchField, volMesh > &fld) const
Return input field with coupled (and empty) patch values rewritten.
label nCutCells_
Estimated number of cut cells.
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.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
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
const scalar mergeDistance_
When to merge points.
A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons",...
List< cellCutType > faceCutType_
Whether face might be cut.
A triangle primitive used to calculate face normals and swept volumes.
const labelList & meshCells() const
For every triangle the original cell in mesh.
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
void calcCutTypes(const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const scalarField &pVals)
Set faceCutType,cellCutType.
labelList triPointMergeMap_
For every unmerged triangle point the point in the triSurface.
A surface formed by the iso value. After "Regularised Marching Tetrahedra: improved iso-surface extra...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void getNeighbour(const labelList &boundaryRegion, const volVectorField &meshC, const volScalarField &cVals, const label cellI, const label faceI, scalar &nbrValue, point &nbrPoint) const
Pre-declare SubField and related Field type.
Triangulated surface description with patch information.
A patch is a list of labels that address the faces in the global face list.
const Switch regularise_
Regularise?
static triSurface subsetMesh(const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label nPoints() const
Return number of points supporting patch faces.
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)
Abstract base class for interpolating in 1D.
static void trimToBox(const treeBoundBox &bb, DynamicList< point > &triPoints, DynamicList< label > &triMeshCells)
Trim all triangles to box.
List< cellCutType > cellCutType_
Whether cell might be cut.
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){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const boundBox bounds_
Optional bounds.
Mesh data needed to do the Finite Volume discretisation.
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))
Specialization of fvPatchField which creates the underlying fvPatchField as a slice of the given comp...
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
autoPtr< slicedVolScalarField > cValsPtr_
Input volScalarField with separated coupled patches rewritten.
DynamicList< FixedList< scalar, 3 > > interpolationWeights_
corresponding weights
labelList meshCells_
For every triangle the original cell in mesh.
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
static void trimToPlanes(const PtrList< plane > &planes, const triPointRef &tri, DynamicList< point > &newTriPoints)
Trim triangle to planes.
bool noTransform(const tensor &tt) const
Does tensor differ (to within mergeTolerance) from identity.
A bounding box defined in terms of the points at its extremities.
DynamicList< FixedList< label, 3 > > interpolatedOldPoints_
corresponding original, unmerged points
Specialization of GeometricField which holds slices of given complete fields in a form that they act ...
A face is a list of labels corresponding to mesh vertices.
static bool validTri(const triSurface &, const label)
Check single triangle for (topological) validity.
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
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.
void syncUnseparatedPoints(pointField &collapsedPoint, const point &nullValue) const
Synchonise points on all non-separated coupled patches.
Generic GeometricField class.
bool isEdgeOfFaceCut(const scalarField &pVals, const face &f, const bool ownLower, const bool neiLower) const
Check if any edge of a face is cut.