Skip to content

Commit

Permalink
check for positive chkpt_interval before output
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn committed Jul 28, 2023
1 parent 9cf678b commit 70cda38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion amr-wind/wind_energy/actuator/turbine/fast/FastIface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ void FastIface::advance_turbine(const int local_id)
fast_func(FAST_OpFM_Step, &fi.tid_local);
}

if ((fi.time_index / fi.num_substeps) % fi.chkpt_interval == 0) {
if (fi.chkpt_interval > 0 &&
(fi.time_index / fi.num_substeps) % fi.chkpt_interval == 0) {
char rst_file[fast_strlen()];
copy_filename(" ", rst_file);
fast_func(FAST_CreateCheckpoint, &fi.tid_local, rst_file);
Expand Down

0 comments on commit 70cda38

Please sign in to comment.