getfem-users
[Top][All Lists]
 Dear Marianne, It is not very clear for me what is the problem you try to solve. The term Grad(uf) is a priori a vector one since the term uf is a scalar one. May be you can clarify a bit. Moreover, in order to solve an eigenvalue problem, you have to perform the assembly of the stiffness matrix, the mass matrix and then search the eigenvalues. Best regards, Yves. Le 05/03/2015 08:47, Marianne Petersen a écrit : Dear community, I am trying to implement the following problem Laplacian eigenvalue problem: \int Grad() dA = \lambda \int u*f dA with Dirichlet boundary conditions and a Neumann condition. Since this problem is observed on a mesh with n Triangles The equation is to be solved on every triangle and the corresponding fem. Is my idea of using the following _expression_ for the lhs correct?     getfem::mesh mymesh; // finite element method     getfem::mesh_fem mf(mymesh);     getfem::pfem pf = getfem::fem_descriptor("FEM_PK(2,1)");     mf.set_finite_element(mymesh.convex_index(), pf); // integration method     getfem::mesh_im intm(mymesh);     getfem::pintegration_method ppi = getfem::int_method_descriptor("IM_TRIANGLE(7)");     intm.set_integration_method(ppi);     getfem::ga_workspace workspace;     getfem::size_type nbdof = mf.nb_dof();     getfem::base_vector U(nbdof);     // left hand side: A     workspace.add_fem_variable("u", mf, gmm::sub_interval(0, nbdof), U);     workspace.add_fem_variable("f", mf, gmm::sub_interval(0, nbdof), U);     workspace.add_expression("f.Test_u", intm);     getfem::base_vector skalprod(nbdof);     workspace.set_assembled_vector(skalprod);     workspace.assembly(0);     workspace.clear_expressions();     workspace.add_fem_variable("skp", mf, gmm::sub_interval(0, nbdof), skalprod);     workspace.add_expression("Grad_skp", intm);     getfem::model_real_sparse_matrix A(nbdof, nbdof);     workspace.set_assembled_matrix(A);     workspace.assembly(2); I am really unsure about how to implement this problem. Do you have an idea? Or should I use the "bricks"? Although I am not sure either if this would work.. How can I make sure that the problem is for real implemented on each trinagle of the mesh? Thank you already very much in advance :) Best regards Marianne Petersen _______________________________________________ Getfem-users mailing list address@hidden https://mail.gna.org/listinfo/getfem-users  -- Yves Renard (address@hidden) tel : (33) 04.72.43.87.08 Pole de Mathematiques, INSA-Lyon fax : (33) 04.72.43.85.29 20, rue Albert Einstein 69621 Villeurbanne Cedex, FRANCE http://math.univ-lyon1.fr/~renard ---------