MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / calcSamples

Function calcSamples

src/sampling/sampledSet/cloud/cloudSet.C:45–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44
45void Foam::cloudSet::calcSamples
46(
47 DynamicList<point>& samplingPts,
48 DynamicList<label>& samplingCells,
49 DynamicList<label>& samplingFaces,
50 DynamicList<label>& samplingSegments,
51 DynamicList<scalar>& samplingCurveDist
52) const
53{
54 const meshSearch& queryMesh = searchEngine();
55
56 forAll(sampleCoords_, sampleI)
57 {
58 label celli = queryMesh.findCell(sampleCoords_[sampleI]);
59
60 if (celli != -1)
61 {
62 samplingPts.append(sampleCoords_[sampleI]);
63 samplingCells.append(celli);
64 samplingFaces.append(-1);
65 samplingSegments.append(0);
66 samplingCurveDist.append(1.0 * sampleI);
67 }
68 }
69}
70
71
72void Foam::cloudSet::genSamples()

Callers 1

genSamplesFunction · 0.70

Calls 2

forAllFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected