Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
78ee6c2a
Commit
78ee6c2a
authored
8 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
Time: When increasing precision check if the time name is unchanged
Patch contributed by Mattijs Janssens
parent
83787036
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/OpenFOAM/db/Time/Time.C
+11
-1
11 additions, 1 deletion
src/OpenFOAM/db/Time/Time.C
with
11 additions
and
1 deletion
src/OpenFOAM/db/Time/Time.C
+
11
−
1
View file @
78ee6c2a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
7
OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -184,6 +184,8 @@ void Foam::Time::setControls()
...
@@ -184,6 +184,8 @@ void Foam::Time::setControls()
int
oldPrecision
=
precision_
;
int
oldPrecision
=
precision_
;
int
requiredPrecision
=
-
1
;
int
requiredPrecision
=
-
1
;
bool
found
=
false
;
bool
found
=
false
;
word
oldTime
(
timeName
());
for
for
(
(
precision_
=
maxPrecision_
;
precision_
=
maxPrecision_
;
...
@@ -194,6 +196,14 @@ void Foam::Time::setControls()
...
@@ -194,6 +196,14 @@ void Foam::Time::setControls()
// Update the time formatting
// Update the time formatting
setTime
(
startTime_
,
0
);
setTime
(
startTime_
,
0
);
// Check that the time name has changed otherwise exit loop
word
newTime
(
timeName
());
if
(
newTime
==
oldTime
)
{
break
;
}
oldTime
=
newTime
;
// Check the existence of the time directory with the new format
// Check the existence of the time directory with the new format
found
=
exists
(
timePath
(),
false
);
found
=
exists
(
timePath
(),
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment