mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: declare forceCoeffs operator<< in Foam namespace (fixes #2576)
This commit is contained in:
@ -318,7 +318,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// Coefficients description
|
||||
//- Coefficients description
|
||||
struct coeffDesc
|
||||
{
|
||||
enum splitType
|
||||
@ -366,6 +366,12 @@ public:
|
||||
return name_ + "(r)";
|
||||
}
|
||||
|
||||
//- Print description
|
||||
void print(Ostream& os) const
|
||||
{
|
||||
os << desc_.c_str() << ": " << name_;
|
||||
}
|
||||
|
||||
//- Return force/moment components based on the specified split type
|
||||
vector value(const forceComponents& f, const forceComponents& m) const
|
||||
{
|
||||
@ -546,18 +552,25 @@ public:
|
||||
virtual bool write();
|
||||
};
|
||||
|
||||
} // End namespace functionObjects
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Ostream& operator<<(Ostream& os, const forceCoeffs::coeffDesc& coeff)
|
||||
// Output operator
|
||||
inline Ostream& operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const functionObjects::forceCoeffs::coeffDesc& coeff
|
||||
)
|
||||
{
|
||||
os << coeff.desc_.c_str() << ": " << coeff.name_;
|
||||
|
||||
coeff.print(os);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
} // End namespace functionObjects
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user