45void Foam::patchEdgeSet::genSamples()
48 DynamicList<point> samplingPts;
49 DynamicList<label> samplingCells;
50 DynamicList<label> samplingFaces;
51 DynamicList<label> samplingSegments;
52 DynamicList<scalar> samplingCurveDist;
56 for (
const label patchi : patchIDs)
67 const edge&
e = edges[edgei];
68 start[edgei] = pts[mp[
e[0]]];
69 end[edgei] = pts[mp[
e[1]]];
73 List<List<pointIndexHit>> hits;
74 surfPtr_->findLineAll(start,
end, hits);
78 const List<pointIndexHit>& eHits = hits[edgei];
82 const label meshFacei = pp.start()+pp.edgeFaces()[edgei][0];
84 for (
const auto& hit : eHits)
86 const point& pt = hit.hitPoint();
87 samplingPts.append(pt);
88 samplingCells.append(celli);
89 samplingFaces.append(meshFacei);
90 samplingSegments.append(0);
91 samplingCurveDist.append(
mag(pt-origin_));
126 samplingPts.shrink();
127 samplingCells.shrink();
128 samplingFaces.shrink();
129 samplingSegments.shrink();
130 samplingCurveDist.shrink();
142 if (nMerged == samplingPts.size())
158 List<point> newSamplingPts(nMerged);
159 List<label> newSamplingCells(nMerged);
160 List<label> newSamplingFaces(nMerged);
161 List<label> newSamplingSegments(nMerged);
162 List<scalar> newSamplingCurveDist(nMerged);
166 const label newi = pointMap[i];
167 newSamplingPts[newi] = samplingPts[i];
168 newSamplingCells[newi] = samplingCells[i];
169 newSamplingFaces[newi] = samplingFaces[i];
170 newSamplingSegments[newi] = samplingSegments[i];
171 newSamplingCurveDist[newi] = samplingCurveDist[i];
209 dict.getOrDefault(
"surfaceName",
name),
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
iterator end() noexcept
Return an iterator to end traversing the UList.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
Like Foam::uniformSet but samples patch edges.
constant condensation/saturation model.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingDistance)
Set sample data. Copy list contents.
const polyMesh & mesh() const noexcept
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Geometric merging of points. See below.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
label mergePoints(const PointList &points, labelList &pointToUnique, labelList &uniquePoints, const scalar mergeTol=SMALL, const bool verbose=false)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
List< edge > edgeList
A List of edges.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define forAll(list, i)
Loop across all elements in list.