github eriksen-lab/opentrustregion v2.0.0
OpenTrustRegion v2.0.0 release

latest release: v2.0.1
6 months ago

Changelog

Release includes PRs 12, 14, 15, 16, 19, 21, 22, 23, 24, 25, 26


Interface breaking changes

  • Centralized settings objectsPR 21: Centralized Settings Types for Solver and Stability Check
    solver and stability_check now accept a single settings object (solver_settings_type / stability_settings_type) instead of long optional argument lists. Initialize via provided init helpers and pass the object across language boundaries.

  • Callback signatures & integer error codesPR 12: Modified callback functions to enable return of error code
    Callbacks now return integer status codes (0 = success) and must write outputs into caller-provided buffers (pointer-in/out, C-style). Python and C interfaces were updated to match.

  • Memory ownership & optional kappaPR 14: Improved memory handling
    Variable-size arrays are heap-allocated; the library prefers caller-provided buffers (zero-copy), otherwise it allocates temporaries and frees them. stability_check only writes kappa if caller supplies memory (pass NULL/omit if not needed).

  • Solver/diag keyword change & reproducibilityPR 23: Add subsystem and diagonalization solver keywords and random seed argument for stability check
    Boolean solver-selection flags were replaced by explicit string keywords (subsystem_solver, diag_solver) and seed was added to control random trial vectors for stability check.


Migration checklist

  1. Adopt settings objects (PR 21)

    • Fortran: create and init() solver_settings_type / stability_settings_type and pass them to the routines.
    • C: use solver_settings_init() / stability_settings_init() helpers.
    • Python: use SolverSettings() / StabilitySettings().
  2. Update callbacks (PRs 12, 14, 26)

    • update_orbs must write grad and h_diag in-place and return an integer status.
    • hess_x must write into hx and return an integer status.
    • precond must write into precond_residual and return an integer status.
    • obj_func returns an integer status.
  3. Handle kappa explicitly (PR 14)

    • If you need the descent direction, allocate and pass kappa. If not, omit or pass NULL/None.
  4. Replace solver booleans with strings (PR 23)

    • Use subsystem_solver = one of: "davidson", "jacobi-davidson", "tcg".
    • Use diag_solver = one of: "davidson", "jacobi-davidson".
  5. Rebuild C/C++ callers and update packaging (PRs 24, 26)

    • Rebuild against the new header; adjust code where void* fields were replaced by typed function-pointer fields.
    • If supplying custom BLAS/LAPACK, set INTEGER_SIZE in CMake; update downstream packaging for the new library-name suffixes.
      
Error codes follow the library's structured scheme (origin + error number). For precise usage examples in Fortran, C, and Python, please refer to the updated README.md included in this release.

Other changes

  • PR 15 — Change CMake project name and change handling of binary files for system tests.
  • PR 16 — CMake: Add BUILD_SHARED_LIBS and BUILD_TESTS options.
  • PR 19 — Alphabetize unit tests (corresponds to test ordering).
  • PR 22 — Add reference to README.
  • PR 24 — Improved CMake library names, versioning and BLAS/LAPACK handling (INTEGER_SIZE, LIB_SUFFIX, VERSION/SOVERSION).
  • PR 25 — Support for Installed, Editable, and Development (CMake) Python Usage.
  • PR 26 — The public C header was refactored for stronger typing (function-pointer fields replace some void*) and the CMake build system was refactored.


Don't miss a new opentrustregion release

NewReleases is sending notifications on new releases.