getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Reduction matrix and getfem_interpolation.h


From: Yves Renard
Subject: Re: [Getfem-users] Reduction matrix and getfem_interpolation.h
Date: Wed, 11 Jul 2012 16:54:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Dear Torquil,

You are perfectly right, there is an error in getfem_interpolation.h. On
line 98, "mf.nb_dof()" has to be replaced by
"mf.nb_basic_dof()" as you reported.

Thank you for this bug report. I commit the change on the svn repository
of Getfem.

Yves.


Le 10/07/2012 20:08, Torquil Macdonald Sørensen a écrit :
> Hi!
>
> I'm starting to wonder if there is a bug in getfem_interpolation.h. Of
> course, it could be my own lack of knowledge about how to use getfem,
> but I thought I'd mention it here.
>
> In a nutshell, I wonder if it should not say "mf.nb_basic_dof()"
> instead of "mf.nb_dof()" on line 98 in
> getfem_interpolation.h, in interpolation_function__? Or mf.nb_dof()
> instead of mf.nb_basic_dof() on line 179 in interpolation_function?
>
> I've tried to implement a reduction matrix to reduce #dofs from 441 to
> 121 on a 2d mesh consisting of 10x10 squares. I'v used
> FEM_STRUCTURED_COMPOSITE(FEM_QK(2,1),2), and then defined a reduction
> matrix that will reduce the #dofs.
>
> But when I want to implement Dirichlet boundary conditions, I have the
> code:
>
> std::vector<bgeot::scalar_type> F(mf.nb_dof());
> getfem::interpolation_function(mf, F, sol_f);
>
> which was taken from a tutorial example I think. It doesn't work, nor
> does
>
> std::vector<bgeot::scalar_type> F(mf.nb_basic_dof());
> getfem::interpolation_function(mf, F, sol_f);
>
> The runtime error message in both cases was:
> terminate called after throwing an instance of 'gmm::gmm_error'
>   what():  Error in /usr/include/getfem/getfem_interpolation.h, line 99 :
> Dof vector has not the right size
>
> In getfem_interpolation.h, it seems to me that a new, and larger,
> vector V is defined on line 179. This vector is larger than
> mf.nb_dofs(), in fact the size is mf.nb_basic_dof(). But on line 98
> its size is compared to mf.nb_dofs(), which always fails when the
> reduced #dofs are fewer than the original #dofs.
>
> Or I have not understood how to use "interpolation_function" together
> with a reduction matrix :-)
>
> Hope this is understandable. If not, I'm more than willing to provide
> more info if needed. Btw, the program works fine without a reduction
> matrix.
>
> Best regards,
> Torquil Sørensen
>
>
> _______________________________________________
> 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

---------




reply via email to

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