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))
117 const UList<cutType>& cuts,
118 const uint8_t maskValue
123 for (
const cutType cut : cuts)
125 if (maskValue ? (cut & maskValue) != 0 : !cut)
137 for (cutType& cut : cuts)
141 cut = cutType::UNVISITED;
149 UList<cutType>& cuts,
150 const bitSet& ignoreCells
155 for (
const label celli : ignoreCells)
157 if (celli >= cuts.size())
172 UList<cutType>& cuts,
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;
void ignoreCyclics()
Set ignoreBoundaryFaces to ignore cyclics (cyclicACMI)
bitSet ignoreBoundaryFaces_
Optional boundary faces to ignore.
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
cutType getCellCutType(const label celli) const
Cell cut for an individual cell, with special handling for TETCUT and SPHERE cuts.
static bool isFaceCut(const scalar isoval, const scalarField &pointValues, const labelUList &indices)
void set(const bitSet &bitset)
Set specified bits from another bitset.
type
Volume classification types.
label blockCells(UList< cutType > &cuts, const bitSet &ignoreCells) const
Mark ignoreCells as BLOCKED.
Preferences for controlling iso-surface algorithms.
A range or interval of labels defined by a start and a size.
static label countCutType(const UList< cutType > &cuts, const uint8_t maskValue)
Count the number of cuts matching the mask type.
cutType getFaceCutType(const label facei) const
Determine face cut for an individual face.
Low-level components common to various iso-surface algorithms.
#define forAll(list, i)
Loop across all elements in list.
#define defineIsoSurfaceInterpolateMethods(ThisClass)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
isoSurfaceBase(const isoSurfaceBase &)=delete
No copy construct.
vectorField pointField
pointField is a vectorField.
const polyMesh & mesh_
Reference to mesh.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
label calcCellCuts(List< cutType > &cuts) const
Populate a list of candidate cell cuts using getCellCutType()
static void resetCuts(UList< cutType > &cuts)
Restore non-BLOCKED state to an UNVISITED state.
A location inside the volume.
A location outside the volume.
static constexpr Foam::label BLOCKED
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
Mesh consisting of general polyhedral cells.
cutType
The type of cell/face cuts.
A patch is a list of labels that address the faces in the global face list.
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for TET. (4 tri)
Convenience macros for instantiating iso-surface interpolate methods.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())