mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: sampledSet : handling empty sets
This commit is contained in:
@ -53,7 +53,7 @@ void Foam::midPointSet::genSamples()
|
|||||||
|
|
||||||
label sampleI = 0;
|
label sampleI = 0;
|
||||||
|
|
||||||
while(true)
|
while(true && size()>0)
|
||||||
{
|
{
|
||||||
// calculate midpoint between sampleI and sampleI+1 (if in same segment)
|
// calculate midpoint between sampleI and sampleI+1 (if in same segment)
|
||||||
while
|
while
|
||||||
|
|||||||
@ -55,7 +55,7 @@ void Foam::midPointAndFaceSet::genSamples()
|
|||||||
|
|
||||||
label sampleI = 0;
|
label sampleI = 0;
|
||||||
|
|
||||||
while(true)
|
while(true && size()>0)
|
||||||
{
|
{
|
||||||
// sampleI is start of segment
|
// sampleI is start of segment
|
||||||
|
|
||||||
|
|||||||
@ -96,6 +96,14 @@ void Foam::sampledSets::combineSampledSets
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if (Pstream::master() && allCurveDist.size() == 0)
|
||||||
|
{
|
||||||
|
WarningIn("sampledSets::combineSampledSets(..)")
|
||||||
|
<< "Sample set " << samplePts.name()
|
||||||
|
<< " has zero points." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Sort curveDist and use to fill masterSamplePts
|
// Sort curveDist and use to fill masterSamplePts
|
||||||
SortableList<scalar> sortedDist(allCurveDist);
|
SortableList<scalar> sortedDist(allCurveDist);
|
||||||
indexSets[setI] = sortedDist.indices();
|
indexSets[setI] = sortedDist.indices();
|
||||||
|
|||||||
Reference in New Issue
Block a user