[petsc-users] Forming a matrix from vectors
Eda Oktay
eda.oktay at metu.edu.tr
Mon Feb 17 02:35:59 CST 2020
Hello all,
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.
Vec *V;
VecDuplicateVecs(vr,nev,&V);
for (i=0; i<nev;i++){
ierr = EPSGetEigenpair(eps,i,&kr,NULL,V[i],NULL);
}
Thanks!
Eda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200217/1ecd3ef5/attachment.html>
More information about the petsc-users
mailing list