Go to the documentation of this file.
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;
54 const labelList patchIDs(patchSet_.sortedToc());
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();
143 if (nMerged == samplingPts.size())
159 List<point> newSamplingPts(nMerged);
160 List<label> newSamplingCells(nMerged);
161 List<label> newSamplingFaces(nMerged);
162 List<label> newSamplingSegments(nMerged);
163 List<scalar> newSamplingCurveDist(nMerged);
167 const label newi = pointMap[i];
168 newSamplingPts[newi] = samplingPts[i];
169 newSamplingCells[newi] = samplingCells[i];
170 newSamplingFaces[newi] = samplingFaces[i];
171 newSamplingSegments[newi] = samplingSegments[i];
172 newSamplingCurveDist[newi] = samplingCurveDist[i];
197 const polyMesh&
mesh,
198 const meshSearch& searchEngine,
199 const dictionary&
dict
205 searchableSurface::
New
210 dict.getOrDefault(
"surfaceName",
name),
225 mesh.boundaryMesh().patchSet(
dict.
get<wordRes>(
"patches"))
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Holds list of sampling points which is filled at construction time. Various implementations of this b...
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionedScalar mp
Ostream & write(Ostream &) const
List< edge > edgeList
A List of edges.
A class for handling words, derived from Foam::string.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
const polyBoundaryMesh & boundaryMesh() const
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
constexpr auto end(C &c) -> decltype(c.end())
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
label mergePoints(const PointList &points, const scalar mergeTol, const bool verbose, labelList &pointMap, typename PointList::const_reference origin=PointList::value_type::zero)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
const polyMesh & mesh() const
void setSamples(const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
A List of wordRe with additional matching capabilities.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
const Time & time() const
patchEdgeSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
vector point
Point is a vector.
const word & constant() const
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
constant condensation/saturation model.
defineTypeNameAndDebug(combustionModel, 0)