Skip to content

Improve adjoint test hygiene #3278

Description

@smartalecH

The tests we have for the adjoint solver (unit tests, end2tests, etc) are in a rough state. Here are some things we can do to improve things:

  • Document which end2end cases we have as a matrix (e.g. objective quantity vs simulation dimensionality vs design grid dimensionality vs boundary condition). Use this to pick up on gaps.
  • Consolidate end2end tests to a single driver that loop over different simulation/optimization setups. This makes it easier to audit the code. The above test matrix makes this really intuitive.
  • Establish a unified tolerance for all single precision tests and all double precision tests (which, of course, are different from each other). Over the years, these tolerances have drifted higher and higher with the addition of new features as we continued to introduce more and more bugs.
  • Clearly outline all the unit tests we have for the python front-end vs the C++ backend (in particular, the recombination step in meepgeom.cpp).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions