On Jan 6, 2011, at 5:24 PM, S V N Vishwanathan wrote: >>>> 2. Since each vec1,vec2,... is the same size, this is likely to >>>> produce poor memory performance. If you care about speed, I suggest >>>> interlacing the values in vec1,...,veck. In that case, you can create >>>> an MAIJ matrix that acts on this "multi-vector". > >> You most definitely want to use the MAIJ. MAIJ does not "repeat" X, it >> uses the >> original matrix passed in but does efficient multiple matrix-vector products >> at the same time. > > Is there any place to read up about MAIJ matrices. I read the manual > pages but they were rather cryptic. Perhaps some example code?
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex48.c.html is the only example that uses. You can also look at its source code (linked directly from the manual page) to see what it does. > > vishy > > >
