ENH: Time.C: compare based on current time precision
This commit is contained in:
parent
0af9b561c2
commit
df916fb923
@ -219,11 +219,13 @@ void Foam::Time::setControls()
|
|||||||
scalar timeValue;
|
scalar timeValue;
|
||||||
if (timeDict.readIfPresent("value", timeValue))
|
if (timeDict.readIfPresent("value", timeValue))
|
||||||
{
|
{
|
||||||
if (mag(timeValue - value()) > SMALL)
|
word storedTimeName(timeName(timeValue));
|
||||||
|
|
||||||
|
if (storedTimeName != timeName())
|
||||||
{
|
{
|
||||||
IOWarningIn("Time::setControls()", timeDict)
|
IOWarningIn("Time::setControls()", timeDict)
|
||||||
<< "Time read from time dictionary " << timeValue
|
<< "Time read from time dictionary " << storedTimeName
|
||||||
<< " differs from actual time " << value() << '.' << nl
|
<< " differs from actual time " << timeName() << '.' << nl
|
||||||
<< " This may cause unexpected database behaviour."
|
<< " This may cause unexpected database behaviour."
|
||||||
<< " If you are not interested" << nl
|
<< " If you are not interested" << nl
|
||||||
<< " in preserving time state delete the time dictionary."
|
<< " in preserving time state delete the time dictionary."
|
||||||
|
Loading…
Reference in New Issue
Block a user