<p><br></p><p>Hello!</p><p> Recently, I am writing a program using Petsc, and I encouter a questions. </p><p> the question is as follow:</p><p> 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.</p><p> 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?</p><p> I have tried to implement it by using the Petsc's function-VecGetValues(). </p><p> But in parallel program, some erros like "undeclared here (not in a function)" always appear. </p><p> I like the Petsc very much! Thank you for your work!</p><p> &n
bsp; Merry Christmas and Happy New Year!</p><p>yours sincely.</p><p> <br></p><span></span><br><br><br>