functionObjects: 'valueOutput' -> 'writeFields'

This commit is contained in:
Henry Weller
2016-06-11 15:25:00 +01:00
parent 55782e2868
commit 0f4df0150a
18 changed files with 85 additions and 52 deletions

View File

@ -42,7 +42,7 @@ Description
libs ("libfieldFunctionObjects.so");
...
log true;
valueOutput true;
writeFields true;
source cellZone;
sourceName c0;
operation volAverage;
@ -60,7 +60,7 @@ Description
Property | Description | Required | Default value
type | Type name: cellSource | yes |
log | Write data to standard output | no | no
valueOutput | Write the raw output values | yes |
writeFields | Write the raw output values | yes |
writeVolume | Write the volume of the cellSource | no |
source | cell source: see below | yes |
sourceName | name of cell source if required | no |

View File

@ -185,7 +185,7 @@ bool Foam::functionObjects::fieldValues::cellSource::writeValues
// Add to result dictionary, over-writing any previous entry
resultDict_.add(fieldName, result, true);
if (valueOutput_)
if (writeFields_)
{
IOField<Type>
(

View File

@ -58,7 +58,7 @@ functions
log true;
// Output field values as well
valueOutput true;
writeFields true;
// Type of source: patch/faceZone/sampledSurface
source patch;
@ -95,7 +95,7 @@ functions
enabled true;
writeControl writeTime;
log true;
valueOutput true;
writeFields true;
source faceZone;
sourceName f0;
operation sum;
@ -113,7 +113,7 @@ functions
enabled true;
writeControl writeTime;
log true;
valueOutput true;
writeFields true;
source cellZone;
sourceName c0;
operation volAverage;

View File

@ -515,7 +515,7 @@ void Foam::functionObjects::fieldValues::faceSource::initialise
Info<< nl << endl;
if (valueOutput_)
if (writeFields_)
{
const word surfaceFormat(dict.lookup("surfaceFormat"));

View File

@ -45,7 +45,7 @@ Description
libs ("libfieldFunctionObjects.so");
...
log yes;
valueOutput true;
writeFields true;
surfaceFormat none;
source faceZone;
sourceName f0;
@ -65,7 +65,7 @@ Description
Property | Description | Required | Default value
type | type name: faceSource | yes |
log | write data to standard output | no | no
valueOutput | write the output values | yes |
writeFields | write the output values | yes |
writeArea | Write the area of the faceSource | no |
surfaceFormat | output value format | no |
source | face source: see below | yes |

View File

@ -90,17 +90,8 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
dict_ = dict;
writeFiles::read(dict);
if (dict.found("field"))
{
fields_.setSize(1);
dict.lookup("field") >> fields_[0];
}
else if (dict.found("fields"))
{
dict.lookup("fields") >> fields_;
}
dict.lookup("valueOutput") >> valueOutput_;
dict.lookup("fields") >> fields_;
dict.lookup("writeFields") >> writeFields_;
return true;
}

View File

@ -76,7 +76,7 @@ protected:
wordList fields_;
//- Output field values flag
Switch valueOutput_;
Switch writeFields_;
//- Results dictionary for external access of results
dictionary resultDict_;
@ -160,7 +160,7 @@ public:
inline const wordList& fields() const;
//- Return the output field values flag
inline const Switch& valueOutput() const;
inline const Switch& writeFields() const;
//- Helper function to return the reference to the mesh
inline const fvMesh& mesh() const;

View File

@ -47,9 +47,9 @@ inline const Foam::wordList& Foam::functionObjects::fieldValue::fields() const
inline const Foam::Switch&
Foam::functionObjects::fieldValue::valueOutput() const
Foam::functionObjects::fieldValue::writeFields() const
{
return valueOutput_;
return writeFields_;
}

View File

@ -38,7 +38,7 @@ functions
writeControl timeStep;
writeInterval 1;
log true;
valueOutput true;
writeFields true;
source faceZone;
sourceName f0;
operation areaAverage;