Skip to content

Commit

Permalink
Merge pull request CEED#1452 from CEED/jrwrigh/stats_overwrite
Browse files Browse the repository at this point in the history
fluids: Stats don't overwrite solution on first-step failure
  • Loading branch information
jrwrigh authored Jan 27, 2024
2 parents b698cfb + 6852f6f commit cce69b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/fluids/src/turb_spanstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ PetscErrorCode TSMonitor_TurbulenceStatistics(TS ts, PetscInt steps, PetscReal s
PetscFunctionBeginUser;
PetscCall(TSGetConvergedReason(ts, &reason));
// Do not collect or process on the first step of the run (ie. on the initial condition)
if (steps == user->app_ctx->cont_steps && reason == TS_CONVERGED_ITERATING) PetscFunctionReturn(PETSC_SUCCESS);
if (steps == user->app_ctx->cont_steps) PetscFunctionReturn(PETSC_SUCCESS);

PetscBool run_processing_and_viewer = (steps % viewer_interval == 0 && viewer_interval != -1) || reason != TS_CONVERGED_ITERATING;

Expand Down

0 comments on commit cce69b9

Please sign in to comment.