# Eigenvectors in the vectorial case

**URL:** https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885
**Category:** General Discussion
**Created:** [July 8, 2022, 1:55pm UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885 "2022-07-08T13:55:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alexandru](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Alexandru](https://community.freefem.org/u/Alexandru)
#### Post date: [July 8, 2022, 1:55pm UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885/1 "2022-07-08T13:55:53Z")

</div>

Dear all,

In 2D elasticity, if Th is the mesh on a domain, then an eigenvector is an array in “fespace Vh(Th, [P2,P2])”.  
If nev is an integer and “Vh[int] eVu,eVv” is intended to store the eigenvectors the line

ncev = EigenValue(A, B, value=ev, vector=[eVu,eVv], tol=1e-18, maxit=0, ncv=0);

gives an error message, while

ncev = EigenValue(A, B, value=ev, vector=eVu, tol=1e-18, maxit=0, ncv=0);

works.

The question is : what exactly contains eVu ? and how can we recover from eVu the two components of the eigenvector ?

Thank you,  
Alex

---

<div class="post-metadata">

### Author: ![zhaog6](https://avatars.discourse-cdn.com/v4/letter/z/4af34b/32.png) [@zhaog6](https://community.freefem.org/u/zhaog6)
#### Post date: [July 15, 2022, 3:43am UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885/2 "2022-07-15T03:43:05Z")

</div>

There are some FreeFEM syntax errors and the correct part of code is as follows:

```nohighlight
...
Vh[int] [eVu, eVv](nev);
...
EigenValue(A, B, value=ev, vector=eVu, ...);

```

In addition, the ARPACK interface (`EigenValue`) is very old and SLEPc (`EPSSolve`) is suggested.

---

<div class="post-metadata">

### Author: ![Alexandru](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Alexandru](https://community.freefem.org/u/Alexandru)
#### Post date: [July 15, 2022, 3:10pm UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885/3 "2022-07-15T15:10:52Z")

</div>

Thank you ! Actually, this is not mentioned in the FreeFEM documentation…  
Do you have a simple example which do not use MPI ?

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [July 15, 2022, 3:12pm UTC](https://community.freefem.org/t/eigenvectors-in-the-vectorial-case/1885/4 "2022-07-15T15:12:54Z")

</div>

You’ll have to use `FreeFem++-mpi`, but you can use a single process, which will not require changes in your code. And I don’t know what you are talking about, but SLEPc is indeed mentioned in the documentation: [PETSc and SLEPc](https://doc.freefem.org/documentation/petsc/index.html).
