ENH: Refactored function objects to make use of new base class

This commit is contained in:
andy
2012-10-15 17:59:38 +01:00
parent d8321469e9
commit 72d49281ce
27 changed files with 225 additions and 612 deletions

View File

@ -83,29 +83,25 @@ void Foam::fieldMinMax::calcMinMaxFields
scalar maxValue = maxVs[maxI];
const vector& maxC = maxCs[maxI];
if (write_)
file()
<< obr_.time().value() << token::TAB
<< fieldName << token::TAB
<< minValue << token::TAB << minC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_()
<< obr_.time().value() << token::TAB
<< fieldName << token::TAB
<< minValue << token::TAB << minC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_() << token::TAB << minI;
}
fieldMinMaxFilePtr_()
<< token::TAB << maxValue << token::TAB << maxC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_() << token::TAB << maxI;
}
fieldMinMaxFilePtr_() << endl;
file() << token::TAB << minI;
}
file() << token::TAB << maxValue << token::TAB << maxC;
if (Pstream::parRun())
{
file() << token::TAB << maxI;
}
file() << endl;
if (log_)
{
Info<< " min(mag(" << fieldName << ")) = "
@ -163,29 +159,25 @@ void Foam::fieldMinMax::calcMinMaxFields
Type maxValue = maxVs[maxI];
const vector& maxC = maxCs[maxI];
if (write_)
file()
<< obr_.time().value() << token::TAB
<< fieldName << token::TAB
<< minValue << token::TAB << minC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_()
<< obr_.time().value() << token::TAB
<< fieldName << token::TAB
<< minValue << token::TAB << minC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_() << token::TAB << minI;
}
fieldMinMaxFilePtr_()
<< token::TAB << maxValue << token::TAB << maxC;
if (Pstream::parRun())
{
fieldMinMaxFilePtr_() << token::TAB << maxI;
}
fieldMinMaxFilePtr_() << endl;
file() << token::TAB << minI;
}
file() << token::TAB << maxValue << token::TAB << maxC;
if (Pstream::parRun())
{
file() << token::TAB << maxI;
}
file() << endl;
if (log_)
{
Info<< " min(" << fieldName << ") = "