ENH: Exposed weightField to all face/cell source function object operations

This commit is contained in:
andy
2012-02-01 17:32:08 +00:00
parent c603f1602b
commit 7135a403cd
6 changed files with 49 additions and 47 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,9 +55,9 @@ namespace Foam
{
"none",
"sum",
"average",
"volAverage",
"volIntegrate",
"weightedAverage",
"min",
"max",
"CoV"
@ -143,9 +143,8 @@ void Foam::fieldValues::cellSource::initialise(const dictionary& dict)
<< " total volume = " << gSum(filterField(mesh().V()))
<< nl << endl;
if (operation_ == opWeightedAverage)
if (dict.readIfPresent("weightField", weightFieldName_))
{
dict.lookup("weightField") >> weightFieldName_;
Info<< " weight field = " << weightFieldName_;
}