Re: [petsc-users] Matrix-Free J*v in PETSc

2025-07-07 Thread Jed Brown
Using MatShell is the standard method. Note that MatShell allows exposing other "matrix operations", such as producing a diagonal or other preconditioning ingredients. Art writes: > Hi all, > > I am integrating a stiff system of ODEs/PDEs using PETSc TS (typically with > BDF or other implicit

[petsc-users] Matrix-Free J*v in PETSc

2025-07-07 Thread Art
Hi all, I am integrating a stiff system of ODEs/PDEs using PETSc TS (typically with BDF or other implicit time-stepping schemes), and I would like to exploit the fact that I can efficiently compute the action of the Jacobian on a vector (Jv) without assembling the full Jacobian matrix. Since for a

[petsc-users] Petsc/Jax no copy interfacing issues

2025-07-07 Thread Alberto Cattaneo
Greetings. I hope this email reaches you well. I’m trying to get JAX and PETSc to work together in a no-copy system using the DLPack tools in both. Unfortunately I can’t seem to get it to work right. Ideally, I’d like to create a PETSc vec object using petsc4py, pass it to to a JAX object without c