controlDict: the optional graphFormat entry is now used as the default for all setFormat entries

Foam::graph superseded by the more general Foam::setWriter reducing code
maintenance overhead, simplifying usage and further development.
This commit is contained in:
Henry Weller
2023-06-12 17:14:37 +01:00
parent 1e9e0c141b
commit 618d9d33b2
72 changed files with 372 additions and 2034 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,7 +87,7 @@ bool Foam::functionObjects::CourantNo::calc()
tCo->ref() =
byRho
(
(0.5*mesh_.time().deltaT())
(0.5*time_.deltaT())
*fvc::surfaceSum(mag(phi))()()
/mesh_.V()
);

View File

@ -139,7 +139,7 @@ bool Foam::functionObjects::age::execute()
IOobject
(
typeName,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -321,7 +321,7 @@ bool Foam::functionObjects::comfort::execute()
IOobject
(
"hc",
mesh_.time().name(),
time_.name(),
mesh_
),
mesh_,
@ -441,7 +441,7 @@ bool Foam::functionObjects::comfort::execute()
IOobject
(
"TI",
mesh_.time().name(),
time_.name(),
mesh_
),
mesh_,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -86,7 +86,7 @@ void Foam::functionObjects::fieldAverage::initialise()
void Foam::functionObjects::fieldAverage::restart()
{
Log << " Restarting averaging at time " << obr_.time().name() << nl;
Log << " Restarting averaging at time " << time_.name() << nl;
// Clear the times
totalIter_ = 0;
@ -124,8 +124,8 @@ void Foam::functionObjects::fieldAverage::calcAverages()
{
Log << type() << " " << name() << ":" << nl;
const label currentTimeIndex = obr_.time().timeIndex();
const scalar currentTime = obr_.time().value();
const label currentTimeIndex = time_.timeIndex();
const scalar currentTime = time_.value();
if (prevTimeIndex_ == currentTimeIndex)
{
@ -148,7 +148,7 @@ void Foam::functionObjects::fieldAverage::calcAverages()
forAll(faItems_, fieldi)
{
totalIter_[fieldi]++;
totalTime_[fieldi] += obr_.time().deltaTValue();
totalTime_[fieldi] += time_.deltaTValue();
}
Log << " Calculating averages" << nl;
@ -185,7 +185,7 @@ void Foam::functionObjects::fieldAverage::writeAverages() const
IOobject
(
name() + "Properties",
obr_.time().name(),
time_.name(),
"uniform",
obr_,
IOobject::NO_READ,
@ -250,7 +250,7 @@ void Foam::functionObjects::fieldAverage::read
typeIOobject<timeIOdictionary> propsDictHeader
(
name() + "Properties",
obr_.time().name(),
time_.name(),
"uniform",
obr_,
IOobject::MUST_READ_IF_MODIFIED,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ void Foam::functionObjects::fieldAverage::readMeanFieldType(const label fieldi)
IOobject meanFieldIo
(
meanFieldName,
obr_.time().name(),
time_.name(),
obr_,
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -114,7 +114,7 @@ void Foam::functionObjects::fieldAverage::initialiseMeanFieldType
IOobject
(
meanFieldName,
obr_.time().name(),
time_.name(),
obr_
),
1*baseField
@ -161,7 +161,7 @@ void Foam::functionObjects::fieldAverage::readPrime2MeanFieldType
IOobject prime2MeanFieldIo
(
prime2MeanFieldName,
obr_.time().name(),
time_.name(),
obr_,
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -253,7 +253,7 @@ void Foam::functionObjects::fieldAverage::initialisePrime2MeanFieldType
IOobject
(
prime2MeanFieldName,
obr_.time().name(),
time_.name(),
obr_
),
sqr(baseField) - sqr(meanField)
@ -313,7 +313,7 @@ void Foam::functionObjects::fieldAverage::calculateMeanFieldType
Type& meanField =
obr_.lookupObjectRef<Type>(faItems_[fieldi].meanFieldName());
scalar dt = obr_.time().deltaTValue();
scalar dt = time_.deltaTValue();
scalar Dt = totalTime_[fieldi];
if (iterBase())
@ -379,7 +379,7 @@ void Foam::functionObjects::fieldAverage::calculatePrime2MeanFieldType
Type2& prime2MeanField =
obr_.lookupObjectRef<Type2>(faItems_[fieldi].prime2MeanFieldName());
scalar dt = obr_.time().deltaTValue();
scalar dt = time_.deltaTValue();
scalar Dt = totalTime_[fieldi];
if (iterBase())

View File

@ -67,7 +67,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::faceSign() const
inline Foam::fileName
Foam::functionObjects::fieldValues::surfaceFieldValue::outputDir() const
{
return baseFileDir()/name()/"surface"/obr_.time().name();
return baseFileDir()/name()/"surface"/time_.name();
}

View File

@ -264,7 +264,7 @@ bool Foam::functionObjects::fieldValues::volFieldValue::writeValues
(
fieldName + '_' + selectionTypeNames[selectionType()]
+ '-' + cellSetName(),
obr_.time().name(),
time_.name(),
obr_,
IOobject::NO_READ,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,7 +71,11 @@ bool Foam::functionObjects::histogram::read(const dictionary& dict)
min_ = dict.lookupOrDefault<scalar>("min", 0);
dict.lookup("nBins") >> nBins_;
formatterPtr_ = setWriter::New(dict.lookup("setFormat"), dict);
formatterPtr_ = setWriter::New
(
dict.lookupOrDefault("setFormat", time_.graphFormat()),
dict
);
return true;
}
@ -108,7 +112,7 @@ bool Foam::functionObjects::histogram::write()
IOobject
(
fieldName_,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -245,7 +245,11 @@ bool Foam::functionObjects::layerAverage::read(const dictionary& dict)
fields_ = dict.lookup<wordList>("fields");
formatter_ = setWriter::New(dict.lookup("setFormat"), dict);
formatter_ = setWriter::New
(
dict.lookupOrDefault("setFormat", time_.graphFormat()),
dict
);
calcLayers();
@ -316,11 +320,11 @@ bool Foam::functionObjects::layerAverage::write()
{
// Make output directory
const fileName outputPath =
mesh_.time().globalPath()
time_.globalPath()
/writeFile::outputPrefix
/(mesh_.name() != polyMesh::defaultRegion ? mesh_.name() : word())
/name()
/mesh_.time().name();
/time_.name();
mkDir(outputPath);
scalarField layerDistance(layerCentre_.size(), 0);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,8 +102,8 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
// Dump particles
OBJstream str
(
mesh_.time().path()
/"wantedTracks_" + mesh_.time().name() + ".obj"
time_.path()
/"wantedTracks_" + time_.name() + ".obj"
);
InfoInFunction << "Dumping tracks to " << str.name() << endl;
@ -161,8 +161,8 @@ void Foam::functionObjects::nearWallFields::calcAddressing()
{
OBJstream str
(
mesh_.time().path()
/"obtainedTracks_" + mesh_.time().name() + ".obj"
time_.path()
/"obtainedTracks_" + time_.name() + ".obj"
);
InfoInFunction << "Dumping obtained to " << str.name() << endl;

View File

@ -607,11 +607,11 @@ void Foam::functionObjects::patchCutLayerAverage::initialise()
Foam::fileName Foam::functionObjects::patchCutLayerAverage::outputPath() const
{
return
mesh_.time().globalPath()
time_.globalPath()
/writeFile::outputPrefix
/(mesh_.name() != polyMesh::defaultRegion ? mesh_.name() : word())
/name()
/mesh_.time().name();
/time_.name();
}
@ -658,7 +658,11 @@ bool Foam::functionObjects::patchCutLayerAverage::read(const dictionary& dict)
)
];
formatter_ = setWriter::New(dict.lookup("setFormat"), dict);
formatter_ = setWriter::New
(
dict.lookupOrDefault("setFormat", time_.graphFormat()),
dict
);
nOptimiseIter_ = dict.lookupOrDefault("nOptimiseIter", 2);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ void Foam::functionObjects::readFields::loadField
IOobject fieldHeader
(
fieldName,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE

View File

@ -89,7 +89,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
IOobject
(
alphaName_ + "_liquidCore",
obr_.time().name(),
time_.name(),
obr_,
IOobject::NO_READ
),
@ -102,7 +102,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
IOobject
(
alphaName_ + "_background",
obr_.time().name(),
time_.name(),
obr_,
IOobject::NO_READ
),
@ -371,7 +371,11 @@ bool Foam::functionObjects::regionSizeDistribution::read(const dictionary& dict)
dict.lookup("nBins") >> nBins_;
dict.lookup("fields") >> fields_;
formatterPtr_ = setWriter::New(dict.lookup("setFormat"), dict);
formatterPtr_ = setWriter::New
(
dict.lookupOrDefault("setFormat", time_.graphFormat()),
dict
);
return true;
}
@ -410,7 +414,7 @@ bool Foam::functionObjects::regionSizeDistribution::write()
IOobject
(
alphaName_,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE
@ -505,7 +509,7 @@ bool Foam::functionObjects::regionSizeDistribution::write()
IOobject
(
"region",
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE

View File

@ -181,7 +181,11 @@ bool Foam::functionObjects::streamlines::read(const dictionary& dict)
dict.subDict("seedSampleSet")
);
formatterPtr_ = setWriter::New(dict.lookup("setFormat"), dict);
formatterPtr_ = setWriter::New
(
dict.lookupOrDefault("setFormat", time_.graphFormat()),
dict
);
return true;
}
@ -534,11 +538,11 @@ bool Foam::functionObjects::streamlines::write()
{
// Make output directory
const fileName outputPath =
mesh_.time().globalPath()
time_.globalPath()
/writeFile::outputPrefix
/(mesh_.name() != polyMesh::defaultRegion ? mesh_.name() : word())
/name()
/mesh_.time().name();
/time_.name();
mkDir(outputPath);
// Pass data to the formatter to write

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,7 +59,7 @@ void Foam::functionObjects::turbulenceFields::processField
IOobject
(
scopedName,
obr_.time().name(),
time_.name(),
obr_,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -261,7 +261,7 @@ bool Foam::functionObjects::wallHeatFlux::write()
if (Pstream::master())
{
file()
<< mesh_.time().userTimeValue()
<< time_.userTimeValue()
<< tab << pp.name()
<< tab << minqp
<< tab << maxqp

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -221,7 +221,7 @@ bool Foam::functionObjects::wallHeatTransferCoeff::write()
if (Pstream::master())
{
file()
<< mesh_.time().userTimeValue()
<< time_.userTimeValue()
<< tab << pp.name()
<< tab << minHtcp
<< tab << maxHtcp

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -243,7 +243,7 @@ bool Foam::functionObjects::wallShearStress::write()
if (Pstream::master())
{
file() << mesh_.time().userTimeValue()
file() << time_.userTimeValue()
<< tab << pp.name()
<< tab << minSsp
<< tab << maxSsp

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,7 +91,7 @@ Foam::volScalarField& Foam::functionObjects::phaseScalarTransport::Phi()
IOobject
(
"Phi" + s_.name(),
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
@ -164,7 +164,7 @@ Foam::functionObjects::phaseScalarTransport::alphaPhi()
Info<< type() << ": Writing " << DDtAlpha.name() << endl;
DDtAlpha.write();
};
if (debug && mesh_.time().writeTime())
if (debug && time_.writeTime())
{
writeDDt(0);
}
@ -224,7 +224,7 @@ Foam::functionObjects::phaseScalarTransport::alphaPhi()
}
// Debug writing
if (debug && mesh_.time().writeTime())
if (debug && time_.writeTime())
{
writeDDt(1);
}
@ -295,7 +295,7 @@ Foam::functionObjects::phaseScalarTransport::phaseScalarTransport
IOobject
(
fieldName_,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
@ -477,7 +477,7 @@ bool Foam::functionObjects::phaseScalarTransport::execute()
"alpha"
+ word(toupper(fieldName_[0]))
+ fieldName_(1, fieldName_.size() - 1),
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE

View File

@ -127,7 +127,7 @@ Foam::functionObjects::scalarTransport::scalarTransport
IOobject
(
fieldName_,
mesh_.time().name(),
time_.name(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
@ -464,7 +464,7 @@ void Foam::functionObjects::scalarTransport::solveMULES()
if
(
sRestart_
|| mesh_.time().timeIndex() > mesh_.time().startTimeIndex() + 1
|| time_.timeIndex() > time_.startTimeIndex() + 1
)
{
ocCoeff =

View File

@ -119,9 +119,8 @@ Foam::codedFunctionObject::codedFunctionObject
const dictionary& dict
)
:
functionObject(name),
codedBase(name, dict),
time_(time)
functionObject(name, time),
codedBase(name, dict)
{
read(dict);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,9 +90,6 @@ class codedFunctionObject
{
// Private Data
//- Reference to the time database
const Time& time_;
//- The dynamically generated functionObject pointer
mutable autoPtr<functionObject> redirectFunctionObjectPtr_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,7 +55,7 @@ Foam::functionObjects::removeRegisteredObject::removeRegisteredObject
const dictionary& dict
)
:
functionObject(name),
functionObject(name, runTime),
obr_
(
runTime.lookupObject<objectRegistry>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,8 +53,7 @@ Foam::functionObjects::setTimeStepFunctionObject::setTimeStepFunctionObject
const dictionary& dict
)
:
functionObject(name),
time_(runTime)
functionObject(name, runTime)
{
read(dict);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,9 +70,6 @@ class setTimeStepFunctionObject
{
// Private Data
//- Reference to the time database
const Time& time_;
//- Time step function/table
autoPtr<Function1<scalar>> timeStepPtr_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,8 +54,7 @@ setWriteIntervalFunctionObject
const dictionary& dict
)
:
functionObject(name),
time_(runTime)
functionObject(name, runTime)
{
read(dict);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,9 +81,6 @@ class setWriteIntervalFunctionObject
{
// Private Data
//- Reference to the time database
const Time& time_;
//- Time step function/table
autoPtr<Function1<scalar>> writeIntervalPtr_;

View File

@ -65,8 +65,7 @@ Foam::functionObjects::stopAt::stopAt
const dictionary& dict
)
:
functionObject(name),
time_(runTime),
functionObject(name, runTime),
action_(actionType::nextWrite),
stopped_(false)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -73,9 +73,6 @@ protected:
// Protected data
//- Reference to the Time
const Time& time_;
//- Action type names
static const NamedEnum<actionType, 3> actionTypeNames_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,11 +52,11 @@ namespace functionObjects
Foam::functionObjects::systemCall::systemCall
(
const word& name,
const Time&,
const Time& time,
const dictionary& dict
)
:
functionObject(name),
functionObject(name, time),
executeCalls_(),
endCalls_(),
writeCalls_()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,8 +82,7 @@ Foam::functionObjects::timeActivatedFileUpdate::timeActivatedFileUpdate
const dictionary& dict
)
:
functionObject(name),
time_(runTime),
functionObject(name, runTime),
fileToUpdate_(dict.lookup("fileToUpdate")),
fileVsTime_(),
lastIndex_(-1)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,9 +82,6 @@ class timeActivatedFileUpdate
{
// Private Data
//- Reference to Time
const Time& time_;
//- Name of file to update
fileName fileToUpdate_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -107,7 +107,7 @@ bool Foam::functionObjects::timeStep::write()
{
writeTime(file());
file() << tab << obr_.time().deltaTValue();
file() << tab << time_.deltaTValue();
file() << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -104,7 +104,7 @@ Foam::functionObjects::writeDictionary::writeDictionary
const dictionary& dict
)
:
functionObject(name),
functionObject(name, runTime),
obr_
(
runTime.lookupObject<objectRegistry>
@ -190,16 +190,16 @@ bool Foam::functionObjects::writeDictionary::write()
}
else
{
bool processed = tryDirectory(i, obr_.time().name(), firstDict);
bool processed = tryDirectory(i, time_.name(), firstDict);
if (!processed)
{
processed = tryDirectory(i, obr_.time().constant(), firstDict);
processed = tryDirectory(i, time_.constant(), firstDict);
}
if (!processed)
{
processed = tryDirectory(i, obr_.time().system(), firstDict);
processed = tryDirectory(i, time_.system(), firstDict);
}
if (!processed)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ void Foam::functionObjects::writeObjects::writeObject
if
(
obj.writeOpt() == IOobject::AUTO_WRITE
&& writeObr_.time().writeTime()
&& time_.writeTime()
)
{
Log << " automatically written object " << obj.name() << endl;
@ -141,7 +141,7 @@ Foam::functionObjects::writeObjects::writeObjects
const dictionary& dict
)
:
functionObject(name),
functionObject(name, runTime),
writeObjectsBase
(
runTime.lookupObject<objectRegistry>