48void Foam::triSurfaceMeshPointSet::calcSamples
50 DynamicList<point>& samplingPts,
51 DynamicList<label>& samplingCells,
52 DynamicList<label>& samplingFaces,
53 DynamicList<label>& samplingSegments,
54 DynamicList<scalar>& samplingCurveDist
57 forAll(sampleCoords_, sampleI)
63 samplingPts.append(sampleCoords_[sampleI]);
64 samplingCells.append(celli);
65 samplingFaces.append(-1);
66 samplingSegments.append(0);
67 samplingCurveDist.append(1.0 * sampleI);
73void Foam::triSurfaceMeshPointSet::genSamples()
92 samplingCells.shrink();
93 samplingFaces.shrink();
94 samplingSegments.shrink();
95 samplingCurveDist.shrink();
100 std::move(samplingPts),
101 std::move(samplingCells),
102 std::move(samplingFaces),
103 std::move(samplingSegments),
104 std::move(samplingCurveDist)
119 const polyMesh&
mesh,
120 const meshSearch& searchEngine,
125 surfaceName_(
dict.get<word>(
"surface"))
129 const auto* surfPtr =
130 mesh.time().cfindObject<triSurfaceMesh>(surfaceName_);
136 sampleCoords_ = surfPtr->points();
140 sampleCoords_ = triSurface
145 mesh.time().constant(),
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
@ NO_REGISTER
Do not request registration (bool: false).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const Field< point_type > & points() const noexcept
Return reference to global points.
bool get(const label i) const
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,...
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
Find cell containing location.
Mesh consisting of general polyhedral cells.
Holds list of sampling points which is filled at construction time. Various implementations of this b...
const meshSearch & searchEngine() const noexcept
sampledSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const coordSet::coordFormat axisType)
Construct from components.
const polyMesh & mesh() const noexcept
A sampleSet from all points of a triSurfaceMesh.
virtual point getRefPoint(const List< point > &pts) const
Get reference point.
triSurfaceMeshPointSet(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
Triangulated surface description with patch information.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Namespace for handling debugging switches.
messageStream Info
Information stream (stdout output on master, null elsewhere).
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
#define forAll(list, i)
Loop across all elements in list.