mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects::fieldValue: Added support for 'field' entry
Added patchIntegrate configuration
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
21
etc/caseDicts/postProcessing/faceSource/patchIntegrate
Normal file
21
etc/caseDicts/postProcessing/faceSource/patchIntegrate
Normal file
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- 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);
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user