BUG: sampledSet : handling empty sets

This commit is contained in:
mattijs
2010-12-07 21:28:27 +00:00
parent a8ae8af7d5
commit 4002bacc52
3 changed files with 10 additions and 2 deletions

View File

@ -53,7 +53,7 @@ void Foam::midPointSet::genSamples()
label sampleI = 0;
while(true)
while(true && size()>0)
{
// calculate midpoint between sampleI and sampleI+1 (if in same segment)
while

View File

@ -55,7 +55,7 @@ void Foam::midPointAndFaceSet::genSamples()
label sampleI = 0;
while(true)
while(true && size()>0)
{
// sampleI is start of segment

View File

@ -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
SortableList<scalar> sortedDist(allCurveDist);
indexSets[setI] = sortedDist.indices();