mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: writeFile - add newFile function
ENH: writeFile - renamed createFile functions
to newFileAtTime and newFileAtStartTime
This commit is contained in:
committed by
Mark OLESEN
parent
c59b6db3c4
commit
f87f0040b8
@ -206,7 +206,7 @@ void Foam::functionObjects::forceCoeffs::createIntegratedDataFile()
|
||||
{
|
||||
if (!coeffFilePtr_.valid())
|
||||
{
|
||||
coeffFilePtr_ = createFile("coefficient");
|
||||
coeffFilePtr_ = newFileAtStartTime("coefficient");
|
||||
writeIntegratedDataFileHeader("Coefficients", coeffFilePtr_());
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,13 +386,13 @@ void Foam::functionObjects::forces::createIntegratedDataFiles()
|
||||
{
|
||||
if (!forceFilePtr_.valid())
|
||||
{
|
||||
forceFilePtr_ = createFile("force");
|
||||
forceFilePtr_ = newFileAtStartTime("force");
|
||||
writeIntegratedDataFileHeader("Force", forceFilePtr_());
|
||||
}
|
||||
|
||||
if (!momentFilePtr_.valid())
|
||||
{
|
||||
momentFilePtr_ = createFile("moment");
|
||||
momentFilePtr_ = newFileAtStartTime("moment");
|
||||
writeIntegratedDataFileHeader("Moment", momentFilePtr_());
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,7 +181,8 @@ void Foam::functionObjects::propellerInfo::createFiles()
|
||||
|
||||
if (writePropellerPerformance_ && !propellerPerformanceFilePtr_)
|
||||
{
|
||||
propellerPerformanceFilePtr_ = createFile("propellerPerformance");
|
||||
propellerPerformanceFilePtr_ =
|
||||
newFileAtStartTime("propellerPerformance");
|
||||
auto& os = propellerPerformanceFilePtr_();
|
||||
|
||||
writeHeader(os, "Propeller performance");
|
||||
@ -203,8 +204,9 @@ void Foam::functionObjects::propellerInfo::createFiles()
|
||||
|
||||
if (writeWakeFields_)
|
||||
{
|
||||
if (!wakeFilePtr_) wakeFilePtr_ = createFile("wake");
|
||||
if (!axialWakeFilePtr_) axialWakeFilePtr_ = createFile("axialWake");
|
||||
if (!wakeFilePtr_) wakeFilePtr_ = newFileAtStartTime("wake");
|
||||
if (!axialWakeFilePtr_) axialWakeFilePtr_ =
|
||||
newFileAtStartTime("axialWake");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user