Skip to content

After solve(), psi_star[0] holds the new stress on the Stokes family but the previous step's stress on NavierStokesSLCN #742

Description

@lmoresi

Measured on the Maxwell shear box (test_1059's _maxwell_shear) with the nodal and integration-point histories, ETD-1: after k solves, DFDt.psi_star[0] evaluated at the origin is exact(k) under uw.systems.Stokes and exact(k-1) under uw.systems.NavierStokesSLCN. The physics is right in both (the trace-back solver's curve is the exact Maxwell curve, shifted by one step in what the level holds), but the convention differs: the Stokes family commits the solved flux into level 0 in _stress_history_post_solve, while the trace-back Navier-Stokes solver records it at the next carry (update_pre_solve with store_result left on).

It matters for anything that reads the history after a solve: diagnostics (the cylinder script's stress peak is one step stale on that solver), checkpoints written after a step (a restart from the trace-back solver's history resumes one step behind the velocity), and any test that compares the two solvers on the level's value. The test reads the constitutive flux on the trace-back solver for now, with a pointer here. One convention should win; the Stokes family's (level 0 = the stress the step produced) is the one the checkpoint semantics assume.

Found while fixing #741.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions