impossible code in particleDistribution
by inspection - around line 140 of particleDistribution.C
if
(
tagFieldName_ != "none"
&& cloudObr.foundObject<IOField<scalar>>(tagFieldName_)
)
{
// Tag field present - generate distribution per tag
const IOField<label>& tag =
cloudObr.lookupObject<IOField<label>>(tagFieldName_);
...
It is either ignored by the if
when the tagFieldName_ is actually a labelField, or runtime error if it was found as a scalarField, but followed by a lookup as a labelField.
Unless I missed something here.