STYLE: limitFields: correct output for multiple variables

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
This commit is contained in:
Tobias Holzmann
2024-10-25 10:44:41 +01:00
committed by Kutalmis Bercin
parent 77ba7ca4d4
commit cc580fc108
2 changed files with 8 additions and 2 deletions

View File

@ -68,17 +68,19 @@ bool Foam::functionObjects::limitFields::limitScalarField
auto& field = *fieldPtr;
Log << " Limiting field " << fieldName << ":";
if (limitType::CLAMP_NONE != withBounds_)
{
MinMax<scalar> currentRange = gMinMax(field);
if (withBounds_ & limitType::CLAMP_MIN)
{
Log << ": min(" << currentRange.min() << ')';
Log << " min(" << currentRange.min() << ')';
}
if (withBounds_ & limitType::CLAMP_MAX)
{
Log << ": max(" << currentRange.max() << ')';
Log << " max(" << currentRange.max() << ')';
}
}
@ -95,6 +97,8 @@ bool Foam::functionObjects::limitFields::limitScalarField
field.clamp_range(min_, max_);
}
Log << endl;
return true;
}

View File

@ -81,6 +81,8 @@ bool Foam::functionObjects::limitFields::limitField(const word& fieldName)
field *= tmField;
}
Log << endl;
return true;
}