mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: use files() method name in interfaceHeight function object
- avoid warnings about masked method names
This commit is contained in:
@ -77,8 +77,8 @@ void Foam::functionObjects::interfaceHeight::writePositions()
|
|||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
file(fileID::heightFile) << mesh_.time().timeName() << tab;
|
files(fileID::heightFile) << mesh_.time().timeName() << tab;
|
||||||
file(fileID::positionFile) << mesh_.time().timeName() << tab;
|
files(fileID::positionFile) << mesh_.time().timeName() << tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(locations_, li)
|
forAll(locations_, li)
|
||||||
@ -136,86 +136,90 @@ void Foam::functionObjects::interfaceHeight::writePositions()
|
|||||||
|
|
||||||
const Foam::Omanip<int> w = valueWidth(1);
|
const Foam::Omanip<int> w = valueWidth(1);
|
||||||
|
|
||||||
file(fileID::heightFile) << w << hIB << w << hIL;
|
files(fileID::heightFile) << w << hIB << w << hIL;
|
||||||
file(fileID::positionFile) << '(' << w << p.x() << w << p.y()
|
files(fileID::positionFile) << '(' << w << p.x() << w << p.y()
|
||||||
<< valueWidth() << p.z() << ") ";
|
<< valueWidth() << p.z() << ") ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
file(fileID::heightFile).endl();
|
files(fileID::heightFile).endl();
|
||||||
file(fileID::positionFile).endl();
|
files(fileID::positionFile).endl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::functionObjects::interfaceHeight::writeFileHeader(const fileID i)
|
void Foam::functionObjects::interfaceHeight::writeFileHeader(const fileID fid)
|
||||||
{
|
{
|
||||||
forAll(locations_, li)
|
forAll(locations_, li)
|
||||||
{
|
{
|
||||||
writeHeaderValue
|
writeHeaderValue
|
||||||
(
|
(
|
||||||
file(i),
|
files(fid),
|
||||||
"Location " + Foam::name(li),
|
"Location " + Foam::name(li),
|
||||||
locations_[li]
|
locations_[li]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fileID(i))
|
switch (fileID(fid))
|
||||||
{
|
{
|
||||||
case fileID::heightFile:
|
case fileID::heightFile:
|
||||||
|
{
|
||||||
writeHeaderValue
|
writeHeaderValue
|
||||||
(
|
(
|
||||||
file(fileID::heightFile),
|
files(fid),
|
||||||
"hB",
|
"hB",
|
||||||
"Interface height above the boundary"
|
"Interface height above the boundary"
|
||||||
);
|
);
|
||||||
writeHeaderValue
|
writeHeaderValue
|
||||||
(
|
(
|
||||||
file(fileID::heightFile),
|
files(fid),
|
||||||
"hL",
|
"hL",
|
||||||
"Interface height above the location"
|
"Interface height above the location"
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case fileID::positionFile:
|
case fileID::positionFile:
|
||||||
writeHeaderValue(file(i), "p", "Interface position");
|
{
|
||||||
|
writeHeaderValue(files(fid), "p", "Interface position");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Foam::Omanip<int> w = valueWidth(1);
|
const Foam::Omanip<int> w = valueWidth(1);
|
||||||
|
|
||||||
writeCommented(file(i), "Location");
|
writeCommented(files(fid), "Location");
|
||||||
forAll(locations_, li)
|
forAll(locations_, li)
|
||||||
{
|
{
|
||||||
switch (fileID(i))
|
switch (fid)
|
||||||
{
|
{
|
||||||
case fileID::heightFile:
|
case fileID::heightFile:
|
||||||
file(i) << w << li << w << ' ';
|
files(fid) << w << li << w << ' ';
|
||||||
break;
|
break;
|
||||||
case fileID::positionFile:
|
case fileID::positionFile:
|
||||||
file(i) << w << li << w << ' ' << w << ' ' << " ";
|
files(fid) << w << li << w << ' ' << w << ' ' << " ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file(i).endl();
|
files(fid).endl();
|
||||||
|
|
||||||
writeCommented(file(i), "Time");
|
writeCommented(files(fid), "Time");
|
||||||
forAll(locations_, li)
|
forAll(locations_, li)
|
||||||
{
|
{
|
||||||
switch (fileID(i))
|
switch (fid)
|
||||||
{
|
{
|
||||||
case fileID::heightFile:
|
case fileID::heightFile:
|
||||||
file(i) << w << "hB" << w << "hL";
|
files(fid) << w << "hB" << w << "hL";
|
||||||
break;
|
break;
|
||||||
case fileID::positionFile:
|
case fileID::positionFile:
|
||||||
file(i) << w << "p" << w << ' ' << w << ' ' << " ";
|
files(fid) << w << "p" << w << ' ' << w << ' ' << " ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file(i).endl();
|
files(fid).endl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -248,7 +252,6 @@ Foam::functionObjects::interfaceHeight::interfaceHeight
|
|||||||
|
|
||||||
bool Foam::functionObjects::interfaceHeight::read(const dictionary& dict)
|
bool Foam::functionObjects::interfaceHeight::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
|
|
||||||
dict.readIfPresent("alpha", alphaName_);
|
dict.readIfPresent("alpha", alphaName_);
|
||||||
dict.readIfPresent("liquid", liquid_);
|
dict.readIfPresent("liquid", liquid_);
|
||||||
dict.readEntry("locations", locations_);
|
dict.readEntry("locations", locations_);
|
||||||
|
|||||||
@ -156,18 +156,12 @@ class interfaceHeight
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Ostream& file(const fileID fid)
|
|
||||||
{
|
|
||||||
return logFiles::files(label(fid));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Output file header information
|
//- Output file header information
|
||||||
virtual void writeFileHeader(const fileID i);
|
virtual void writeFileHeader(const fileID fid);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -199,6 +193,16 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Inherit logFiles methods
|
||||||
|
using logFiles::files;
|
||||||
|
|
||||||
|
//- Return file corresponding to enumeration
|
||||||
|
OFstream& files(const fileID fid)
|
||||||
|
{
|
||||||
|
return logFiles::files(label(fid));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
virtual bool read(const dictionary&);
|
virtual bool read(const dictionary&);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user