Skip to content
Snippets Groups Projects
Commit 079a0243 authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects::fieldValue: Added support for 'field' entry

Added patchIntegrate configuration
parent 0aa4d70b
No related merge requests found
......@@ -9,10 +9,12 @@
patchAverage
{
patch <patchName>;
fields (p);
fields (<field names>);
operation average;
#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg;"
#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg"
log true;
}
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
patchIntegrate
{
patch <patchName>;
fields (<field names>);
operation areaIntegrate;
#includeEtc "caseDicts/postProcessing/faceSource/patchSource.cfg"
log true;
}
// ************************************************************************* //
......@@ -52,8 +52,6 @@ Foam::functionObjects::fieldValue::fieldValue
writeFiles(name, runTime, dict, name),
dict_(dict),
sourceName_(word::null),
fields_(dict.lookup("fields")),
valueOutput_(dict.lookup("valueOutput")),
resultDict_(fileName("name"), dictionary::null)
{
read(dict);
......@@ -72,8 +70,6 @@ Foam::functionObjects::fieldValue::fieldValue
writeFiles(name, obr, dict, name),
dict_(dict),
sourceName_(word::null),
fields_(dict.lookup("fields")),
valueOutput_(dict.lookup("valueOutput")),
resultDict_(fileName("name"), dictionary::null)
{
read(dict);
......@@ -93,7 +89,17 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
{
dict_ = dict;
writeFiles::read(dict);
dict.lookup("fields") >> fields_;
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_;
return true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment