mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: function objects - apply scoped name when registering objects
This commit is contained in:
committed by
Mark Olesen
parent
9194cd5203
commit
c233961d45
@ -310,6 +310,12 @@ bool Foam::functionObjects::fieldAverage::read(const dictionary& dict)
|
||||
dict.readIfPresent("periodicRestart", periodicRestart_);
|
||||
dict.readEntry("fields", faItems_);
|
||||
|
||||
for (auto& item : faItems_)
|
||||
{
|
||||
item.setMeanFieldName(scopedName(item.meanFieldName()));
|
||||
item.setPrime2MeanFieldName(scopedName(item.prime2MeanFieldName()));
|
||||
}
|
||||
|
||||
const scalar currentTime = obr().time().value();
|
||||
|
||||
if (periodicRestart_)
|
||||
|
||||
@ -236,6 +236,9 @@ public:
|
||||
//- Return const access to the mean field name
|
||||
inline const word& meanFieldName() const;
|
||||
|
||||
//- Set the mean field name
|
||||
inline void setMeanFieldName(const word& name);
|
||||
|
||||
//- Return const access to the prime-squared mean flag
|
||||
inline bool prime2Mean() const;
|
||||
|
||||
@ -245,6 +248,9 @@ public:
|
||||
//- Return const access to the prime-squared mean field name
|
||||
inline const word& prime2MeanFieldName() const;
|
||||
|
||||
//- Set the prime-squared mean field name
|
||||
inline void setPrime2MeanFieldName(const word& name);
|
||||
|
||||
//- Return averaging base type name
|
||||
inline const word& base() const;
|
||||
|
||||
|
||||
@ -64,6 +64,15 @@ Foam::functionObjects::fieldAverageItem::meanFieldName() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::fieldAverageItem::setMeanFieldName
|
||||
(
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
meanFieldName_ = name;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::fieldAverageItem::prime2Mean() const
|
||||
{
|
||||
return prime2Mean_;
|
||||
@ -76,12 +85,22 @@ bool& Foam::functionObjects::fieldAverageItem::prime2Mean()
|
||||
}
|
||||
|
||||
|
||||
const Foam::word& Foam::functionObjects::fieldAverageItem::prime2MeanFieldName() const
|
||||
const Foam::word&
|
||||
Foam::functionObjects::fieldAverageItem::prime2MeanFieldName() const
|
||||
{
|
||||
return prime2MeanFieldName_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::fieldAverageItem::setPrime2MeanFieldName
|
||||
(
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
prime2MeanFieldName_ = name;
|
||||
}
|
||||
|
||||
|
||||
const Foam::word& Foam::functionObjects::fieldAverageItem::base() const
|
||||
{
|
||||
return baseTypeNames_[base_];
|
||||
|
||||
Reference in New Issue
Block a user