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))
109 ignoreBoundaryFaces_.set(
labelRange(pp.offset(), pp.size()));
118 const uint8_t maskValue
125 if (maskValue ? (
cut & maskValue) != 0 : !
cut)
139 if (
cut != cutType::BLOCKED)
141 cut = cutType::UNVISITED;
155 for (
const label celli : ignoreCells)
157 if (celli >= cuts.
size())
162 cuts[celli] = cutType::BLOCKED;
194 cuts[celli] == cutType::UNVISITED
195 && (bb.
contains(cc[celli]) ? keepInside : !keepInside)
198 cuts[celli] = cutType::BLOCKED;
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;
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize(const label len)
Adjust allocated size of list.
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A bounding box defined in terms of min/max extrema points.
bool valid() const
Bounding box is non-inverted.
bool contains(const point &pt) const
Contains point? (inside or on edge)
A face is a list of labels corresponding to mesh vertices.
labelListList blockCells() const
Return block cells.
Low-level components common to various iso-surface algorithms.
static void resetCuts(UList< cutType > &cuts)
Restore non-BLOCKED state to an UNVISITED state.
static label countCutType(const UList< cutType > &cuts, const uint8_t maskValue)
Count the number of cuts matching the mask type.
cutType
The type of cell/face cuts.
label calcCellCuts(List< cutType > &cuts) const
Populate a list of candidate cell cuts using getCellCutType()
cutType getFaceCutType(const label facei) const
Determine face cut for an individual face.
void ignoreCyclics()
Set ignoreBoundaryFaces to ignore cyclics (cyclicACMI)
cutType getCellCutType(const label celli) const
Preferences for controlling iso-surface algorithms.
A range or interval of labels defined by a start and a size.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Patchify triangles based on orientation w.r.t other (triangulated or triangulatable) surfaces.
static bool test(const UList< face > &faces)
type
Volume classification types.
@ OUTSIDE
A location outside the volume.
@ INSIDE
A location inside the volume.
Convenience macros for instantiating iso-surface interpolate methods.
#define defineIsoSurfaceInterpolateMethods(ThisClass)
static bool isFaceCut(const scalar isoval, const scalarField &pointValues, const labelUList &indices)
#define forAll(list, i)
Loop across all elements in list.