46 const scalar isoAlpha,
77 auto cutCell = [&](
const label celli)
90 nCutCells += !
cellCuts[celli].empty();
92 if (!isNull<labelList>(zoneIDs))
98 cutCell(mesh.
cellZones()[zoneIDs[i]][zoneCelli]);
111 const label nAllocate = nCutCells + nCutCells/10;
122 if (
cellCuts[celli][cellCuti].size() < 3)
continue;
129 const label cfi = cAddrs[celli].ceiToCfiAndFei()[cei][0][0];
130 const label fei = cAddrs[celli].ceiToCfiAndFei()[cei][0][1];
133 mesh.
faces()[mesh.
cells()[celli][cfi]].faceEdge(fei);
137 const label surfacePointi =
138 iter != meshEdgePoint.
end() ? *iter : pointsDyn.
size();
140 if (surfacePointi == pointsDyn.
size())
142 meshEdgePoint.
insert(
e, surfacePointi);
155 facesDyn.
last()[i] = surfacePointi;
158 faceCellsDyn.
append(celli);
164 pointEdges_.
transfer(pointEdgesDyn);
165 pointEdgeLambdas_.
transfer(pointEdgeLambdasDyn);
171 const label nLabels =
174 Pout<< typeName <<
" : constructed surface of size "
196 nFaces += isos[i].faces_.
size();
203 faceCells_.
resize(nFaces);
205 label pointi0 = 0, facei0 = 0;
208 const label nPs = isos[i].points_.
size();
212 SubList<edge>(pointEdges_, nPs, pointi0) = isos[i].pointEdges_;
214 isos[i].pointEdgeLambdas_;
218 forAll(isos[i].faces_, fi)
220 forAll(faces_[facei0 + fi], fpi)
222 faces_[facei0 + fi][fpi] += pointi0;
#define forAll(list, i)
Loop across all elements in list.
static cellEdgeAddressingList & New(const polyMesh &mesh)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void resize(const label)
Alias for setSize(const label)
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A List obtained as a section of another List.
T & last()
Return the last element of the list.
label size() const
Return the number of elements in the UPtrList.
Description of cuts across cells.
Starts timing CPU usage and return elapsed time from start.
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
Iso-surface class based on the cutPoly cutting routines.
virtual ~cutPolyIsoSurface()
Destructor.
cutPolyIsoSurface(const polyMesh &mesh, const scalarField &pAlphas, const scalar isoAlpha, const labelList &zoneIDs=NullObjectRef< labelList >())
Construct from a mesh, point values and an iso-value.
const faceList & faces() const
Faces of the iso-surface.
const pointField & points() const
Points of the iso-surface.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const pointField & points() const
Return raw points.
const meshCellZones & cellZones() const
Return cell zones.
const cellList & cells() const
dimensionedScalar lambda(viscosity->lookup("lambda"))
labelList subSizes(const List< T > &, AccessOp aop=accessOp< T >())
Gets sizes of sublists.
scalar edgeCutLambda(const edge &e, const scalarField &pAlphas, const scalar isoAlpha)
Get the local coordinate within an edge, given end point values and an.
Type edgeCutValue(const edge &e, const scalar lambda, const Field< Type > &pPsis)
Linearly interpolate a value from the end points to the cut point of an.
List< labelPair > faceCuts(const face &f, const scalarField &pAlphas, const scalar isoAlpha)
Return the cuts for a given face. This returns a list of pairs of.
labelListList cellCuts(const cell &c, const cellEdgeAddressing &cAddr, const faceUList &fs, const List< List< labelPair >> &fCuts, const scalarField &pAlphas, const scalar isoAlpha)
Return the cuts for a given cell. This returns a list of lists of cell-edge.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
vector point
Point is a vector.
defineTypeNameAndDebug(combustionModel, 0)
prefixOSstream Pout(cout, "Pout")
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable