Skip to content

Commit 4f38178

Browse files
Update begrun.cpp
1 parent c62ba3f commit 4f38178

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/begrun.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ int main(int argc, char** argv) {
2626
<< "NN N NN EEEEE XXX TTT \n"
2727
<< "NN NNN EE XX XX TTT \n"
2828
<< "NN NN EEEEEEE XX XX TTT \n"
29-
<< "Newtonian EXact Trajectories\n";
29+
<< "Newtonian EXact Trajectories\n";
30+
// Print the Splash
3031

31-
if (argc != 4)
32+
if (argc != 4) // if there wasnt 3 of parameters set, throw a cerr
3233
{
3334
std::cerr << "No parameter file specified\n";
3435
std::cerr << "Usage: next <initial.txt> <dt> <dump_interval>\n";
@@ -54,15 +55,15 @@ int main(int argc, char** argv) {
5455
if (simTime >= nextDump)
5556
{
5657
std::string out = "dump_" + std::to_string(step) + ".vtk";
57-
SaveVTK(particles, out);
58-
std::cout << "Wrote: " << out << "\n";
58+
SaveVTK(particles, out); // save the file
59+
std::cout << "Wrote: " << out << "\n"; // say you wrote the file
5960
nextDump += cacheInterval;
6061
}
6162

62-
step++;
63+
step++; // increase counter by 1
6364
}
6465

65-
return 0;
66+
return 0; // end if succeeded, well probably not it never ends anyway.
6667

6768

6869
}

0 commit comments

Comments
 (0)