Skip to content
Snippets Groups Projects
Commit 4002bacc authored by mattijs's avatar mattijs
Browse files

BUG: sampledSet : handling empty sets

parent a8ae8af7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -55,7 +55,7 @@ void Foam::midPointAndFaceSet::genSamples()
label sampleI = 0;
while(true)
while(true && size()>0)
{
// 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
SortableList<scalar> sortedDist(allCurveDist);
indexSets[setI] = sortedDist.indices();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment