Skip to content

Conversation

nikolasborrel
Copy link
Contributor

@nikolasborrel nikolasborrel commented Oct 2, 2025

Changes

Check if x0 is None before casting to complex values in function jax_solve(A, b, x0, precond). This can happen when inverse problems are considered and jax_solve(...) is called from

adjoint_vec = linear_solver(A.transpose(), v_vec, None, adjoint_solver_options)

inside def implicit_vjp(...) in solver.py

This is a fix for changes made in #72 implementing support for PETSc with complex number.

@tianjuxue tianjuxue merged commit 791a4ed into deepmodeling:main Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants