Hello!

       Recently, I am writing a program using Petsc, and I encouter a questions.

       the question is as follow:

       In matlab, if a=[1,2,3,4,5], b = [2,2,2,2,2], we can use c=a.*b to get c 
= [2,4,6,8,10]. This operation is called array multiply in matlab.

       But in Petsc' Vec operations, I can't find a counterpart. So, I want to 
kown how can I  get c = a.*b in Petsc. Can you help me?

       I have tried to implement it by using the Petsc's 
function-VecGetValues().

       But in parallel program, some erros like "undeclared here (not in a 
function)" always appear. 

       I like the Petsc very much! Thank you for your work!

       Merry Christmas and Happy New Year!

yours sincely.

      



Reply via email to