How implement ON for an identity matrix?

Dear freefem community,

I try to extract complex eigenvalue for a problem like M X" + C X’ + K X = 0.
It yields to a block matrix like : AG * [X, X’] = lambda* BG* [X,X’]
so that…
matrix mKK,AG,BG;
mKK = (-1)*KK;
AG = [ [mKK, 0], [ 0, Id] ];
BG = [ [ CC, MM], [ Id, 0] ];

I read documentation and we have to include the ON varf in the varf linked to the stiffness matrix = AG. I have already put the ON on the varf corresponding to KK, but how can I implement the equivalent of ON for the matrix Identity (matrix Id, of same dim than KK) ?

Moreover, do you have any advice regarding the TGV parameter or the parameters that should be used in the eigenvalue command ?

Thanks in advance! :slight_smile:

I use the Lanczos method in order to avoid these block matrix (found on a thesis) and yields to a symmetric problem.

But it would be interesting to know what’s the simplest syntax for a ON() on an identity matrix.

Thanks.