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 branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
patchAverage patchAverage
{ {
patch <patchName>; patch <patchName>;
fields (p); fields (<field names>);
operation average; 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 ...@@ -52,8 +52,6 @@ Foam::functionObjects::fieldValue::fieldValue
writeFiles(name, runTime, dict, name), writeFiles(name, runTime, dict, name),
dict_(dict), dict_(dict),
sourceName_(word::null), sourceName_(word::null),
fields_(dict.lookup("fields")),
valueOutput_(dict.lookup("valueOutput")),
resultDict_(fileName("name"), dictionary::null) resultDict_(fileName("name"), dictionary::null)
{ {
read(dict); read(dict);
...@@ -72,8 +70,6 @@ Foam::functionObjects::fieldValue::fieldValue ...@@ -72,8 +70,6 @@ Foam::functionObjects::fieldValue::fieldValue
writeFiles(name, obr, dict, name), writeFiles(name, obr, dict, name),
dict_(dict), dict_(dict),
sourceName_(word::null), sourceName_(word::null),
fields_(dict.lookup("fields")),
valueOutput_(dict.lookup("valueOutput")),
resultDict_(fileName("name"), dictionary::null) resultDict_(fileName("name"), dictionary::null)
{ {
read(dict); read(dict);
...@@ -93,7 +89,17 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict) ...@@ -93,7 +89,17 @@ bool Foam::functionObjects::fieldValue::read(const dictionary& dict)
{ {
dict_ = dict; dict_ = dict;
writeFiles::read(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_; dict.lookup("valueOutput") >> valueOutput_;
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment