Skip to content

One way to do it: remove the old derivative outputs, local solvers and deprecated declarations #235

Open

Description

@petlenz

Part of #237.

Why

After #221 there are two ways to do most things:

Task Old way New way
Tangent hand-written outputs (tangent, damaged_tangent, d_damage, d_equivalent_strain, in 10 headers) declared partials + derivative()
Local system solvers/vector_newton.h, solvers/backward_euler.h with name-convention residuals and Jacobians system with unknowns and residuals
Fixed point residual_source in material_point (deprecated, driver/material_point.h:47,158) converges() / picard system
Declarations the [[deprecated]] forms in core/material_base.h:90-249 (#190) add_callback(...).reads(...)

Two paths double the tests and the documentation. They also leave material authors unsure which path is current.

Design (in this order; each step is its own PR)

  1. Hosts read derivatives.
  2. Deprecate the old outputs with [[deprecated]] accessors for one tagged release. Each material keeps computing them only while a host still reads them.
  3. Remove them. The hand-written tangents survive only as test references (moved into tests/), so the 1e-12 comparisons keep an independent reference.
  4. Remove the local solvers. vector_newton and backward_euler are first wrappers over system (part of Migrate materials to declared partials and residual systems #219), then deprecated, then removed. The same applies to residual_source.
  5. Remove the deprecated declaration API #190: remove the deprecated declaration API once numsim_material target: emit add_callback(...).reads(...) instead of the deprecated add_output callback numsim-codegen#161 has landed.

Tests

  • Every test that read an old output reads the derivative instead, or moves to the test reference.
  • The report CSVs are byte-identical, since the tangent check now comes from derivative().
  • grep -rn "deprecated" include/ is empty at the end.

Depends on

Out of scope

Second derivatives (isotropic_damage keeps its split callbacks).

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