From 85b10c2f62241e7a48c0f59713bb925821bd645a Mon Sep 17 00:00:00 2001 From: vijay gopal chilkuri Date: Wed, 21 Dec 2016 11:41:15 +0100 Subject: [PATCH] added calculation of norm of resulting eigenvector --- src/ex1.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/ex1.c b/src/ex1.c index 8d3c3a9..af1e530 100644 --- a/src/ex1.c +++ b/src/ex1.c @@ -12,6 +12,7 @@ int main(int argc,char **argv) EPS eps; /* eigenproblem solver context */ EPSType type; PetscReal error,tol,re,im; + PetscReal norm; PetscScalar kr,ki,value[700]; Vec xr,xi; PetscInt i,Istart,Iend,col[700],maxit,its,nconv,countcol; @@ -204,6 +205,26 @@ int main(int argc,char **argv) PetscViewerDestroy(&viewer); } + /* + * now analyzing the eigenvector + */ + + if (nconv>0) { + + for (i=0;i