ENH: forces - issue a warning if porosity effects requested but no models found

This commit is contained in:
andy
2014-02-17 16:44:14 +00:00
committed by Andrew Heather
parent fbb3ddf2c4
commit efb31a501d

View File

@ -912,6 +912,14 @@ void Foam::forces::calcForcesMoment()
const HashTable<const porosityModel*> models =
obr_.lookupClass<porosityModel>();
if (models.empty())
{
WarningIn("void Foam::forces::calcForcesMoment()")
<< "Porosity effects requested, but no porosity models found "
<< "in the database"
<< endl;
}
forAllConstIter(HashTable<const porosityModel*>, models, iter)
{
const porosityModel& pm = *iter();