## [Libmesh-users] Question about Dirichlet BC imposed by penalty method

 [Libmesh-users] Question about Dirichlet BC imposed by penalty method From: David Xu - 2006-06-22 21:58:52 ```Hi, I know there are already many examples at libmesh web site using penalty method to impose Dirichlet BC. However none of of them is generalized eigenvalue problem related and most of them have vector as the RHS. My problem is to solve the eigenvalue of a stationary 3D Schrodinger equation. The element loop for the mass and stiffness matrices is the following: ------------------------------------------------------------------------------------------------------------------------------------------ for (unsigned int qp=0; qpn_sides(); side++) if (elem->neighbor(side) == NULL) { const std::vector >& phi_face = fe_face->get_phi(); const std::vector >& dphi_face = fe_face->get_dphi(); const std::vector& JxW_face = fe_face->get_JxW(); const std::vector& qface_point = fe_face->get_xyz(); fe_face->reinit(elem, side); for (unsigned int qp=0; qp

 [Libmesh-users] Question about Dirichlet BC imposed by penalty method From: David Xu - 2006-06-22 21:58:52 ```Hi, I know there are already many examples at libmesh web site using penalty method to impose Dirichlet BC. However none of of them is generalized eigenvalue problem related and most of them have vector as the RHS. My problem is to solve the eigenvalue of a stationary 3D Schrodinger equation. The element loop for the mass and stiffness matrices is the following: ------------------------------------------------------------------------------------------------------------------------------------------ for (unsigned int qp=0; qpn_sides(); side++) if (elem->neighbor(side) == NULL) { const std::vector >& phi_face = fe_face->get_phi(); const std::vector >& dphi_face = fe_face->get_dphi(); const std::vector& JxW_face = fe_face->get_JxW(); const std::vector& qface_point = fe_face->get_xyz(); fe_face->reinit(elem, side); for (unsigned int qp=0; qp