ENH: fieldMinMax FO updated following update to use functionObjectState

Properties stored in state dictionary:
- minimum value: min<identifier>
- position of minimum value: min<identifier>_position
- processor ID of minimum value: min<identifier>_processor
- maximum value: max<identifier>
- position of maximum value: max<identifier>_position
- processor ID of maximum value: max<identifier>_processor
This commit is contained in:
Andrew Heather
2015-10-06 15:32:01 +01:00
parent 9b10608715
commit 137668ba81
3 changed files with 73 additions and 86 deletions

View File

@ -98,32 +98,16 @@ Foam::fieldMinMax::fieldMinMax
const bool loadFromFiles
)
:
functionObjectState(obr, name),
functionObjectFile(obr, name, typeName, dict),
obr_(obr),
active_(true),
log_(true),
writeLocation_(true),
mode_(mdMag),
fieldSet_()
{
// Check if the available mesh is an fvMesh otherise deactivate
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"fieldMinMax::fieldMinMax"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
<< endl;
}
if (active_)
if (setActive<fvMesh>())
{
read(dict);
writeFileHeader(file());