Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
da7480f6
Commit
da7480f6
authored
Jan 16, 2020
by
Lukas Bentkamp
Browse files
Bugfix: Do not attempt to read the velocity field when it's not written.
parent
166ea083
Changes
1
Hide whitespace changes
Inline
Side-by-side
cpp/full_code/kraichnan_field.cpp
View file @
da7480f6
...
@@ -104,26 +104,17 @@ int kraichnan_field<rnumber>::initialize(void)
...
@@ -104,26 +104,17 @@ int kraichnan_field<rnumber>::initialize(void)
DEBUG_MSG
(
"Coefficient: %g
\n
"
,
DEBUG_MSG
(
"Coefficient: %g
\n
"
,
this
->
spectrum_coefficient
);
this
->
spectrum_coefficient
);
this
->
generate_random_velocity
();
// is this the first iteration?
// is this the first iteration?
if
((
this
->
iteration
==
0
)
and
(
this
->
output_velocity
==
1
))
if
((
this
->
iteration
==
0
)
and
(
this
->
output_velocity
==
1
))
{
{
// if yes, generate random field and save it
// if yes, generate random field and save it
this
->
generate_random_velocity
();
this
->
velocity
->
io
(
this
->
velocity
->
io
(
this
->
get_current_fname
(),
this
->
get_current_fname
(),
"velocity"
,
"velocity"
,
this
->
iteration
,
this
->
iteration
,
false
);
false
);
}
}
else
{
// if not, read the random field that exists in the checkpoint file
this
->
velocity
->
io
(
this
->
get_current_fname
(),
"velocity"
,
this
->
iteration
,
true
);
}
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
...
...
Write
Preview
Supports
Markdown
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