<div dir="ltr"><div>Hello,<br>I am trying to work on getting to know PETSc by doing an example myself. Basically, I am trying to solve Ax = b using KSP where A is 1D laplacian operator (tri-diag banded matrix with {-1,2,-1} on the diagonal), and b is the forcing term, so it's just basically a simple 1-D poisson equation. <br>
<br></div>The size of the matrix is n by n, and the vectors have size n. The issue I am getting is that when I change n, I get different answer for the vector x. When I plot the result x, the shape still looks like the shape of the potential I expect, except it's scaled somehow, and the scale is related to n, somehow. <br>
<br>I am at a loss in trying to figure out what would cause this, so any help would be appreciated. I've attached the code (fortran) I have.<br>Thank you.<br><br>AC <br></div>