<div class="gmail_quote">On Mon, Nov 21, 2011 at 09:00, Thomas Witkowski <span dir="ltr">&lt;<a href="mailto:Thomas.Witkowski@tu-dresden.de">Thomas.Witkowski@tu-dresden.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have to multiple two matrices, one is implicitly defined by a KSP, the other one is explicitly assembled. So when using KSPSolve(), it must be called for each column of the second matrix? This seems not to be very efficient as I thought the matrices are stored row wise? Is there a way to get the columns of a SEQAIJ matrix?</blockquote>
</div><br><div>In this context, I think it is easier to store the matrix as a collection of column vectors, but you can also use MATDENSE. This thing isn&#39;t sparse (and it wouldn&#39;t do you any good anyway; there are few algorithms that can solve sparse right hand sides and there isn&#39;t much point because the solutions would still be dense).</div>