Skip to content

Commit 4d57a79

Browse files
committed
fix number of output steps
1 parent 493326c commit 4d57a79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tutorial/heat2d/cpp/simulation/heatSimulation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
8787

8888
io.write(0, ht, settings, mpiHeatTransferComm);
8989

90-
for (unsigned int t = 1; t <= settings.steps; ++t)
90+
for (unsigned int t = 1; t < settings.steps; ++t)
9191
{
9292
if (rank == 0)
9393
std::cout << "Simulation step " << t << "\n";

Tutorial/heat2d/fortran/simulation/heatSimulation.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ program heat_transfer
108108
call heatEdges(curr)
109109
call io_write(0,curr)
110110

111-
do tstep=1,steps
111+
do tstep=1,steps-1
112112
if (rank==0) print '("Simulation step ",i4)', tstep
113113

114114
do it=1,iters

0 commit comments

Comments
 (0)