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
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -135,7 +135,7 @@ bool Foam::functionObjects::Curle::read(const dictionary& dict)
|
||||
rawFilePtrs_.set
|
||||
(
|
||||
filei,
|
||||
createFile("observer" + Foam::name(filei))
|
||||
newFileAtStartTime("observer" + Foam::name(filei))
|
||||
);
|
||||
|
||||
if (rawFilePtrs_.set(filei))
|
||||
|
||||
@ -742,7 +742,7 @@ void Foam::DMDModels::STDMD::writeToFile(const word& fileName) const
|
||||
// Write objects of dynamics
|
||||
{
|
||||
autoPtr<OFstream> osPtr =
|
||||
createFile
|
||||
newFileAtTime
|
||||
(
|
||||
fileName + "_" + fieldName_,
|
||||
mesh_.time().timeOutputValue()
|
||||
|
||||
@ -190,7 +190,7 @@ bool Foam::binModel::read(const dictionary& dict)
|
||||
filePtrs_.setSize(fieldNames_.size());
|
||||
forAll(filePtrs_, i)
|
||||
{
|
||||
filePtrs_.set(i, createFile(fieldNames_[i] + "Bin"));
|
||||
filePtrs_.set(i, newFileAtStartTime(fieldNames_[i] + "Bin"));
|
||||
}
|
||||
|
||||
setCoordinateSystem(dict);
|
||||
|
||||
@ -910,7 +910,7 @@ bool Foam::functionObjects::fluxSummary::update()
|
||||
forAll(filePtrs_, zonei)
|
||||
{
|
||||
const word& zoneName = zoneNames_[zonei];
|
||||
filePtrs_.set(zonei, createFile(zoneName));
|
||||
filePtrs_.set(zonei, newFileAtStartTime(zoneName));
|
||||
writeFileHeader
|
||||
(
|
||||
zoneName,
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -36,19 +36,19 @@ createFileNames()
|
||||
{
|
||||
if (writeToFile() && !prodFilePtr_)
|
||||
{
|
||||
prodFilePtr_ = createFile("production");
|
||||
prodFilePtr_ = newFileAtStartTime("production");
|
||||
writeHeader(prodFilePtr_(), "production");
|
||||
writeFileHeader(prodFilePtr_());
|
||||
|
||||
consFilePtr_ = createFile("consumption");
|
||||
consFilePtr_ = newFileAtStartTime("consumption");
|
||||
writeHeader(consFilePtr_(), "consumption");
|
||||
writeFileHeader(consFilePtr_());
|
||||
|
||||
prodIntFilePtr_ = createFile("productionInt");
|
||||
prodIntFilePtr_ = newFileAtStartTime("productionInt");
|
||||
writeHeader(prodIntFilePtr_(), "productionInt");
|
||||
writeFileHeader(prodIntFilePtr_());
|
||||
|
||||
consIntFilePtr_ = createFile("consumptionInt");
|
||||
consIntFilePtr_ = newFileAtStartTime("consumptionInt");
|
||||
writeHeader(consIntFilePtr_(), "consumptionInt");
|
||||
writeFileHeader(consIntFilePtr_());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user