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
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to