Skip to content

yield_anchor follow-ups from the #475 review: snes_max_it latch resurrect, side-attribution docstring, small validation gaps #490

Description

@lmoresi

Follow-ups from the #475 adversarial review (none blocked the merge; all probed at the PR head):

  1. _snes_max_it_user latch never clears (petsc_generic_snes_solvers.pyx ~6428-6443): set snes_max_it=200 → delete the option → the next solve correctly uses the default, but the one after resurrects the stale 200. The latch should clear when the key is absent from the options DB. (Still strictly better than the pre-yield_anchor: which side of exact Min the soft-min yield law sits on #475 always-clobber, hence follow-up not blocker.)
  2. Docstring attributes the Min side to the smoother family (~8810): "powermean (default, approaches the yield surface from below) or sqrt (from above)" — the side belongs to yield_anchor, not the family; under the default onset anchor both families sit below Min near yield. Also anchor is forwardable via homotopy_options (**options passthrough) but missing from the documented key list.
  3. Uncommented except Exception: return default at the options read (~6433) — Charter swallowed-exception rule: state what is being swallowed and why.
  4. yield_anchor setter orphans a pre-built YieldHomotopyControl's δ atom (constitutive_models.py:1030-1039) — diagnostics-only exposure since yield_continuation refuses anchor= with a ready-made control; either rebind or document.
  5. Test name: test_yield_anchor_keeps_onset_stress_exact exercises anchor="yield"; "onset" is the other anchor. Rename. A march-level test driving anchor="yield" through JIT/solve would also pin what is currently only probe-verified.
  6. viscosity_min_rounding setter unvalidated (constitutive_models.py:1192-1195) — accepts negative/wrong-sign values silently.

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