ENH: make sampleSets setSamples movable - preliminary to issue #869

- add some more documentation
This commit is contained in:
Mark Olesen
2018-06-12 19:19:10 +02:00
parent c05dab5e50
commit 7402cd7b5a
30 changed files with 459 additions and 376 deletions

View File

@ -272,20 +272,27 @@ void Foam::shortestPathSet::genSamples(const polyMesh& mesh)
}
}
}
samplingPts.shrink();
samplingCells.shrink();
samplingFaces.shrink();
samplingSegments.shrink();
samplingCurveDist.shrink();
// Move into *this
setSamples
(
samplingPts,
samplingCells,
samplingFaces,
samplingSegments,
samplingCurveDist
std::move(samplingPts),
std::move(samplingCells),
std::move(samplingFaces),
std::move(samplingSegments),
std::move(samplingCurveDist)
);
if (debug)
{
write(Info);
}
}
@ -306,11 +313,6 @@ Foam::shortestPathSet::shortestPathSet
outsidePoints_(outsidePoints)
{
genSamples(mesh);
if (debug)
{
write(Info);
}
}
@ -327,18 +329,7 @@ Foam::shortestPathSet::shortestPathSet
outsidePoints_(dict.lookup("outsidePoints"))
{
genSamples(mesh);
if (debug)
{
write(Info);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::shortestPathSet::~shortestPathSet()
{}
// ************************************************************************* //