Hi,

I am trying to solve this resolvent formulation

I have (iw-L) ready from matrix transformation from https://github.com/FreeFem/FreeFem-sources/blob/develop/examples/hpddm/navier-stokes-2d-SLEPc-complex.edp. but I don’t know how to get J’ J to solve the minimum eigenvalues, where J’ is the complex conjugate. Can someone help me with that.

Thanks

======================================================================

varf vJ([u1, u2, p], [v1, v2, q]) = int2d(Th)(

(UgradV(uc, u) + UgradV(u, uc))’ * [v1, v2]

+ nut * (grad(u1)’ * grad(v1) +

grad(u2)’ * grad(v2))

- p * div(v)

- div(u) * q - omega * u1 * v1 - omega * u2 * v2)

+ on(1, 3, 4, 5, u1 = 0, u2 = 0);

{

matrix Loc = vJ(Wh, Wh);

J = Loc;

}

varf vM([u1, u2, p], [v1, v2, q]) = int2d(Th)(

(u1 * v1 + u2 * v2) * wu1) ;

matrix Loc = vM(Wh, Wh);

Mat M(J, Loc, clean = true);

int nev = 1;

complex[int] val(nev); // array to store eigenvalues

Wh[int] def(vec)(nev); // array to store eigenvectors

complex s = 0;

string params = "-eps_tol 1.0e-11 -eps_nev " + nev + " " +

"-eps_type krylovschur -st_type sinvert " +

“-eps_target " + real(s) + “+” + imag(s) + “i”+

" -eps_smallest_magnitude”;

int k = EPSSolve(J, M, vectors = vec, values = val, sparams = params);

===============================================================