July 6th, 2010, 5:23 pm
I think I have that part figured out. I am now onto a different problem with this solver, related to option 2(treat dirichlet as constants).In the solver I am working on, the sparse matrices are stored in coordinate form. Basically for every row there is a set of coordinates corresponding to the column in the matrix. During the creation of this sparse representation, things are sorted so that for row n, the column access in J is always ascending. That is, for node 441, the J columns corresponding might be 0, 420, 440, 441, 442, 461, 880 or something like that. For some b.c., the case might be that the absolute index of the Z-positive neighbor node might be less than the Y-positive neighbor node value. That is, the column coordinate might *really* be like this : 0, 420, 440, 441, 442, 461, 450but when storing into the sparse format, there is a sort going on, so that for the node, the column cooridnates would be stored0, 420, 440, 441, 442, 450, 461Why would this need to be the case? Why does it matter in the rest of the PCG solver. Seems to me the matrix-vector multiply, and subtraction shouldnt be affected. Yet when I take out the sort, so that the columns are stored the other way - the solver doesnt converge and I get a lof of NaN output.