Skip to content

add_rotated_freeslip_bc(0.0, boundary) raises NotImplementedError: float-zero conds rejected by structural sympy comparison #336

Description

@lmoresi

Found by the Wave E (WE-09) value-first call-site sweep, 2026-07-07.

The zero-datum guard in SNES_Stokes_SaddlePt.add_rotated_freeslip_bc (Wave C shim, #334) uses

if conds is not None and sympy.sympify(conds) != 0:
    raise NotImplementedError(...)

sympy == is structural, so sympy.sympify(0.0) != 0 evaluates True (Float(0.0) is not Integer(0), sympy 1.14.0). Consequence: the canonical value-first call

solver.add_rotated_freeslip_bc(0.0, "Top")

— the exact form the method's own deprecation message recommends ("use add_rotated_freeslip_bc(conds, boundary, ...) with conds=0") — raises NotImplementedError: ... a non-zero wall-normal datum is not implemented, while conds=0 (int) and conds=None work.

Suggested fix: test value semantics, e.g. sympy.sympify(conds).is_zero is not True, plus a regression test with 0.0 (and e.g. sympy.Float(0)).

A TODO(BUG) marker at the guard lands with the Wave E PR (branch feature/wave-e-docs). Per campaign scope discipline the fix is not applied there.

Underworld development team with AI support from Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions