Go to the documentation of this file.
52 auto iter = indices.
cbegin();
53 const auto last = indices.
cend();
57 const bool aLower = (pointValues[*iter] < isoval);
62 if (aLower != (pointValues[*iter] < isoval))
92 ignoreBoundaryFaces_(),
107 if (isA<cyclicACMIPolyPatch>(pp))
118 const uint8_t maskValue
125 if (maskValue ? (
cut & maskValue) != 0 : !
cut)
141 cut = cutType::UNVISITED;
155 for (
const label celli : ignoreCells)
157 if (celli >= cuts.
size())
194 cuts[celli] == cutType::UNVISITED
195 && (bb.
contains(cc[celli]) ? keepInside : !keepInside)
211 constexpr uint8_t realCut(cutType::CUT | cutType::TETCUT);
213 cuts.
resize(mesh_.nCells(), cutType::UNVISITED);
218 if (cuts[celli] == cutType::UNVISITED)
220 cuts[celli] = getCellCutType(celli);
222 if ((cuts[celli] & realCut) != 0)
239 mesh_.isInternalFace(facei)
240 || !ignoreBoundaryFaces_.test(facei-mesh_.nInternalFaces())
242 &&
isFaceCut(iso_, pVals_, mesh_.faces()[facei])
243 ) ? cutType::CUT : cutType::NOTCUT;
253 for (
const label facei : mesh_.cells()[celli])
257 !mesh_.isInternalFace(facei)
258 && ignoreBoundaryFaces_.test(facei-mesh_.nInternalFaces())
264 if (
isFaceCut(iso_, pVals_, mesh_.faces()[facei]))
266 return cutType::TETCUT;
270 return cutType::NOTCUT;
278 const bool cellLower = (cVals_[celli] < iso_);
280 for (
const label facei : mesh_.cells()[celli])
284 !mesh_.isInternalFace(facei)
285 && ignoreBoundaryFaces_.test(facei-mesh_.nInternalFaces())
291 const face&
f = mesh_.faces()[facei];
294 for (
const label pointi :
f)
298 if (cellLower != (pVals_[pointi] < iso_))
307 return cutType::NOTCUT;
313 return (nPyrCuts == nPyrEdges) ? cutType::SPHERE : cutType::CUT;
label blockCells(UList< cutType > &cuts, const bitSet &ignoreCells) const
Mark ignoreCells as BLOCKED.
type
Volume classification types.
Low-level components common to various iso-surface algorithms.
void ignoreCyclics()
Set ignoreBoundaryFaces to ignore cyclics (cyclicACMI)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void resize(const label len)
Adjust allocated size of list.
cutType getCellCutType(const label celli) const
void set(const bitSet &bitset)
Set specified bits from another bitset.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define defineIsoSurfaceInterpolateMethods(ThisClass)
Mesh consisting of general polyhedral cells.
static label countCutType(const UList< cutType > &cuts, const uint8_t maskValue)
Count the number of cuts matching the mask type.
#define forAll(list, i)
Loop across all elements in list.
Convenience macros for instantiating iso-surface interpolate methods.
isoSurfaceBase(const isoSurfaceBase &)=delete
No copy construct.
const polyMesh & mesh_
Reference to mesh.
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
A patch is a list of labels that address the faces in the global face list.
cutType getFaceCutType(const label facei) const
Determine face cut for an individual face.
A range or interval of labels defined by a start and a size.
Patchify triangles based on orientation w.r.t other (triangulated or triangulatable) surfaces.
label calcCellCuts(List< cutType > &cuts) const
Populate a list of candidate cell cuts using getCellCutType()
Preferences for controlling iso-surface algorithms.
static void resetCuts(UList< cutType > &cuts)
Restore non-BLOCKED state to an UNVISITED state.
static constexpr Foam::label BLOCKED
bool contains(const point &pt) const
Contains point? (inside or on edge)
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
MeshedSurface< face > meshedSurface
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static bool isFaceCut(const scalar isoval, const scalarField &pointValues, const labelUList &indices)
cutType
The type of cell/face cuts.
A location inside the volume.
A bounding box defined in terms of min/max extrema points.
static bool test(const UList< face > &faces)
A face is a list of labels corresponding to mesh vertices.
void size(const label n)
Older name for setAddressableSize.
bitSet ignoreBoundaryFaces_
Optional boundary faces to ignore.
bool valid() const
Bounding box is non-inverted.
A location outside the volume.