[petsc-users] Elementwise pow/exponential-function on PETSc-vectors and matrices

Roland Richter roland.richter at ntnu.no
Tue Jan 5 09:24:16 CST 2021


Hei,

is there a function to square/cube etc. each element of a matrix or
vector in PETSc? It is rather useful for things like intensity
calculations (I = |E|^2), and should work also for distributed matrices.

Thanks!

Regards,

Roland Richter



More information about the petsc-users mailing list