[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Implementing a Laplacian Eigenvalue problem

From: Yves Renard
Subject: Re: [Getfem-users] Implementing a Laplacian Eigenvalue problem
Date: Fri, 06 Mar 2015 09:37:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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,


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(<f,u>) 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)");

    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.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);

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


  Yves Renard (address@hidden)       tel : (33)
  Pole de Mathematiques, INSA-Lyon             fax : (33)
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE


reply via email to

[Prev in Thread] Current Thread [Next in Thread]