-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating outputs file when simulation starts at non-zero time #60
Allow creating outputs file when simulation starts at non-zero time #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the code
Hi, thanks for the comment. I reflected your suggestions. |
You have the wrong file name in ScalarWritwr.cpp. You refer to
probe.file_name in the if() statement.
Always check the code compiles before committing and pushing.
…On Thu 12. Oct 2023 at 15:26, Jeena Yun ***@***.***> wrote:
Hi, thanks for the comment. I reflected your suggestions.
—
Reply to this email directly, view it on GitHub
<#60 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADO6RJ2GXUYQDXE67OZSUJLX7BVB3ANCNFSM6AAAAAA56IGZUE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I followed the convention used inside the file ScalarWriter.cpp. The variable name pointing to the file name is already |
There is no reference to anything called |
Oh I see what you mean. That was a typo, sorry. |
Attempting to compile the code would have exposed this typo….
…On Thu 12. Oct 2023 at 17:46, Jeena Yun ***@***.***> wrote:
Oh I see what you mean. That was a typo, sorry.
—
Reply to this email directly, view it on GitHub
<#60 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADO6RJYM5SVSRZF4XZ3SKXLX7CFMZANCNFSM6AAAAAA56IGZUE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You're right. Just double-checked by compiling the code, and everything works fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution Jeena.
src/io/ScalarWriter.cpp
Outdated
@@ -19,7 +20,12 @@ void ScalarWriter::write(double time, mneme::span<double> scalars) const { | |||
out_->open(file_name_, false); | |||
write_header(); | |||
} else { | |||
out_->open(file_name_, true); | |||
if (std::filesystem::exists(probe.file_name_)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JeenaYun This line needs to refer to file_name_
not probe.file_name_
. probe.file_name_
is not even defined.
Look at the original code or the lines below...
The changes are made to allow the creation of probe outputs when the simulation starts at non-zero time. This feature might be useful in the case of loading checkpoints.