Skip to content

Commit

Permalink
Send actual filename to checkpoint creator
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevelder committed May 23, 2024
1 parent d1f17a2 commit 7f207e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glue-codes/openfast-cpp/src/OpenFAST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ void fast::OpenFAST::advance_to_next_driver_time_step(bool writeFiles) {
for (int iTurb=0; iTurb < nTurbinesProc; iTurb++) {
int tStepRatio = time_step_ratio(dtFAST, dtDriver);
if ( (restartFreq_*tStepRatio > 0) && (((nt_global - ntStart) % (restartFreq_*tStepRatio)) == 0 ) && (nt_global != ntStart) ) {
turbineData[iTurb].FASTRestartFileName = " "; // if blank, it will use FAST convention <RootName>.nt_global
turbineData[iTurb].FASTRestartFileName = turbineData[iTurb].outFileRoot + "." + std::to_string(nt_global); // if blank, it will use FAST convention <RootName>.nt_global
FAST_CreateCheckpoint(&iTurb, turbineData[iTurb].FASTRestartFileName.data(), &ErrStat, ErrMsg);
checkError(ErrStat, ErrMsg);
writeRestartFile(iTurb, nt_global);
Expand Down Expand Up @@ -1521,7 +1521,7 @@ void fast::OpenFAST::step(bool writeFiles) {
int tStepRatio = time_step_ratio(dtFAST, dtDriver);
for (int iTurb=0; iTurb < nTurbinesProc; iTurb++) {
if ( (((nt_global - ntStart) % (restartFreq_ * tStepRatio)) == 0 ) && (nt_global != ntStart) ) {
turbineData[iTurb].FASTRestartFileName = " "; // if blank, it will use FAST convention <RootName>.nt_global
turbineData[iTurb].FASTRestartFileName = turbineData[iTurb].outFileRoot + "." + std::to_string(nt_global); // if blank, it will use FAST convention <RootName>.nt_global
FAST_CreateCheckpoint(&iTurb, turbineData[iTurb].FASTRestartFileName.data(), &ErrStat, ErrMsg);
checkError(ErrStat, ErrMsg);
writeRestartFile(iTurb, nt_global);
Expand Down

0 comments on commit 7f207e1

Please sign in to comment.