## Re: [Libmesh-users] Libmesh penalty method for Generalized Eigenvalue problem

 Re: [Libmesh-users] Libmesh penalty method for Generalized Eigenvalue problem From: Ondrej Certik - 2006-07-05 14:41:46 ```> Did you impose penalty in the element matrices (Ke, Me) or in the final > Matrices A and B after they are assembled from Ke and Me? to final (global) matrices of course. Ondrej ```

 Re: [Libmesh-users] Libmesh penalty method for Generalized Eigenvalue problem From: David Xu - 2006-07-03 19:03:41 Attachments: Message as HTML ```Did you impose penalty in the element matrices (Ke, Me) or in the final Matrices A and B after they are assembled from Ke and Me? I tried it in the element matrices Ke and Me with same large penalty value. The results didn't show degenerated eigenvalues and all the eigenvalues I obtained are the same as the ones when I didn't enforce penalty BC. When I use libmesh to solve a generalized system with known eigenvalues, I always get some extra eigenvalues. I don't know if it's because I didn't properly apply the penalty method or the solver (ARPACK) is not stable. The code I use to impose penalty at Ke, Me is the following: double penalty = 1.e10; for(unsigned int s=0; sn_sides(); s++) { if(elem->neighbor(s) == NULL) { AutoPtr node(elem->side(s)); for(unsigned int n=0; nn_nodes(); n++) { if(elem->node(n) == node->id()) { Ke(n,n) += penalty; Me(n,n) += penalty; } } } } -David On 6/30/06, Ondrej Certik wrote: > > Yes, because In this way you effectively exclude those nodes from the > eigenvalue problem. > > On 6/30/06, David Xu wrote: > > Does this work for setting function value u=0 on the boudary of a 3D > domain > > (cube)? > > Just impose different large number on the diagonal of Ke and Me after > they > > are assembled? > > > > Thanks. > > > > > > On 6/30/06, Ondrej Certik wrote: > > > you need to set the value of (i,i) element of both Ke, and Me matrices > > > to some (big value). this will however generate a degenerate > > > eigensolutions of the eigenvalue 1. so you need to put different large > > > numbers to Ke and Me to avoid that. > > > See you, > > > O. > > > > > > On 6/30/06, David Xu wrote: > > > > Dear Ondrej, > > > > > > > > I know you were using libmesh for generalized eigenvalue problems. I > was > > > > wondering if you could give me some tips on how to impose simple > > Dirichlet > > > > boundary condition (u=0) on the stiffness and mass matrices (Ke, > Me) in > > > > libmesh. There are some examples of using penalty method on > libmesh > > > > website, but they are limited to solving linear systems and the RHS > is > > > > usually a vector. So I got stuck on this issue. If you could point > me to > > > > some reference, that would be great too. > > > > > > > > Thanks a lot, > > > > > > > > David > > > > > > > > ```
 Re: [Libmesh-users] Libmesh penalty method for Generalized Eigenvalue problem From: Ondrej Certik - 2006-07-05 14:41:46 ```> Did you impose penalty in the element matrices (Ke, Me) or in the final > Matrices A and B after they are assembled from Ke and Me? to final (global) matrices of course. Ondrej ```