streamlines: Protected operation agaist no streamlines being generated
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -368,7 +368,7 @@ bool Foam::functionObjects::streamlines::write()
|
|||||||
|
|
||||||
// Bin-sort by track and trackPart to build an ordering
|
// Bin-sort by track and trackPart to build an ordering
|
||||||
labelList order(allPositions.size());
|
labelList order(allPositions.size());
|
||||||
if (Pstream::master())
|
if (Pstream::master() && allPositions.size())
|
||||||
{
|
{
|
||||||
const label nTracks = max(allTracks) + 1;
|
const label nTracks = max(allTracks) + 1;
|
||||||
const label trackParti0 = min(allTrackParts);
|
const label trackParti0 = min(allTrackParts);
|
||||||
|
|||||||
Reference in New Issue
Block a user