45void 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,
204 searchableSurface::
New
206 dict.get<word>(
"surfaceType"),
209 dict.getOrDefault(
"surfaceName",
name),
224 mesh.boundaryMesh().patchSet(
dict.get<wordRes>(
"patches"))
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
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,...
bool get(const label i) const
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
const word & name() const noexcept
The coord-set name.
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.
patchEdgeSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
constant condensation/saturation model.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
virtual const labelList & faceOwner() const
Return face owner.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const meshSearch & searchEngine() const noexcept
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingDistance)
Set sample data. Copy list contents.
sampledSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const coordSet::coordFormat axisType)
Construct from components.
const polyMesh & mesh() const noexcept
static autoPtr< sampledSet > New(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Return a reference to the selected sampledSet.
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.
Different types of constants.
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.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
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...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.