sampling: Reset counters on particles that are used without clouds
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -140,6 +140,8 @@ void Foam::sampledSets::lineFace::calcSamples
|
||||
const vector s =
|
||||
sign*(end - start)*(1 - dist/mag(end - start));
|
||||
|
||||
sampleParticle.reset();
|
||||
|
||||
if
|
||||
(
|
||||
(!first && sampleParticle.onBoundaryFace())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,6 +83,7 @@ void Foam::sampledSets::lineUniform::calcSamples
|
||||
if (++ sampleI < nPoints_)
|
||||
{
|
||||
sampleT = scalar(sampleI)/(nPoints_ - 1);
|
||||
sampleParticle.reset();
|
||||
sampleParticle.track((end_ - start_)/(nPoints_ - 1), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -112,6 +112,7 @@ void Foam::sampledSets::points::calcSamplesOrdered
|
||||
{
|
||||
const vector s = points_[sampleI] - points_[sampleI - 1];
|
||||
sampleDist += mag(s);
|
||||
sampleParticle.reset();
|
||||
sampleParticle.track(s, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user