particle: Prevent divide by zero when debugging

This commit is contained in:
Will Bainbridge
2020-01-24 15:24:10 +00:00
parent 509f15a0c5
commit 95e96634f8

View File

@ -915,7 +915,8 @@ Foam::scalar Foam::particle::trackToMovingTri
const scalar detAH = detAEqn.value(mu[j]); const scalar detAH = detAEqn.value(mu[j]);
Info<< "Hit on tet face " << i << " at local coordinate " Info<< "Hit on tet face " << i << " at local coordinate "
<< yH/detAH << ", " << mu[j]*detA[0]*100 << "% of the " << (std::isnormal(detAH) ? name(yH/detAH) : "???")
<< ", " << mu[j]*detA[0]*100 << "% of the "
<< "way along the track" << endl; << "way along the track" << endl;
} }