Skip to content

Commit

Permalink
Add dn output logic to opmd outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 29, 2024
1 parent 3147043 commit 6bec73e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/outputs/parthenon_opmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,15 @@ void OpenPMDOutput::WriteOutputFile(Mesh *pm, ParameterInput *pin, SimTime *tm,
// advance output parameters if this is not a triggered (now or final) output
if (signal == SignalHandler::OutputSignal::none) {
output_params.file_number++;
output_params.next_time += output_params.dt;
pin->SetInteger(output_params.block_name, "file_number", output_params.file_number);
pin->SetReal(output_params.block_name, "next_time", output_params.next_time);
if (output_params.dt > 0.0) {
output_params.next_time += output_params.dt;
pin->SetReal(output_params.block_name, "next_time", output_params.next_time);
}
if (output_params.dn > 0) {
output_params.next_n += output_params.dn;
pin->SetInteger(output_params.block_name, "next_n", output_params.next_n);
}
}
}

Expand Down

0 comments on commit 6bec73e

Please sign in to comment.