fileOperation, timeSelector: Correct handling of negative time directories
Resolves bug-report https://bugs.openfoam.org/view.php?id=3784
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -299,7 +299,15 @@ Foam::instantList Foam::timeSelector::selectIfPresent
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No timeSelector option specified. Do not change runTime.
|
// No timeSelector option specified. Do not change runTime.
|
||||||
return instantList(1, instant(runTime.value(), runTime.timeName()));
|
return instantList
|
||||||
|
(
|
||||||
|
1,
|
||||||
|
instant
|
||||||
|
(
|
||||||
|
runTime.timeToUserTime(runTime.value()),
|
||||||
|
runTime.timeName()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -759,7 +759,11 @@ Foam::IOobject Foam::fileOperation::findInstance
|
|||||||
|
|
||||||
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
|
for (instanceI = ts.size()-1; instanceI >= 0; --instanceI)
|
||||||
{
|
{
|
||||||
if (ts[instanceI].value() <= startValue)
|
if
|
||||||
|
(
|
||||||
|
ts[instanceI].name() == time.constant()
|
||||||
|
|| ts[instanceI].value() <= startValue
|
||||||
|
)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user