Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
3829ca56
Commit
3829ca56
authored
Oct 21, 2011
by
mattijs
Browse files
ENH: Time: check restart time value.
parent
fcebb1e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/Time/Time.C
View file @
3829ca56
...
...
@@ -212,6 +212,21 @@ void Foam::Time::setControls()
{
timeIndex_
=
startTimeIndex_
;
}
scalar
timeValue
;
if
(
timeDict
.
readIfPresent
(
"value"
,
timeValue
))
{
if
(
mag
(
timeValue
-
value
())
>
SMALL
)
{
IOWarningIn
(
"Time::setControls()"
,
timeDict
)
<<
"Time read from time dictionary "
<<
timeValue
<<
" differs from actual time "
<<
value
()
<<
'.'
<<
nl
<<
" This may cause unexpected database behaviour."
<<
" If you are not interested"
<<
nl
<<
" in preserving time state delete the time dictionary."
<<
endl
;
}
}
}
...
...
src/OpenFOAM/db/Time/TimeIO.C
View file @
3829ca56
...
...
@@ -307,6 +307,7 @@ bool Foam::Time::writeObject
)
);
timeDict
.
add
(
"value"
,
value
());
timeDict
.
add
(
"index"
,
timeIndex_
);
timeDict
.
add
(
"deltaT"
,
deltaT_
);
timeDict
.
add
(
"deltaT0"
,
deltaT0_
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment