Skip to content

Commit

Permalink
check for positive chkpt_interval before output (#892)
Browse files Browse the repository at this point in the history
helpful fix for openFAST
  • Loading branch information
mbkuhn authored Aug 3, 2023
1 parent 1e4a325 commit c2f4324
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 c2f4324

Please sign in to comment.