45 const scalar surfaceFeatures::parallelTolerance =
sin(
degToRad(1.0));
52 const point& a = line.start();
53 const point&
b = line.end();
57 (
p.x() <
min(a.x(),
b.x()) ||
p.x() >
max(a.x(),
b.x()))
58 || (
p.y() <
min(a.y(),
b.y()) ||
p.y() >
max(a.y(),
b.y()))
59 || (
p.z() <
min(a.z(),
b.z()) ||
p.z() >
max(a.z(),
b.z()))
80 pointHit eHit = line.nearestDist(sample);
98 eHit.point().distSqr(line.start())
99 < eHit.point().distSqr(line.end())
118 List<edgeStatus> edgeStat(surf_.nEdges(), NONE);
121 for (label i = 0; i < externalStart_; i++)
123 edgeStat[featureEdges_[i]] = REGION;
127 for (label i = externalStart_; i < internalStart_; i++)
129 edgeStat[featureEdges_[i]] = EXTERNAL;
133 for (label i = internalStart_; i < featureEdges_.size(); i++)
135 edgeStat[featureEdges_[i]] = INTERNAL;
146 const scalar includedAngle
157 if (edgeStat[edgeI] == REGION)
161 else if (edgeStat[edgeI] == EXTERNAL)
165 else if (edgeStat[edgeI] == INTERNAL)
171 externalStart_ = nRegion;
172 internalStart_ = externalStart_ + nExternal;
177 featureEdges_.setSize(internalStart_ + nInternal);
180 label externalI = externalStart_;
181 label internalI = internalStart_;
185 if (edgeStat[edgeI] == REGION)
187 featureEdges_[regionI++] = edgeI;
189 else if (edgeStat[edgeI] == EXTERNAL)
191 featureEdges_[externalI++] = edgeI;
193 else if (edgeStat[edgeI] == INTERNAL)
195 featureEdges_[internalI++] = edgeI;
201 calcFeatPoints(edgeStat, minCos);
206 void Foam::surfaceFeatures::calcFeatPoints
208 const List<edgeStatus>& edgeStat,
212 DynamicList<label> featurePoints(surf_.nPoints()/1000);
215 const edgeList& edges = surf_.edges();
216 const pointField& localPoints = surf_.localPoints();
218 forAll(pointEdges, pointi)
220 const labelList& pEdges = pointEdges[pointi];
222 label nFeatEdges = 0;
226 if (edgeStat[pEdges[i]] != NONE)
234 featurePoints.
append(pointi);
236 else if (nFeatEdges == 2)
239 DynamicList<vector> edgeVecs(2);
243 const label edgeI = pEdges[i];
245 if (edgeStat[edgeI] != NONE)
247 vector vec = edges[edgeI].vec(localPoints);
248 scalar magVec =
mag(vec);
251 edgeVecs.append(vec/magVec);
256 if (edgeVecs.size() == 2 &&
mag(edgeVecs[0] & edgeVecs[1]) < minCos)
258 featurePoints.
append(pointi);
263 featurePoints_.transfer(featurePoints);
267 void Foam::surfaceFeatures::classifyFeatureAngles
270 List<edgeStatus>& edgeStat,
272 const bool geometricTestOnly
275 const vectorField& faceNormals = surf_.faceNormals();
279 bool selectAll = (
mag(minCos-1.0) < SMALL);
283 const labelList& eFaces = edgeFaces[edgeI];
285 if (eFaces.size() != 2)
288 edgeStat[edgeI] = REGION;
292 label face0 = eFaces[0];
293 label face1 = eFaces[1];
298 && surf_[face0].region() != surf_[face1].region()
301 edgeStat[edgeI] = REGION;
306 || ((faceNormals[face0] & faceNormals[face1]) < minCos)
315 if ((f0Tof1 & faceNormals[face0]) >= 0.0)
317 edgeStat[edgeI] = INTERNAL;
321 edgeStat[edgeI] = EXTERNAL;
330 Foam::label Foam::surfaceFeatures::nextFeatEdge
332 const List<edgeStatus>& edgeStat,
334 const label unsetVal,
335 const label prevEdgeI,
339 const labelList& pEdges = surf_.pointEdges()[vertI];
341 label nextEdgeI = -1;
345 label edgeI = pEdges[i];
350 && edgeStat[edgeI] != NONE
351 && featVisited[edgeI] == unsetVal
378 Foam::surfaceFeatures::labelScalar Foam::surfaceFeatures::walkSegment
381 const List<edgeStatus>& edgeStat,
382 const label startEdgeI,
383 const label startPointi,
384 const label currentFeatI,
388 label edgeI = startEdgeI;
390 label vertI = startPointi;
392 scalar visitedLength = 0.0;
396 if (featurePoints_.found(startPointi))
400 return labelScalar(nVisited, visitedLength);
420 unsetVal = currentFeatI;
426 edgeI = nextFeatEdge(edgeStat, featVisited, unsetVal, edgeI, vertI);
428 if (edgeI == -1 || edgeI == startEdgeI)
437 featVisited[edgeI] = currentFeatI;
441 featVisited[edgeI] = -2;
446 const edge&
e = surf_.edges()[edgeI];
448 vertI =
e.otherVertex(vertI);
452 visitedLength +=
e.mag(surf_.localPoints());
456 if (nVisited > surf_.nEdges())
458 Warning<<
"walkSegment : reached iteration limit in walking " 459 <<
"feature edges on surface from edge:" << startEdgeI
460 <<
" vertex:" << startPointi <<
nl 461 <<
"Returning with large length" <<
endl;
463 return labelScalar(nVisited, GREAT);
468 return labelScalar(nVisited, visitedLength);
481 Foam::surfaceFeatures::surfaceFeatures::checkFlatRegionEdge
484 const scalar includedAngle,
488 const triSurface& surf = surf_;
490 const edge&
e = surf.edges()[edgeI];
491 const labelList& eFaces = surf.edgeFaces()[edgeI];
495 DynamicList<vector> normals(2);
496 DynamicList<labelList> bins(2);
500 const vector&
n = surf.faceNormals()[eFaces[eFacei]];
506 if (
mag(
n & normals[normalI]) > (1-tol))
515 bins[index].append(eFacei);
517 else if (normals.size() >= 2)
535 if (bins.size() == 1)
557 if (includedAngle >= 0)
563 const vector& ni = surf.faceNormals()[eFaces[i]];
564 for (label j=i+1; j<eFaces.size(); j++)
566 const vector& nj = surf.faceNormals()[eFaces[j]];
567 if (
mag(ni & nj) < minCos)
589 const labelledTri& t = surf.localFaces()[eFaces[bin0[i]]];
590 int dir = t.edgeDirection(
e);
594 regionAndNormal[i] = t.region()+1;
603 regionAndNormal[i] = -(t.region()+1);
612 const labelledTri& t = surf.localFaces()[eFaces[bin1[i]]];
613 int dir = t.edgeDirection(
e);
615 label myRegionAndNormal;
618 myRegionAndNormal = t.region()+1;
622 myRegionAndNormal = -(t.region()+1);
625 regionAndNormal1[i] = myRegionAndNormal;
627 label index = regionAndNormal.find(-myRegionAndNormal);
665 const label externalStart,
666 const label internalStart
670 featurePoints_(featurePoints),
671 featureEdges_(featureEdges),
672 externalStart_(externalStart),
673 internalStart_(externalStart)
681 const scalar includedAngle,
683 const label minElems,
684 const bool geometricTestOnly
695 if (minLen > 0 || minElems > 0)
709 featurePoints_(featInfoDict.
lookup(
"featurePoints")),
710 featureEdges_(featInfoDict.
lookup(
"featureEdges")),
711 externalStart_(featInfoDict.
get<label>(
"externalStart")),
712 internalStart_(featInfoDict.
get<label>(
"internalStart"))
732 featInfoDict.
readEntry(
"featureEdges", featureEdges_);
733 featInfoDict.
readEntry(
"featurePoints", featurePoints_);
734 featInfoDict.
readEntry(
"externalStart", externalStart_);
735 featInfoDict.
readEntry(
"internalStart", internalStart_);
744 const scalar mergeTol,
745 const bool geometricTestOnly
759 scalar mergeTolSqr =
sqr(mergeTol);
777 const label sEdge = edgeLabel[sEdgeI];
785 dynFeatureEdgeFaces.append(surfEdgeFaces[sEdge]);
789 List<edgeStatus> edgeStat(dynFeatEdges.size(),
NONE);
791 classifyFeatureAngles
801 List<edgeStatus> allEdgeStat(surf_.
nEdges(),
NONE);
805 const auto iter = dynFeatEdges.cfind(surfEdges[eI]);
809 allEdgeStat[eI] = edgeStat[iter.val()];
814 dynFeatEdges.clear();
823 featurePoints_(sf.featurePoints()),
824 featureEdges_(sf.featureEdges()),
825 externalStart_(sf.externalStart()),
826 internalStart_(sf.internalStart())
834 const bool regionEdges,
835 const bool externalEdges,
836 const bool internalEdges
845 for (label i = 0; i < externalStart_; i++)
847 selectedEdges.
append(featureEdges_[i]);
855 for (label i = externalStart_; i < internalStart_; i++)
857 selectedEdges.
append(featureEdges_[i]);
865 for (label i = internalStart_; i < featureEdges_.size(); i++)
867 selectedEdges.
append(featureEdges_[i]);
871 return selectedEdges.
shrink();
877 const scalar includedAngle,
878 const bool geometricTestOnly
886 classifyFeatureAngles
894 setFromStatus(edgeStat, includedAngle);
903 const label minElems,
904 const scalar includedAngle
921 label startEdgeI = 0;
926 for (; startEdgeI < edgeStat.
size(); startEdgeI++)
930 edgeStat[startEdgeI] != NONE
931 && featLines[startEdgeI] == -1
939 if (startEdgeI == edgeStat.
size())
946 featLines[startEdgeI] = featI;
948 const edge& startEdge = surf_.edges()[startEdgeI];
951 labelScalar leftPath =
962 labelScalar rightPath =
978 + startEdge.
mag(surf_.localPoints())
981 || (leftPath.n_ + rightPath.n_ + 1 < minElems)
987 featLines[startEdgeI] = -2;
1019 label edgeI = featureEdges_[i];
1021 if (featLines[edgeI] == -2)
1023 edgeStat[edgeI] = NONE;
1028 setFromStatus(edgeStat, includedAngle);
1040 deleteBox(edgeStat, bb,
true);
1050 deleteBox(edgeStat, bb,
false);
1058 const bool removeInside
1061 const edgeList& surfEdges = surf_.edges();
1062 const pointField& surfLocalPoints = surf_.localPoints();
1066 const point eMid = surfEdges[edgei].centre(surfLocalPoints);
1079 const plane& cutPlane
1082 const edgeList& surfEdges = surf_.edges();
1084 const labelList& meshPoints = surf_.meshPoints();
1088 const edge&
e = surfEdges[edgei];
1091 const point& p1 =
pts[meshPoints[
e.end()]];
1097 point featPoint = intersect * (p1 -
p0) +
p0;
1099 if (!onLine(featPoint,
line))
1114 if (surf_.edgeFaces()[edgei].size() == 1)
1126 void Foam::surfaceFeatures::checkFlatRegionEdge
1130 const scalar includedAngle
1137 const labelList& eFaces = surf_.edgeFaces()[edgei];
1139 if (eFaces.
size() > 2 && (eFaces.
size() % 2) == 0)
1141 edgeStat[edgei] = checkFlatRegionEdge
1156 featInfoDict.
add(
"externalStart", externalStart_);
1157 featInfoDict.
add(
"internalStart", internalStart_);
1158 featInfoDict.
add(
"featureEdges", featureEdges_);
1159 featInfoDict.
add(
"featurePoints", featurePoints_);
1174 OFstream regionStr(prefix +
"_regionEdges.obj");
1175 Pout<<
"Writing region edges to " << regionStr.
name() <<
endl;
1178 for (label i = 0; i < externalStart_; i++)
1180 const edge&
e = surf_.edges()[featureEdges_[i]];
1184 regionStr <<
"l " << verti-1 <<
' ' << verti <<
endl;
1188 OFstream externalStr(prefix +
"_externalEdges.obj");
1189 Pout<<
"Writing external edges to " << externalStr.
name() <<
endl;
1192 for (label i = externalStart_; i < internalStart_; i++)
1194 const edge&
e = surf_.edges()[featureEdges_[i]];
1198 externalStr <<
"l " << verti-1 <<
' ' << verti <<
endl;
1201 OFstream internalStr(prefix +
"_internalEdges.obj");
1202 Pout<<
"Writing internal edges to " << internalStr.
name() <<
endl;
1205 for (label i = internalStart_; i < featureEdges_.size(); i++)
1207 const edge&
e = surf_.edges()[featureEdges_[i]];
1211 internalStr <<
"l " << verti-1 <<
' ' << verti <<
endl;
1214 OFstream pointStr(prefix +
"_points.obj");
1215 Pout<<
"Writing feature points to " << pointStr.
name() <<
endl;
1217 for (
const label pointi : featurePoints_)
1226 os <<
"Feature set:" <<
nl 1227 <<
" points : " << this->featurePoints().
size() <<
nl 1228 <<
" edges : " << this->featureEdges().
size() <<
nl 1229 <<
" of which" <<
nl 1230 <<
" region edges : " << this->nRegionEdges() <<
nl 1231 <<
" external edges : " << this->nExternalEdges() <<
nl 1232 <<
" internal edges : " << this->nInternalEdges() <<
endl;
1257 const auto& treeData = ppTree.
shapes();
1262 const pointField& surfPoints = surf_.localPoints();
1268 const point& surfPt = surfPoints[surfPointi];
1279 <<
"Problem for point " 1280 << surfPointi <<
" in tree " << ppTree.
bb()
1284 label sampleI = info.
index();
1286 if (treeData.centre(sampleI).distSqr(surfPt) < maxDistSqr[sampleI])
1288 nearest.insert(sampleI, surfPointi);
1299 Pout<<
"Dumping nearest surface feature points to nearestSamples.obj" 1302 OFstream objStream(
"nearestSamples.obj");
1309 objStream<<
"l " << vertI-1 <<
' ' << vertI <<
endl;
1325 const scalar minSampleDist
1328 const pointField& surfPoints = surf_.localPoints();
1329 const edgeList& surfEdges = surf_.edges();
1331 scalar maxSearchSqr =
max(maxDistSqr);
1350 label surfEdgeI = selectedEdges[i];
1352 const edge&
e = surfEdges[surfEdgeI];
1354 if (
debug && (i % 1000) == 0)
1356 Pout<<
"looking at surface feature edge " << surfEdgeI
1357 <<
" verts:" <<
e <<
" points:" << surfPoints[
e[0]]
1358 <<
' ' << surfPoints[
e[1]] <<
endl;
1362 vector eVec =
e.vec(surfPoints);
1363 scalar eMag =
mag(eVec);
1378 point edgePoint(surfPoints[
e.start()] +
s*eVec);
1392 label sampleI = info.index();
1394 if (info.point().distSqr(edgePoint) < maxDistSqr[sampleI])
1396 nearest.insert(sampleI, surfEdgeI);
1406 s +=
max(minSampleDist*eMag, sampleDist[sampleI]);
1408 if (
s >= (1-minSampleDist)*eMag)
1423 Pout<<
"Dumping nearest surface edges to nearestEdges.obj" 1426 OFstream objStream(
"nearestEdges.obj");
1431 const label sampleI = iter.key();
1433 const edge&
e = surfEdges[iter.val()];
1438 e.line(surfPoints).nearestDist(
samples[sampleI]).point();
1442 objStream<<
"l " << vertI-1 <<
' ' << vertI <<
endl;
1463 const scalar minSampleDist
1481 const pointField& surfPoints = surf_.localPoints();
1482 const edgeList& surfEdges = surf_.edges();
1484 scalar maxSearchSqr =
max(maxDistSqr);
1495 label surfEdgeI = selectedEdges[i];
1497 const edge&
e = surfEdges[surfEdgeI];
1499 if (
debug && (i % 1000) == 0)
1501 Pout<<
"looking at surface feature edge " << surfEdgeI
1502 <<
" verts:" <<
e <<
" points:" << surfPoints[
e[0]]
1503 <<
' ' << surfPoints[
e[1]] <<
endl;
1507 vector eVec =
e.vec(surfPoints);
1508 scalar eMag =
mag(eVec);
1523 point edgePoint(surfPoints[
e.start()] +
s*eVec);
1537 label index = info.index();
1541 const edge&
e = sampleEdges[sampleEdgeI];
1543 if (info.point().distSqr(edgePoint) < maxDistSqr[
e.start()])
1562 if (
s >= (1-minSampleDist)*eMag)
1576 Pout<<
"Dumping nearest surface feature edges to nearestEdges.obj" 1579 OFstream objStream(
"nearestEdges.obj");
1584 const label sampleEdgeI = iter.key();
1586 const edge& sampleEdge = sampleEdges[sampleEdgeI];
1595 objStream<<
"l " << vertI-1 <<
' ' << vertI <<
endl;
1609 scalar searchSpanSqr,
1619 const pointField& localPoints = surf_.localPoints();
1637 const auto& treeData = ppTree.
shapes();
1658 treeData.line(info.
index()),
1662 edgeLabel[i] = treeData.objectIndex(info.
index());
1663 edgePoint[i] = pHit.
point();
1664 edgeEndPoint[i] = pHit.
index();
1679 const vector& searchSpan,
1687 pointOnFeature.
setSize(selectedSampleEdges.
size());
1696 surf_.localPoints(),
1704 const auto& treeData = ppTree.shapes();
1706 forAll(selectedSampleEdges, i)
1708 const edge&
e = sampleEdges[selectedSampleEdges[i]];
1714 treeBoundBox tightest(eMid - searchSpan, eMid + searchSpan);
1729 edgeLabel[i] = treeData.objectIndex(info.
index());
1730 pointOnFeature[i] = info.
point();
1740 scalar searchSpanSqr,
1744 edgeLabel =
labelList(surf_.nEdges(), -1);
1747 searchDomain.inflate(0.1);
1758 const auto& treeData = ppTree.
shapes();
1760 const edgeList& surfEdges = surf_.edges();
1761 const pointField& surfLocalPoints = surf_.localPoints();
1765 const edge& sample = surfEdges[edgeI];
1767 const point& startPoint = surfLocalPoints[sample.
start()];
1780 const vector featEdgeDir = treeData.line(infoMid.
index()).vec();
1783 if (
mag(surfEdgeDir ^ featEdgeDir) < parallelTolerance)
1785 edgeLabel[edgeI] = edgeI;
1804 <<
"Operating on different surfaces" List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense.
void deleteBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb, const bool removeInside) const
Mark edge status as 'NONE' for edges inside/outside box.
scalar mag(const UList< point > &pts) const
The length (L2-norm) of the edge vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
labelList pointLabels(nPoints, -1)
void write(const fileName &fName) const
Write as dictionary to file.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
const Type & shapes() const noexcept
Reference to shape.
List< edge > edgeList
List of edge.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void inflate(const scalar factor)
Expand box by factor*mag(span) in all dimensions.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Unit conversion functions.
Output to file stream, using an OSstream.
constexpr char nl
The newline '\n' character (0x0a)
scalarField samples(nIntervals, Zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
Holds data for octree to work on an edges subset.
label externalStart() const
Start of external edges.
Map< label > nearestSamples(const labelList &selectedPoints, const pointField &samples, const scalarField &maxDistSqr) const
Find nearest sample for selected surface points.
void subsetBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status outside box as 'NONE'.
Map< pointIndexHit > nearestEdges(const labelList &selectedEdges, const edgeList &sampleEdges, const labelList &selectedSampleEdges, const pointField &samplePoints, const scalarField &sampleDist, const scalarField &maxDistSqr, const scalar minSampleDist=0.1) const
Like nearestSamples but now gets nearest point on.
void setCapacity(const label len)
Alter the size of the underlying storage.
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
const labelList & featureEdges() const
Return feature edge list.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
label objectIndex(const label index) const
Map from shape index to original (non-subset) edge label.
Lookup type of boundary radiation properties.
List< labelList > labelListList
List of labelList.
void writeObj(const fileName &prefix) const
Write to separate OBJ files (region, external, internal edges,.
scalar lineIntersect(const line< PointType, PointRef > &l) const
Return the cutting point between the plane and a line passing through the supplied points...
labelList selectFeatureEdges(const bool regionEdges, const bool externalEdges, const bool internalEdges) const
Helper function: select a subset of featureEdges_.
#define forAll(list, i)
Loop across all elements in list.
List< edgeStatus > toStatus() const
From member feature edges to status per edge.
bool insert(const edge &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
label start() const noexcept
The start (first) vertex label.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
Not a classified feature edge.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
const point_type & point() const noexcept
Return point, no checks.
labelList trimFeatures(const scalar minLen, const label minElems, const scalar includedAngle)
Delete small sets of edges. Edges are stringed up and any.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
dimensionedScalar cos(const dimensionedScalar &ds)
line< point, const point & > linePointRef
A line using referred points.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Mid-point interpolation (weighting factors = 0.5) scheme class.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
void setFromStatus(const List< edgeStatus > &edgeStat, const scalar includedAngle)
Set from status per edge.
void operator=(const surfaceFeatures &rhs)
void writeStats(Ostream &os) const
Write some information.
const triSurface & surface() const
void excludeBox(List< edgeStatus > &edgeStat, const treeBoundBox &bb) const
Mark edge status inside box as 'NONE'.
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
void append(const T &val)
Copy append an element to the end of this list.
const treeBoundBox & bb() const
Top bounding box.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
label index() const noexcept
Return the hit index.
errorManip< error > abort(error &err)
const wordList surface
Standard surface field types (scalar, vector, tensor, etc)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar sin(const dimensionedScalar &ds)
label nEdges() const
Number of edges in patch.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
const labelList & featurePoints() const
Return feature point list.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
Input from file stream, using an ISstream.
const Vector< Cmpt > & centre(const Foam::UList< Vector< Cmpt >> &) const noexcept
Return this (for point which is a typedef to Vector<scalar>)
virtual const fileName & name() const
Read/write access to the name of the stream.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
Point centre() const
Return centre (centroid)
void subsetPlane(List< edgeStatus > &edgeStat, const plane &cutPlane) const
If edge does not intersect the plane, mark as 'NONE'.
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
bool hit() const noexcept
Is there a hit?
vector point
Point is a vector.
Non-pointer based hierarchical recursive searching.
void findFeatures(const scalar includedAngle, const bool geometricTestOnly)
Find feature edges using provided included angle.
void nearestSurfEdge(const labelList &selectedEdges, const pointField &samples, scalar searchSpanSqr, labelList &edgeLabel, labelList &edgeEndPoint, pointField &edgePoint) const
Find nearest surface edge (out of selectedEdges) for.
surfaceFeatures(const triSurface &surf)
Construct from surface.
void excludeOpen(List< edgeStatus > &edgeStat) const
Mark edges with a single connected face as 'NONE'.
void nearestFeatEdge(const edgeList &edges, const pointField &points, scalar searchSpanSqr, labelList &edgeLabel) const
Find nearest feature edge to each surface edge. Uses the.
point centre(const UList< point > &pts) const
Return centre point (centroid) of the edge.
Standard boundBox with extra functionality for use in octree.
void writeDict(Ostream &os) const
Write as dictionary.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
label internalStart() const
Start of internal edges.
Triangulated surface description with patch information.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
const volScalarField & p0
Holds feature edges/points of surface.
PointHit< point > pointHit
A PointHit with a 3D point.
forAllConstIters(mixture.phases(), phase)
A HashTable to objects of type <T> with a label key.