functionObject::fieldAverage: Corrected the name of mean and variance of phase fields
Now rather than the average of "U.air" being named "U.airMean" it is correctly named for the air phase "UMean.air".
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,12 +27,12 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::word Foam::functionObjects::fieldAverageItem::EXT_MEAN
|
||||
const Foam::word Foam::functionObjects::fieldAverageItem::meanExt
|
||||
(
|
||||
"Mean"
|
||||
);
|
||||
|
||||
const Foam::word Foam::functionObjects::fieldAverageItem::EXT_PRIME2MEAN
|
||||
const Foam::word Foam::functionObjects::fieldAverageItem::prime2MeanExt
|
||||
(
|
||||
"Prime2Mean"
|
||||
);
|
||||
|
||||
@ -78,16 +78,6 @@ class fieldAverageItem
|
||||
{
|
||||
public:
|
||||
|
||||
// Public data
|
||||
|
||||
// File and field name extensions
|
||||
|
||||
//- Mean average
|
||||
static const word EXT_MEAN;
|
||||
|
||||
//- Prime-squared average
|
||||
static const word EXT_PRIME2MEAN;
|
||||
|
||||
//- Enumeration defining the averaging base type
|
||||
enum class baseType
|
||||
{
|
||||
@ -130,6 +120,17 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
// Static data
|
||||
|
||||
// File and field name extensions
|
||||
|
||||
//- Mean average
|
||||
static const word meanExt;
|
||||
|
||||
//- Prime-squared average
|
||||
static const word prime2MeanExt;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "fieldAverageItem.H"
|
||||
#include "IOstreams.H"
|
||||
#include "dictionaryEntry.H"
|
||||
#include "IOobject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,8 +55,18 @@ Foam::functionObjects::fieldAverageItem::fieldAverageItem(Istream& is)
|
||||
window_ = entry.lookupOrDefault<scalar>("window", -1.0);
|
||||
windowName_ = entry.lookupOrDefault<word>("windowName", "");
|
||||
|
||||
meanFieldName_ = fieldName_ + EXT_MEAN;
|
||||
prime2MeanFieldName_ = fieldName_ + EXT_PRIME2MEAN;
|
||||
meanFieldName_ = IOobject::groupName
|
||||
(
|
||||
IOobject::member(fieldName_) + meanExt,
|
||||
IOobject::group(fieldName_)
|
||||
);
|
||||
|
||||
prime2MeanFieldName_ = IOobject::groupName
|
||||
(
|
||||
IOobject::member(fieldName_) + prime2MeanExt,
|
||||
IOobject::group(fieldName_)
|
||||
);
|
||||
|
||||
if ((window_ > 0) && (windowName_ != ""))
|
||||
{
|
||||
meanFieldName_ = meanFieldName_ + "_" + windowName_;
|
||||
@ -87,9 +98,17 @@ Foam::Istream& Foam::functionObjects::operator>>
|
||||
faItem.window_ = entry.lookupOrDefault<scalar>("window", -1.0);
|
||||
faItem.windowName_ = entry.lookupOrDefault<word>("windowName", "");
|
||||
|
||||
faItem.meanFieldName_ = faItem.fieldName_ + fieldAverageItem::EXT_MEAN;
|
||||
faItem.prime2MeanFieldName_ =
|
||||
faItem.fieldName_ + fieldAverageItem::EXT_PRIME2MEAN;
|
||||
faItem.meanFieldName_ = IOobject::groupName
|
||||
(
|
||||
IOobject::member(faItem.fieldName_) + fieldAverageItem::meanExt,
|
||||
IOobject::group(faItem.fieldName_)
|
||||
);
|
||||
|
||||
faItem.prime2MeanFieldName_ = IOobject::groupName
|
||||
(
|
||||
IOobject::member(faItem.fieldName_) + fieldAverageItem::prime2MeanExt,
|
||||
IOobject::group(faItem.fieldName_)
|
||||
);
|
||||
|
||||
if ((faItem.window_ > 0) && (faItem.windowName_ != ""))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user