If A and B are vectors, then you can use VecPointwiseMult for A.*B and VecPointwiseDivide for A./B. For matrices,pointwise multiplication and division functions are not provided in Petsc. One possible way to do A.*B and A./B for matrices is to loop through the columns of the matrices,call MatGetColumnVector for each column of matrix A,B and then call VecPointwiseMult/VecPointwiseDivide.
Shri ----- Original Message ----- From: "Yujie" <[email protected]> To: "PETSc users list" <petsc-users at mcs.anl.gov> Sent: Wednesday, October 28, 2009 10:21:34 AM GMT -06:00 US/Canada Central Subject: Does PETSc have some functions like A.*B, A./B in Matlab? Dear PETSc Developers, Does PETSc provide some functions, like A.*B, A./B in Matlab? Thanks a lot. Regards, Yujie
