I was wondering about a simple way of imposing Dirichlet boundary condition (u(x,y,z)=0) on a 3D cubic domain with penalty method for Generalized Eigenvalue problem (GEHP) such as the one shown in example 17? What confuses me is that GEHP has mass matrix at RHS instead of vector. Should I impose penalty on Ke and Me in the element matrice loops or on the final assembled system matrices A and B? And how should I do it...?

Thanks a lot,

David