45 void Foam::patchEdgeSet::genSamples()
48 DynamicList<point> samplingPts;
49 DynamicList<label> samplingCells;
50 DynamicList<label> samplingFaces;
51 DynamicList<label> samplingSegments;
52 DynamicList<scalar> samplingCurveDist;
67 const edge&
e = edges[edgei];
68 start[edgei] =
pts[
mp[
e[0]]];
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];
196 const polyMesh&
mesh,
197 const meshSearch& searchEngine,
198 const dictionary&
dict 204 searchableSurface::
New 209 dict.getOrDefault(
"surfaceName",
name),
210 mesh.time().constant(),
224 mesh.boundaryMesh().patchSet(
dict.
get<wordRes>(
"patches"))
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const labelList patchIDs(pbm.indices(polyPatchNames, true))
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
List< edge > edgeList
List of edge.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
label mergePoints(const PointList &points, labelList &pointToUnique, labelList &uniquePoints, const scalar mergeTol=SMALL, const bool verbose=false)
Calculate merge mapping, preserving the original point order. All points closer/equal mergeTol are to...
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
Ostream & write(Ostream &) const
Output for debugging.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
virtual const labelList & faceOwner() const
Return face owner.
patchEdgeSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
const polyMesh & mesh() const noexcept
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
Geometric merging of points. See below.
vector point
Point is a vector.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingDistance)
Set sample data. Copy list contents.
iterator end() noexcept
Return an iterator to end traversing the UList.
List< label > labelList
A List of labels.
const dimensionedScalar mp
Proton mass.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)