Go to the documentation of this file.
102 if (isA<processorPolyPatch>(pp))
104 if (collocatedPatch(pp))
112 else if (isA<cyclicPolyPatch>(pp))
114 if (collocatedPatch(pp))
125 <<
"Unhandled coupledPolyPatch type " << pp.type()
135 const point& nullValue
149 isA<processorPolyPatch>(
patches[patchI])
151 && collocatedPatch(
patches[patchI])
155 refCast<const processorPolyPatch>(
patches[patchI]);
164 label nbrPointI = nbrPts[pointI];
165 patchInfo[nbrPointI] = pointValues[meshPts[pointI]];
179 isA<processorPolyPatch>(
patches[patchI])
181 && collocatedPatch(
patches[patchI])
185 refCast<const processorPolyPatch>(
patches[patchI]);
192 fromNbr >> nbrPatchInfo;
199 label meshPointI = meshPts[pointI];
202 pointValues[meshPointI],
213 if (isA<cyclicPolyPatch>(
patches[patchI]))
216 refCast<const cyclicPolyPatch>(
patches[patchI]);
218 if (cycPatch.
owner() && collocatedPatch(cycPatch))
232 const edge&
e = coupledPoints[i];
233 half0Values[i] = pointValues[meshPts[
e[0]]];
234 half1Values[i] = pointValues[nbrMeshPoints[
e[1]]];
239 const edge&
e = coupledPoints[i];
241 label p1 = nbrMeshPoints[
e[1]];
309 bool fpLower = (pVals[
f[fp]] < iso_);
312 (fpLower != ownLower)
313 || (fpLower != neiLower)
314 || (fpLower != (pVals[
f[
f.fcIndex(fp)]] < iso_))
336 const labelList& own = mesh_.faceOwner();
337 const labelList& nei = mesh_.faceNeighbour();
339 if (mesh_.isInternalFace(faceI))
341 label nbr = (own[faceI] == cellI ? nei[faceI] : own[faceI]);
342 nbrValue = cVals[nbr];
343 nbrPoint = meshC[nbr];
347 label bFaceI = faceI-mesh_.nInternalFaces();
368 const labelList& own = mesh_.faceOwner();
369 const labelList& nei = mesh_.faceNeighbour();
371 faceCutType_.
setSize(mesh_.nFaces());
372 faceCutType_ = NOTCUT;
374 for (
label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
377 bool ownLower = (cVals[own[faceI]] < iso_);
392 bool neiLower = (nbrValue < iso_);
394 if (ownLower != neiLower)
396 faceCutType_[faceI] = CUT;
402 const face f = mesh_.faces()[faceI];
404 if (isEdgeOfFaceCut(pVals,
f, ownLower, neiLower))
406 faceCutType_[faceI] = CUT;
419 bool ownLower = (cVals[own[faceI]] < iso_);
434 bool neiLower = (nbrValue < iso_);
436 if (ownLower != neiLower)
438 faceCutType_[faceI] = CUT;
443 const face f = mesh_.faces()[faceI];
445 if (isEdgeOfFaceCut(pVals,
f, ownLower, neiLower))
447 faceCutType_[faceI] = CUT;
458 cellCutType_.
setSize(mesh_.nCells());
459 cellCutType_ = NOTCUT;
461 for (
label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
463 if (faceCutType_[faceI] != NOTCUT)
465 if (cellCutType_[own[faceI]] == NOTCUT)
467 cellCutType_[own[faceI]] = CUT;
470 if (cellCutType_[nei[faceI]] == NOTCUT)
472 cellCutType_[nei[faceI]] = CUT;
477 for (
label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++)
479 if (faceCutType_[faceI] != NOTCUT)
481 if (cellCutType_[own[faceI]] == NOTCUT)
483 cellCutType_[own[faceI]] = CUT;
491 Pout<<
"isoSurface : detected " << nCutCells_
492 <<
" candidate cut cells (out of " << mesh_.nCells()
505 sum +=
s[i].centre(
s.points());
527 snappedCc.
setSize(mesh_.nCells());
533 forAll(mesh_.cells(), cellI)
535 if (cellCutType_[cellI] == CUT)
537 scalar cVal = cVals[cellI];
539 const cell& cFaces = mesh_.cells()[cellI];
541 localTriPoints.
clear();
550 label faceI = cFaces[cFaceI];
570 s[2] = isoFraction(cVal, nbrValue);
571 pt[2] = (1.0-
s[2])*cc[cellI] +
s[2]*nbrPoint;
573 const face&
f = mesh_.faces()[cFaces[cFaceI]];
579 s[0] = isoFraction(cVal, pVals[p0]);
580 pt[0] = (1.0-
s[0])*cc[cellI] +
s[0]*pts[p0];
584 s[1] = isoFraction(cVal, pVals[p1]);
585 pt[1] = (1.0-
s[1])*cc[cellI] +
s[1]*pts[p1];
589 (
s[0] >= 0.0 &&
s[0] <= 0.5)
590 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
591 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
594 localTriPoints.
append(pt[0]);
595 localTriPoints.
append(pt[1]);
596 localTriPoints.
append(pt[2]);
603 if (
s[i] >= 0.0 &&
s[i] <= 0.5)
605 otherPointSum += pt[i];
613 if (localTriPoints.size() == 0)
619 snappedCc[cellI] = snappedPoints.size();
620 snappedPoints.
append(otherPointSum/nOther);
627 else if (localTriPoints.size() == 3)
631 points.transfer(localTriPoints);
632 snappedCc[cellI] = snappedPoints.size();
666 snappedCc[cellI] = snappedPoints.size();
667 snappedPoints.
append(calcCentre(surf));
701 forAll(mesh_.pointFaces(), pointI)
703 if (isBoundaryPoint.
get(pointI) == 1)
716 if (faceCutType_[faceI] == CUT)
729 localTriPoints.
clear();
739 const face&
f = mesh_.faces()[faceI];
740 label own = mesh_.faceOwner()[faceI];
761 s[0] = isoFraction(pVals[pointI], cVals[own]);
762 pt[0] = (1.0-
s[0])*pts[pointI] +
s[0]*cc[own];
764 s[1] = isoFraction(pVals[pointI], nbrValue);
765 pt[1] = (1.0-
s[1])*pts[pointI] +
s[1]*nbrPoint;
767 label nextPointI =
f[
f.fcIndex(fp)];
768 s[2] = isoFraction(pVals[pointI], pVals[nextPointI]);
769 pt[2] = (1.0-
s[2])*pts[pointI] +
s[2]*pts[nextPointI];
771 label prevPointI =
f[
f.rcIndex(fp)];
772 s[3] = isoFraction(pVals[pointI], pVals[prevPointI]);
773 pt[3] = (1.0-
s[3])*pts[pointI] +
s[3]*pts[prevPointI];
777 (
s[0] >= 0.0 &&
s[0] <= 0.5)
778 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
779 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
782 localTriPoints.
append(pt[0]);
783 localTriPoints.
append(pt[1]);
784 localTriPoints.
append(pt[2]);
788 (
s[0] >= 0.0 &&
s[0] <= 0.5)
789 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
790 && (
s[3] >= 0.0 &&
s[3] <= 0.5)
793 localTriPoints.
append(pt[3]);
794 localTriPoints.
append(pt[0]);
795 localTriPoints.
append(pt[1]);
801 if (
s[i] >= 0.0 &&
s[i] <= 0.5)
803 otherPointSum += pt[i];
809 if (localTriPoints.size() == 0)
815 collapsedPoint[pointI] = otherPointSum/nOther;
818 else if (localTriPoints.size() == 3)
822 points.transfer(localTriPoints);
852 collapsedPoint[pointI] = calcCentre(surf);
859 syncUnseparatedPoints(collapsedPoint,
point::max);
862 snappedPoint.
setSize(mesh_.nPoints());
865 forAll(collapsedPoint, pointI)
869 snappedPoint[pointI] = snappedPoints.size();
870 snappedPoints.
append(collapsedPoint[pointI]);
878 const bool checkDuplicates,
920 <<
"Merged points contain duplicates"
921 <<
" when merging with distance " << mergeDistance_ <<
endl
922 <<
"merged:" << newPoints.size() <<
" re-merged:"
923 << newNewPoints.size()
935 for (
label oldTriI = 0; oldTriI < nTris; oldTriI++)
939 triPointReverseMap[rawPointI],
940 triPointReverseMap[rawPointI+1],
941 triPointReverseMap[rawPointI+2],
946 if ((tri[0] != tri[1]) && (tri[0] != tri[2]) && (tri[1] != tri[2]))
948 newToOldTri.
append(oldTriI);
984 if (nbrTriI > triI && (tris[nbrTriI] == tri))
997 label newTriI = newToOldTri.size();
998 newToOldTri.
append(triMap[triI]);
999 tris[newTriI] = tris[triI];
1008 Pout<<
"isoSurface : merged from " << nTris
1009 <<
" down to " << tris.
size() <<
" unique triangles." <<
endl;
1024 label nbrFaceI = fFaces[i];
1026 if (nbrFaceI <= faceI)
1038 <<
" triangle " << faceI <<
" vertices " <<
f
1039 <<
" fc:" <<
f.centre(surf.
points())
1040 <<
" has the same vertices as triangle " << nbrFaceI
1041 <<
" vertices " << nbrF
1063 storeOp insideOpA(insideTrisA);
1067 storeOp insideOpB(insideTrisB);
1079 const plane& pl = planes[faceI];
1083 insideOpB.
tris_.clear();
1087 triPointRef(tri).sliceWithPlane(pl, insideOpB, dop);
1092 insideOpA.
tris_.clear();
1096 triPointRef(tri).sliceWithPlane(pl, insideOpA, dop);
1109 newTriPoints.
append(tri[0]);
1110 newTriPoints.
append(tri[1]);
1111 newTriPoints.
append(tri[2]);
1119 newTriPoints.
append(tri[0]);
1120 newTriPoints.
append(tri[1]);
1121 newTriPoints.
append(tri[2]);
1136 Pout<<
"isoSurface : trimming to " << bb <<
endl;
1141 const pointField pts(bb.treeBoundBox::points());
1155 for (
label triI = 0; triI < nTris; triI++)
1161 label oldNPoints = newTriPoints.size();
1169 label nCells = (newTriPoints.size()-oldNPoints)/3;
1170 for (
label i = 0; i < nCells; i++)
1178 Pout<<
"isoSurface : trimmed from " << nTris
1179 <<
" down to " << triMap.size()
1180 <<
" triangles." <<
endl;
1217 label oldTriI = triMap[triI];
1220 for (
label i = 0; i < 3; i++)
1222 label pointI = 3*triI+i;
1226 label matchPointI = -1;
1227 for (
label j = 0; j < 3; j++)
1229 label oldPointI = 3*oldTriI+j;
1230 if (pt == oldTriPoints[oldPointI])
1232 matchPointI = oldPointI;
1237 triPointMap[pointI] = matchPointI;
1240 if (matchPointI == -1)
1242 dynInterpolatedPoints.
append(pointI);
1245 oldPoints[0] = 3*oldTriI;
1246 oldPoints[1] = 3*oldTriI+1;
1247 oldPoints[2] = 3*oldTriI+2;
1248 dynInterpolatedOldPoints.
append(oldPoints);
1254 weights[0] = bary[0];
1255 weights[1] = bary[1];
1256 weights[2] = bary[2];
1257 dynInterpolationWeights.
append(weights);
1262 interpolatedPoints.
transfer(dynInterpolatedPoints);
1263 interpolatedOldPoints.transfer(dynInterpolatedOldPoints);
1277 (
f[0] < 0) || (
f[0] >= surf.
points().size())
1278 || (
f[1] < 0) || (
f[1] >= surf.
points().size())
1279 || (
f[2] < 0) || (
f[2] >= surf.
points().size())
1283 <<
"triangle " << faceI <<
" vertices " <<
f
1284 <<
" uses point indices outside point range 0.."
1290 if ((
f[0] ==
f[1]) || (
f[0] ==
f[2]) || (
f[1] ==
f[2]))
1293 <<
"triangle " << faceI
1294 <<
" uses non-unique vertices " <<
f
1307 label nbrFaceI = fFaces[i];
1309 if (nbrFaceI <= faceI)
1319 ((
f[0] == nbrF[0]) || (
f[0] == nbrF[1]) || (
f[0] == nbrF[2]))
1320 && ((
f[1] == nbrF[0]) || (
f[1] == nbrF[1]) || (
f[1] == nbrF[2]))
1321 && ((
f[2] == nbrF[0]) || (
f[2] == nbrF[1]) || (
f[2] == nbrF[2]))
1325 <<
"triangle " << faceI <<
" vertices " <<
f
1326 <<
" fc:" <<
f.centre(surf.
points())
1327 <<
" has the same vertices as triangle " << nbrFaceI
1328 <<
" vertices " << nbrF
1349 createWithValues<boolList>
1358 newToOldPoints.
setSize(
s.points().size());
1359 oldToNewPoints.
setSize(
s.points().size());
1360 oldToNewPoints = -1;
1364 forAll(include, oldFacei)
1366 if (include[oldFacei])
1373 label oldPointI = tri[fp];
1375 if (oldToNewPoints[oldPointI] == -1)
1377 oldToNewPoints[oldPointI] = pointI;
1378 newToOldPoints[pointI++] = oldPointI;
1383 newToOldPoints.
setSize(pointI);
1388 forAll(newToOldPoints, i)
1390 newPoints[i] =
s.points()[newToOldPoints[i]];
1400 newTriangles[i][0] = oldToNewPoints[tri[0]];
1401 newTriangles[i][1] = oldToNewPoints[tri[1]];
1402 newTriangles[i][2] = oldToNewPoints[tri[2]];
1403 newTriangles[i].region() = tri.region();
1407 return triSurface(newTriangles,
s.patches(), newPoints,
true);
1418 const bool regularise,
1420 const scalar mergeTol
1423 mesh_(cVals.mesh()),
1426 regularise_(regularise),
1428 mergeDistance_(mergeTol*mesh_.bounds().mag())
1432 Pout<<
"isoSurface:" <<
nl
1433 <<
" isoField : " << cVals.name() <<
nl
1434 <<
" cell min/max : "
1437 <<
" point min/max : "
1438 <<
min(pVals_) <<
" / "
1439 <<
max(pVals_) <<
nl
1440 <<
" isoValue : " << iso <<
nl
1441 <<
" regularise : " << regularise_ <<
nl
1442 <<
" mergeTol : " << mergeTol <<
nl
1454 cValsPtr_.reset(adaptPatchFields(cVals).ptr());
1467 mesh_.pointsInstance(),
1476 mesh_.cellCentres(),
1488 meshC.boundaryField()[patchI]
1493 collocatedFaces(refCast<const coupledPolyPatch>(pp))
1498 if (!isCollocated[i])
1500 pfld[i] = mesh_.faceCentres()[pp.
start()+i];
1504 else if (isA<emptyPolyPatch>(pp))
1506 typedef slicedVolVectorField::GeometricBoundaryField bType;
1508 bType& bfld =
const_cast<bType&
>(meshC.boundaryField());
1511 bfld.set(patchI, NULL);
1519 mesh_.boundary()[patchI],
1525 bfld[patchI] = pp.
patchSlice(mesh_.faceCentres());
1572 snappedCc.
setSize(mesh_.nCells());
1580 Pout<<
"isoSurface : shifted " << snappedPoints.size()
1581 <<
" cell centres to intersection." <<
endl;
1584 label nCellSnaps = snappedPoints.size();
1599 if (
patches[patchI].coupled())
1602 refCast<const coupledPolyPatch>
1611 if (!isCollocated[i])
1613 const face&
f = mesh_.faces()[cpp.
start()+i];
1617 isBoundaryPoint.
set(
f[fp], 1);
1632 isBoundaryPoint.
set(
f[fp], 1);
1652 snappedPoint.
setSize(mesh_.nPoints());
1658 Pout<<
"isoSurface : shifted " << snappedPoints.size()-nCellSnaps
1659 <<
" vertices to intersection." <<
endl;
1685 Pout<<
"isoSurface : generated " << triMeshCells.size()
1687 <<
" unmerged points." <<
endl;
1704 interpolatedPoints_,
1705 interpolatedOldPoints_,
1706 interpolationWeights_
1708 triMeshCells =
labelField(triMeshCells, trimTriMap);
1714 triSurface::operator=
1727 Pout<<
"isoSurface : generated " << triMap.
size()
1728 <<
" merged triangles." <<
endl;
1738 labelList newTriPointMergeMap(nOldPoints, -1);
1739 forAll(trimTriPointMap, trimPointI)
1741 label oldPointI = trimTriPointMap[trimPointI];
1744 label pointI = triPointMergeMap_[trimPointI];
1747 newTriPointMergeMap[oldPointI] = pointI;
1751 triPointMergeMap_.
transfer(newTriPointMergeMap);
1754 meshCells_.setSize(triMap.
size());
1757 meshCells_[i] = triMeshCells[triMap[i]];
1763 Pout<<
"isoSurface : checking " << size()
1764 <<
" triangles for validity." <<
endl;
1769 validTri(*
this, triI);
1773 Pout<<
"Dumping surface to " << stlFile <<
endl;
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.
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
PackedBoolList collocatedFaces(const coupledPolyPatch &) const
Per face whether is collocated.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const Field< PointType > & points() const
Return reference to global points.
A class for handling file names.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
static bool collocatedPatch(const polyPatch &)
Is patch a collocated (i.e. non-separated) coupled patch?
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Output inter-processor communications stream.
point centre(const pointField &) const
Return centre (centroid)
const cyclicPolyPatch & neighbPatch() const
static point calcCentre(const triSurface &)
storeOp(DynamicList< triPoints > &tris)
void set(const PackedList< 1 > &)
Set specified bits.
label nEdges() const
Return number of edges in patch.
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.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
static bool & parRun()
Is this a parallel run?
triSurface stitchTriPoints(const bool checkDuplicates, const List< point > &triPoints, labelList &triPointReverseMap, labelList &triMap) const
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
fileName path() const
Return directory path name (part before last /)
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
The boundaryRegion persistent data saved as a Map<dictionary>.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
int neighbProcNo() const
Return neigbour processor number.
List< geometricSurfacePatch > geometricSurfacePatchList
Ostream & endl(Ostream &os)
Add newline and flush stream.
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...
void invertManyToMany(const label len, const UList< InList > &, List< OutList > &)
Invert many-to-many.
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar mergeDistance_
When to merge points.
static const FixedList< vector, 6 > faceNormals
Per face the unit normal.
const edgeList & coupledPoints() const
Return connected points (from patch local to neighbour patch local)
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("hex"));labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells]=cellShape(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
scalar barycentric(const point &pt, List< scalar > &bary) const
Calculate the barycentric coordinates of the given.
virtual bool parallel() const
Are the cyclic planes parallel.
A triangle primitive used to calculate face normals and swept volumes.
virtual bool separated() const
Are the planes separated.
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.
label nGlobalPoints() const
Return number of globally shared points.
bool set(const label) const
Is element set.
const Point & c() const
Return third vertex.
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.
Field< label > labelField
Specialisation of Field<T> for label.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Triangulated surface description with patch information.
A subset of mesh faces organised as a primitive patch.
A patch is a list of labels that address the faces in the global face list.
static const faceList faces
Face to point addressing.
const Point & a() const
Return first vertex.
void clear()
Clear the addressed list, i.e. set the size to zero.
static triSurface subsetMesh(const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints)
void setCapacity(const label)
Alter the size of the underlying storage.
InternalField & internalField()
Return internal field.
Neighbour processor patch.
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.
virtual bool owner() const
Does this side own the patch ?
Abstract base class for interpolating in 1D.
const Point & b() const
Return second vertex.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
static void trimToBox(const treeBoundBox &bb, DynamicList< point > &triPoints, DynamicList< label > &triMeshCells)
Trim all triangles to box.
Macros for easy insertion into run-time selection tables.
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
errorManip< error > abort(error &err)
unsigned int get(const label) const
Get value at index I.
const double e
Elementary charge.
List< bool > boolList
Bool container classes.
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))
label start() const
Return start label of this patch in the polyMesh face list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
label markZones(const boolList &borderEdge, labelList &faceZone) const
(size and) fills faceZone with zone of face. Zone is area
DynamicList< triPoints > & tris_
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList & neighbPoints() const
Return neighbour point labels. WIP.
const List< T >::subList patchSlice(const UList< T > &l) const
Slice list to patch.
prefixOSstream Pout(cout, "Pout")
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.
void operator()(const triPoints &tri)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the FixedList.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Triangle with additional region number.
A bounding box defined in terms of the points at its extremities.
Specialization of GeometricField which holds slices of given complete fields in a form that they act ...
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
Input inter-processor communications stream.
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 size(const label)
Override size to be inconsistent with allocated storage.
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.
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
const labelListList & faceFaces() const
Return face-face addressing.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Generic GeometricField class.
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
label mergePoints(const UList< Type > &points, const scalar mergeTol, const bool verbose, labelList &pointMap, const Type &origin=Type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.
bool isEdgeOfFaceCut(const scalarField &pVals, const face &f, const bool ownLower, const bool neiLower) const
Check if any edge of a face is cut.
triangle< point, const point & > triPointRef