ENH: fluxSummary function object - added faceZone area output on construction

This commit is contained in:
Andrew Heather
2015-12-01 15:34:25 +00:00
parent 7fe531bde5
commit bd737621a0

View File

@ -677,8 +677,11 @@ Foam::fluxSummary::~fluxSummary()
void Foam::fluxSummary::read(const dictionary& dict)
{
if (active_)
if (!active_)
{
return;
}
functionObjectFile::read(dict);
log_ = dict.lookupOrDefault<Switch>("log", true);
@ -791,6 +794,21 @@ void Foam::fluxSummary::read(const dictionary& dict)
);
}
}
// Provide some output
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl;
forAll(faceZoneName_, zoneI)
{
const word& zoneName = faceZoneName_[zoneI];
scalar zoneArea = faceArea_[zoneI];
Info<< " Zone: " << zoneName << ", area: " << zoneArea << nl;
}
Info<< endl;
}
}