Skip to content
Snippets Groups Projects
Commit 02ba3a2d authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: InjectedParticleDistributionInjection model - added protection for the...

ENH: InjectedParticleDistributionInjection  model - added protection for the case of zero particles; updated tutorial scripts.  See #363
parent c3df4b93
Branches
Tags
No related merge requests found
......@@ -384,6 +384,11 @@ Foam::InjectedParticleDistributionInjection<CloudType>::parcelsToInject
nParcelsInjected_ += returnReduce(nParcelsInjected0_, sumOp<label>());
nParcelsInjected0_ = 0;
if (startTime_.empty() || this->volumeTotal_ < ROOTVSMALL)
{
return 0;
}
scalar targetVolume = 0;
forAll(startTime_, injectori)
{
......
......@@ -25,7 +25,7 @@ copyLagrangianData()
if [ -z $latestTime ]
then
echo "Error: unable to find Lagrangian data in case $eulerianCase"
echo "Error: unable to find Lagrangian data in case $dir"
exit 1
fi
......@@ -37,6 +37,7 @@ copyLagrangianData()
\cp -r $dir 0
else
echo "Error: unable to find Lagrangian data in case $dir"
exit 1
fi
}
......
......@@ -25,7 +25,7 @@ copyLagrangianData()
if [ -z $latestTime ]
then
echo "Error: unable to find Lagrangian data in case $eulerianCase"
echo "Error: unable to find Lagrangian data in case $dir"
exit 1
fi
......@@ -37,6 +37,7 @@ copyLagrangianData()
\cp -r $dir 0
else
echo "Error: unable to find Lagrangian data in case $dir"
exit 1
fi
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment