Go to the documentation of this file.
40 #include "PatchTools.H"
51 distributedTriSurfaceMesh,
105 if (myBbs[bbI].contains(start) && myBbs[bbI].contains(end))
178 const label segmentI,
203 if (isLocal(bbs, start, end))
205 sendMap[procI].
append(allSegments.size());
206 allSegmentMap.
append(segmentI);
232 sendMap[procI].append(allSegments.size());
233 allSegmentMap.
append(segmentI);
301 dynSendMap[procI].shrink();
302 sendMap[procI].
transfer(dynSendMap[procI]);
331 forAll(constructMap, procI)
337 constructMap[procI].
setSize(nRecv);
339 for (
label i = 0; i < nRecv; i++)
341 constructMap[procI][i] = segmentI++;
360 const bool nearestIntersection,
379 if (nearestIntersection)
381 info[i] = octree.
findLine(start[i], end[i]);
404 if (nearestIntersection)
406 info[i] = octree.
findLine(start[i], end[i]);
415 info[i].setIndex(triIndexer.
toGlobal(info[i].index()));
452 label nOldAllSegments = allSegments.
size();
469 if (nearestIntersection)
473 allSegments[i].first(),
474 allSegments[i].second()
481 allSegments[i].first(),
482 allSegments[i].second()
487 if (intersections[i].hit())
489 intersections[i].setIndex
491 triIndexer.
toGlobal(intersections[i].index())
509 label segmentI = allSegmentMap[i];
519 else if (nearestIntersection)
575 sendMap[procI].
setSize(nSend[procI]);
585 triangleIndex[i] = triIndexer.
toLocal(procI, info[i].index());
586 sendMap[procI][nSend[procI]++] = i;
590 triangleIndex[i] = -1;
620 forAll(constructMap, procI)
626 constructMap[procI].
setSize(nRecv);
628 for (
label i = 0; i < nRecv; i++)
630 constructMap[procI][i] = segmentI++;
664 const scalar radiusSqr,
677 if (bbs[bbI].overlaps(centre, radiusSqr))
679 overlaps[procI] =
true;
730 forAll(procBbOverlaps, procI)
734 dynSendMap[procI].
append(dynAllCentres.size());
735 dynAllSegmentMap.
append(centreI);
736 dynAllCentres.
append(centres[centreI]);
737 dynAllRadiusSqr.
append(radiusSqr[centreI]);
746 dynSendMap[procI].shrink();
747 sendMap[procI].
transfer(dynSendMap[procI]);
750 allCentres.transfer(dynAllCentres.
shrink());
751 allRadiusSqr.transfer(dynAllRadiusSqr.
shrink());
777 forAll(constructMap, procI)
783 constructMap[procI].
setSize(nRecv);
785 for (
label i = 0; i < nRecv; i++)
787 constructMap[procI][i] = segmentI++;
817 if (!decomposer_.valid())
839 if (!decomposeParDict_.valid())
841 decomposeParDict_.reset
860 if (!decomposer_().parallelAware())
863 <<
"The decomposition method " << decomposer_().typeName
864 <<
" does not decompose in parallel."
868 if (!isA<geomDecomp>(decomposer_()))
871 <<
"The decomposition method " << decomposer_().typeName
872 <<
" is not a geometric decomposition method." <<
endl
873 <<
"Only geometric decomposition methods are currently"
883 triCentres[triI] =
s[triI].centre(
s.points());
887 geomDecomp& decomposer = refCast<geomDecomp>(decomposer_());
900 bbs[procI][0].min() =
point( VGREAT, VGREAT, VGREAT);
901 bbs[procI][0].max() =
point(-VGREAT, -VGREAT, -VGREAT);
912 const point& pt =
s.points()[
f[fp]];
983 const label nIncluded,
989 newToOldFaces.
setSize(nIncluded);
990 newToOldPoints.
setSize(
s.points().size());
991 oldToNewPoints.
setSize(
s.points().size());
999 if (include[oldFacei])
1002 newToOldFaces[faceI++] = oldFacei;
1011 if (oldToNewPoints[oldPointI] == -1)
1013 oldToNewPoints[oldPointI] = pointI;
1014 newToOldPoints[pointI++] = oldPointI;
1019 newToOldPoints.
setSize(pointI);
1034 forAll(newToOldPoints, i)
1036 newPoints[i] =
s.points()[newToOldPoints[i]];
1046 newTriangles[i][0] = oldToNewPoints[tri[0]];
1047 newTriangles[i][1] = oldToNewPoints[tri[1]];
1048 newTriangles[i][2] = oldToNewPoints[tri[2]];
1049 newTriangles[i].region() = tri.region();
1053 return triSurface(newTriangles,
s.patches(), newPoints,
true);
1105 createWithValues<boolList>
1114 newToOldPoints.
setSize(
s.points().size());
1115 labelList oldToNewPoints(
s.points().size(), -1);
1119 forAll(include, oldFacei)
1121 if (include[oldFacei])
1130 if (oldToNewPoints[oldPointI] == -1)
1132 oldToNewPoints[oldPointI] = pointI;
1133 newToOldPoints[pointI++] = oldPointI;
1138 newToOldPoints.
setSize(pointI);
1165 if (
f.region() == otherF.region())
1170 label fp1 =
f.fcIndex(fp0);
1171 label fp2 =
f.fcIndex(fp1);
1173 if (
f[fp1] == otherF[1] &&
f[fp2] == otherF[2])
1186 const scalar mergeDist,
1213 label allPointI = nOldAllPoints;
1214 forAll(pointConstructMap, pointI)
1216 if (pointConstructMap[pointI] == -1)
1218 pointConstructMap[pointI] = allPointI++;
1222 if (allPointI > nOldAllPoints)
1226 forAll(pointConstructMap, pointI)
1228 if (pointConstructMap[pointI] >= nOldAllPoints)
1230 allPoints[pointConstructMap[pointI]] = subPoints[pointI];
1256 pointConstructMap[subTri[0]],
1257 pointConstructMap[subTri[1]],
1258 pointConstructMap[subTri[2]],
1264 bool fullMatch =
true;
1268 if (mappedTri[fp] >= nOldAllPoints)
1279 label i = findTriangle
1289 faceConstructMap[triI] = allTriI;
1290 allTris[allTriI] = mappedTri;
1295 faceConstructMap[triI] = i;
1301 faceConstructMap[triI] = allTriI;
1302 allTris[allTriI] = mappedTri;
1342 Info<<
"Constructed from triSurface:" <<
endl;
1353 Info<<
'\t' << procI <<
'\t' << nTris[procI]
1354 <<
'\t' << procBb_[procI] <<
endl;
1369 io.time().findInstance(io.local(),
word::null),
1405 <<
" using 'timeStampMaster' or 'inotifyMaster.'\n"
1406 <<
" Modify the entry fileModificationChecking\n"
1407 <<
" in the etc/controlDict.\n"
1408 <<
" Use 'timeStamp' instead."
1431 Info<<
'\t' << procI <<
'\t' << nTris[procI]
1488 <<
" using 'timeStampMaster' or 'inotifyMaster.'\n"
1489 <<
" Modify the entry fileModificationChecking\n"
1490 <<
" in the etc/controlDict.\n"
1491 <<
" Use 'timeStamp' instead."
1503 <<
" and dictionary:" <<
endl;
1514 Info<<
'\t' << procI <<
'\t' << nTris[procI]
1515 <<
'\t' << procBb_[procI] <<
endl;
1532 globalTris_.clear();
1541 if (!globalTris_.valid())
1585 label nProcs = calcOverlappingProcs
1598 info[i].setIndex(triIndexer.
toGlobal(info[i].index()));
1661 if (allInfo[i].hit())
1663 allInfo[i].setIndex(triIndexer.
toGlobal(allInfo[i].index()));
1679 if (allInfo[i].hit())
1681 label pointI = allSegmentMap[i];
1683 if (!info[pointI].hit())
1686 info[pointI] = allInfo[i];
1697 info[pointI] = allInfo[i];
1774 +
vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
1786 if (hitInfo[pointI].hit())
1789 info[pointI][0] = hitInfo[pointI];
1791 point pt = hitInfo[pointI].hitPoint() + smallVec[pointI];
1793 if (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
1796 e1[compactI] = end[pointI];
1797 pointMap[compactI] = pointI;
1803 info[pointI].
clear();
1807 e0.setSize(compactI);
1808 e1.setSize(compactI);
1826 if (hitInfo[i].hit())
1828 label pointI = pointMap[i];
1832 info[pointI][sz] = hitInfo[i];
1834 point pt = hitInfo[i].hitPoint() + smallVec[pointI];
1836 if (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
1839 e1[compactI] = end[pointI];
1840 pointMap[compactI] = pointI;
1847 e0.setSize(compactI);
1848 e1.setSize(compactI);
1867 region[i] = triSurface::operator[](info[i].index()).region();
1902 label triI = triangleIndex[i];
1903 region[i] =
s[triI].region();
1951 label triI = triangleIndex[i];
1952 normal[i] =
s[triI].normal(
s.points());
1976 if (foundObject<triSurfaceLabelField>(
"values"))
2006 label triI = triangleIndex[i];
2007 values[i] =
fld[triI];
2026 <<
"Volume type not supported for distributed surfaces."
2046 const scalar eps = 1.0e-4;
2049 const point mid = 0.5*(bbs[i].min() + bbs[i].max());
2050 const vector halfSpan = (1.0+eps)*(bbs[i].
max() - mid);
2052 bbsX[i].min() = mid - halfSpan;
2053 bbsX[i].max() = mid + halfSpan;
2059 const point& p0 =
s.points()[
f[0]];
2060 const point& p1 =
s.points()[
f[1]];
2061 const point& p2 =
s.points()[
f[2]];
2063 if (overlaps(bbsX, p0, p1, p2))
2065 includedFace[triI] =
true;
2069 return subsetMesh(
s, includedFace, subPointMap, subFaceMap);
2076 const bool keepNonLocal,
2100 newProcBb = independentlyDistributedBbs(*
this);
2120 if (newProcBb == procBb_)
2126 procBb_.transfer(newProcBb);
2140 Info<<
"distributedTriSurfaceMesh::distribute : before distribution:"
2142 <<
"\tproc\ttris" <<
endl;
2146 Info<<
'\t' << procI <<
'\t' << nTris[procI] <<
endl;
2164 pointSendMap[procI],
2185 forAll(faceSendMap, procI)
2189 forAll(faceSendMap[procI], i)
2191 includedFace[faceSendMap[procI][i]] =
false;
2219 forAll(faceSendMap, procI)
2254 allTris = subSurface;
2274 forAll(faceSendSizes, procI)
2312 forAll(faceSendSizes, procI)
2340 faceConstructMap[procI],
2341 pointConstructMap[procI]
2360 faceConstructMap.
xfer()
2368 pointSendMap.
xfer(),
2369 pointConstructMap.
xfer()
2385 distributeFields<label>(
faceMap());
2386 distributeFields<scalar>(
faceMap());
2387 distributeFields<vector>(
faceMap());
2388 distributeFields<sphericalTensor>(
faceMap());
2389 distributeFields<symmTensor>(
faceMap());
2390 distributeFields<tensor>(
faceMap());
2399 Info<<
"distributedTriSurfaceMesh::distribute : after distribution:"
2401 <<
"\tproc\ttris" <<
endl;
2405 Info<<
'\t' << procI <<
'\t' << nTris[procI] <<
endl;
2410 Info<<
"Writing local bounding box to " << str.
name() <<
endl;
2418 const edge&
e = es[eI];
2473 <<
"Bounding Box : " << bb <<
endl;
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Accumulating histogram of values. Specified bin resolution automatic generation of bins.
const boundBox & bounds() const
Return const reference to boundBox.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const Field< PointType > & points() const
Return reference to global points.
A class for handling words, derived from string.
Output inter-processor communications stream operating on external buffer.
A class for handling file names.
const point & max() const
Maximum describing the bounding box.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
OFstream which keeps track of vertices.
#define forAll(list, i)
Loop across all elements in list.
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.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
static autoPtr< decompositionMethod > New(const dictionary &decompositionDict)
Return a reference to the selected decomposition method.
virtual Ostream & write(const char)
Write character.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
distributionType distType_
The distribution type.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
bool read(const char *, int32_t &)
compressionType
Enumeration for the format of data in the stream.
void clearOut()
Clear storage.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Standard boundBox + extra functionality for use in octree.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
static bool isLocal(const List< treeBoundBox > &myBbs, const point &start, const point &end)
static bool & parRun()
Is this a parallel run?
static const NamedEnum< distributionType, 3 > distributionTypeNames_
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
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 /)
bool hit() const
Is there a hit.
void distributeSegment(const label, const point &start, const point &end, DynamicList< segment > &, DynamicList< label > &, List< DynamicList< label > > &) const
Split segment into subsegments overlapping the processor.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
IOoject and searching on triSurface.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const edgeList edges
Edge to point addressing.
void invertManyToMany(const label len, const UList< InList > &, List< OutList > &)
Invert many-to-many.
static commsTypes defaultCommsType
Default commsType.
List< List< treeBoundBox > > independentlyDistributedBbs(const triSurface &)
Finds new bounds based on an indepedent decomposition.
void writeStats(Ostream &os) const
Print some stats. Parallel aware version of.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual labelList decompose(const pointField &points, const scalarField &pointWeights)=0
Return for every coordinate the wanted processor number.
const fileName & instance() const
writeOption writeOpt() const
const Time & time() const
Return time.
void findLine(const bool nearestIntersection, const pointField &start, const pointField &end, List< pointIndexHit > &info) const
Split edges, distribute, test and collect.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
const objectRegistry & db() const
Return the local objectRegistry.
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]
fileName objectPath() const
Return complete path + object name.
static bool intersectBb(const point &p0, const point &p1, const point &p2, const treeBoundBox &cubeBb)
Does triangle intersect bounding box.
List< List< treeBoundBox > > procBb_
Bounding boxes of all processors.
const globalIndex & globalTris() const
Triangle indexing (demand driven)
scalarField samples(nIntervals, 0)
static bool overlaps(const List< treeBoundBox > &bb, const point &p0, const point &p1, const point &p2)
Does any part of triangle overlap bb.
virtual void getField(const List< pointIndexHit > &, labelList &) const
WIP. From a set of hits (points and.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Geometrical domain decomposition.
static void subsetMeshMap(const triSurface &s, const boolList &include, const label nIncluded, labelList &newToOldPoints, labelList &oldToNewPoints, labelList &newToOldFaces)
Find points used in subset.
Determine correspondence between points. See below.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOdictionary dict_
Bounding box settings.
Pre-declare SubField and related Field type.
Triangulated surface description with patch information.
readOption readOpt() const
void append(const T &)
Append an element at the end of the list.
pointIndexHit findLine(const bool findAny, const point &treeStart, const point &treeEnd, const label startNodeI, const direction startOctantI, const FindIntersectOp &fiOp, const bool verbose=false) const
Find any or nearest intersection.
bool intersects(const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const
Intersects segment; set point to intersection position and face,.
bool & registerObject()
Register object created from this IOobject with registry if true.
const Point & hitPoint() const
Return hit point.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Class containing processor-to-processor mapping information.
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point. unknown if.
Non-pointer based hierarchical recursive searching.
static label findTriangle(const List< labelledTri > &allFaces, const labelListList &allPointFaces, const labelledTri &otherF)
Find triangle otherF in allFaces.
void operator=(const triSurface &)
static triSurface subsetMesh(const triSurface &s, const labelList &newToOldPoints, const labelList &oldToNewPoints, const labelList &newToOldFaces)
Construct subsetted surface.
const word & name() const
Return name.
virtual void getField(const List< pointIndexHit > &, labelList &) const
WIP. From a set of hits (points and.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
const point & min() const
Minimum describing the bounding box.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Raster intersect(const Raster &rast1, const Raster &rast2)
label calcOverlappingProcs(const point ¢re, const scalar radiusSqr, boolList &overlaps) const
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
void clearOut()
Clear storage.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
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){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool isFile(const fileName &, const bool checkGzip=true)
Does the name exist as a FILE in the file system?
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const double e
Elementary charge.
Vector< scalar > vector
A scalar version of the templated Vector.
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))
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Return the location of "dir" containing the file "name".
bool read()
Read my additional data.
static void merge(const scalar mergeDist, const List< labelledTri > &subTris, const pointField &subPoints, List< labelledTri > &allTris, pointField &allPoints, labelList &faceConstructMap, labelList &pointConstructMap)
Merge triSurface (subTris, subPoints) into allTris, allPoints.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
label size() const
Return the number of elements in the UList.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static fileCheckTypes fileModificationChecking
void setSize(const label)
Reset size of List.
virtual void distribute(const List< treeBoundBox > &, const bool keepNonLocal, autoPtr< mapDistribute > &faceMap, autoPtr< mapDistribute > &pointMap)
Set bounds of surface. Bounds currently set as list of.
label toLocal(const label i) const
From global to local on current processor.
Enum read(Istream &) const
Read a word from Istream and return the corresponding.
virtual ~distributedTriSurfaceMesh()
Destructor.
scalar mergeDist_
Merging distance.
line< point, const point & > linePointRef
Line using referred points.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
Get all intersections in order from start to end.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
label whichProcID(const label i) const
Which processor does global come from? Binary search.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
Write using given format, version and compression.
void clear()
Clear the list, i.e. set size to zero.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
static const word null
An empty word.
pointIndexHit findLineAny(const point &start, const point &end) const
Find any intersection of line between start and end.
Triangle with additional region number.
distributedTriSurfaceMesh(const distributedTriSurfaceMesh &)
Disallow default bitwise copy construct.
A bounding box defined in terms of the points at its extremities.
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void reset(T *=0)
If object pointer already set, delete object and set to given.
void findNearest(const label nodeI, const linePointRef &ln, treeBoundBox &tightest, label &nearestShapeI, point &linePoint, point &nearestPoint, const FindNearestOp &fnOp) const
Find nearest point to line.
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
bool overlaps(const boundBox &) const
Overlaps other bounding box?
const fileName & name() const
Return the name of the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Input inter-processor communications stream operating on external buffer.
vector point
Point is a vector.
static triSurface overlappingSurface(const triSurface &, const List< treeBoundBox > &, labelList &subPointMap, labelList &subFaceMap)
Subset the part of surface that is overlapping bounds.
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
autoPtr< mapDistribute > calcLocalQueries(const List< pointIndexHit > &, labelList &triangleIndex) const
Obtains global indices from pointIndexHit and swaps them back.
bool matchPoints(const UList< point > &pts0, const UList< point > &pts1, const UList< scalar > &matchDistance, const bool verbose, labelList &from0To1, const point &origin=point::zero)
Determine correspondence between pointFields. Gets passed.
int system(const std::string &command)
Execute the specified command.
const fileName & local() const
dimensioned< scalar > magSqr(const dimensioned< Type > &)
bool merge(dictionary &, const dictionary &, const bool, const HashTable< wordList, word > &)
autoPtr< mapDistribute > distributeSegments(const pointField &start, const pointField &end, List< segment > &allSegments, List< label > &allSegmentMap) const
Divide edges into local and remote segments. Construct map to.
word name(const complex &)
Return a string representation of a complex.
Initialise the NamedEnum HashTable from the static list of names.
A normal distribution model.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
label toGlobal(const label i) const
From local to global.
streamFormat
Enumeration for the format of data in the stream.