<div dir="ltr"><div dir="ltr">On Mon, Feb 17, 2020 at 4:24 AM Jose E. Roman <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I would use MatDenseGetColumn() and VecGetArrayRead() to get the two pointers and then copy the values with a loop.<br></blockquote><div><br></div><div>I would do as Jose says to get it working. After you verify it, we could show you how to avoid a copy.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Jose<br>
<br>
> El 17 feb 2020, a las 9:35, Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr" target="_blank">eda.oktay@metu.edu.tr</a>> escribió:<br>
> <br>
> Hello all,<br>
> <br>
> I am trying to form a matrix whose columns are eigenvectors I have calculated before U = [v1,v2,v3]. Is there any easy way of forming this matrix? My matrix should be parallel and I have created vectors as below, where nev i s the number of requested eigenvalues. So each V[i] represents an eigenvector and I should form a matrix by using V.<br>
> <br>
> Vec *V;<br>
> VecDuplicateVecs(vr,nev,&V); <br>
> for (i=0; i<nev;i++){<br>
> ierr = EPSGetEigenpair(eps,i,&kr,NULL,V[i],NULL); <br>
> }<br>
> <br>
> Thanks!<br>
> <br>
> Eda<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>