[petsc-users] Questions about matrix operation in petsc4py

Guangpu Zhu zhugp01 at nus.edu.sg
Mon Oct 18 09:03:58 CDT 2021


Dear Sir/Madam,

         My name is Guangpu Zhu, I met a problem when I tested the matrix operation in petsc4py.  As the following code shows, I first set all elements of the matrix to 2.0. Then, I try to set the diagonal elements of the matrix to 1.0.  However, I surprisingly found that the diagonal elements are still 2.0.  This question has confused me for a few days, so I am writing to you for help or suggestions. Attached is the test code I used. I would greatly appreciate it if you can kindly reply to me. Thank you in ad

[cid:8c058bba-e6bb-4dc5-ad0a-596e3150b21d]

---
Guangpu Zhu

Research Associate,  Department of Mechanical Engineering

National University of Singapore

Personal E-mail: zhugpupc at gmail.com

Phone: (+65) 87581879
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211018/1161a8ee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18308 bytes
Desc: image.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211018/1161a8ee/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Petsc_Test.tar.gz
Type: application/gzip
Size: 1248 bytes
Desc: Petsc_Test.tar.gz
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211018/1161a8ee/attachment-0001.bin>


More information about the petsc-users mailing list