[petsc-users] algorithm to get pure real eigen valule for general eigenvalue problem(Non-hermitian type)

Jose E. Roman jroman at dsic.upv.es
Mon Apr 15 11:33:45 CDT 2013


El 15/04/2013, a las 18:02, Zhang Wei escribió:

> Hi Jose.
> In pa-> MatVecMult(Mat A, Vec x , Vec y). I do three things
> 1) copy the  x as  initial value for my fvm code:
> 
> const PetscScalar *px;
>    PetscScalar       *py;
>    PetscErrorCode    ierr;
> 
>    PetscFunctionBegin;
>    ierr = VecGetArrayRead(x,&px);CHKERRQ(ierr);
>    ierr = VecGetArray(y,&py);CHKERRQ(ierr);
> 
>    if(loopID>0){
>      copySLEPcDataToField(&px[0]);
>    } 
> 2) In  fvm solver, where I implement first order eular method, fourth order RK method and several others.
> 3) after several timestep. I do sent the field to slepc:
> 
>   copyFieldToSLEPcData(&py[0]);
>    VecAssemblyBegin(y);
>    VecAssemblyEnd(y);
> 
> From the those files I saved during the time stepping (all those methods), the  fvm solver works fine for me. They gives expected things.
> Actually the numerical methods and accuracy in pa-> MatVecMult  doesn't affect the results that much. At least it the shape of eigen vectors do not change with those factors.

I am not an expert in the application, but my understanding is that stability analysis must be based on eigenvalues of the linearized operator A, but if you embed the initial value solver then you will get approximations of eigenvalues of exp(t*A), and that may not be what you want. Maybe you should have a look at a related reference, e.g http://www.mech.kth.se/~shervin/pdfs/2012_arcme.pdf
See also references under "Computational Fluid Dynamics" in http://www.grycap.upv.es/slepc/material/appli.htm

Jose



More information about the petsc-users mailing list