Oops. I missed that I was on the hook for code review. I've merged and pushed to develop. Thanks for pointing this out.
On Jan 16, 2014, at 2:44 PM, Charles Reid <[email protected]> wrote: > Hi all, > > FYI, I just noticed this was also reported as an issue on Trac > (http://matforge.org/fipy/ticket/658) and solved at a better/more upstream > location > (http://matforge.org/fipy/changeset/2f015d7d9acd1953462a93a52e03c18303c8e2a6/fipy). > But it doesn't look like that's made it to the main git branch yet, it's in > its own branch. > > > > > Charles > > > On Thu, Jan 16, 2014 at 11:24 AM, Charles Reid <[email protected]> wrote: > Hi, > > I noticed that if I am solving a vector equation, running sweep() instead of > solve() raises an error from the pysparseMatrix class's multiplication > method. I looked deeper into the error and found that the problem was that a > square matrix and a vector, both with the same number of total elements, were > being multiplied together, but failing because their sizes were mismatched. > The patch contains 5 lines that add a simple conditional, to check if the > square matrix and the vector have the same number of elements, in which case > I use ravel() on the square matrix (which expands the matrix into a vector). > > Using the ravel() method requires assuming that matrix-vector conversions > using C (row-major) order are correct. I verified this was the case using a > very simple problem. Any thoughts on whether this is a safe assumption > generally? > > I've attached a patch file, which can be applied from in the fipy/ source > directory: > > cd fipy/ > patch -p1 < pysparseMatrix.patch > > > Charles > > > > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
