|
From: | Zhenghuai Guo |
Subject: | Re: [Getfem-users] mesh_deformation |
Date: | Mon, 18 Mar 2019 09:11:04 +0000 |
Hi Andriy, Thank you for the advice. I am having a look at it. In the meantime, I would like to show you what I do and hope you can help me solve one more related problem. To get the displacement values is easy as plain_vector U(mf_u.nb_dof()); gmm::copy(model.real_variable("u"), U); I then get the total dof of the mesh_fem mfu by size_type mfudof = mf_u.nb_dof(); Then I think I can get the coordinates of each dof by for (scalar_type ndof = 0.; ndof < mfudof; ndof += 1){ coordinate= mf_u.point_of_dof(ndof); } Then I can relate the displacement values to the geometrical coordinates, because I know which dofs corresponding to which the geometrical coordinates. Could you please help and advise to me about the following
for (scalar_type ndof = 0.; ndof < mfudof; ndof += 1){ coordinate= mf_u.point_of_dof(ndof); cout << coordinate <<endl
; } It shows that It appears that it show duplicated coordinates as you can see every two coordinates are the same. Is this because that the mesh is two dimension and each node has two dofs ā one for x and the other for y?
Thank you very much. Regards Zhenghuai Guo From: Andriy Andreykiv <address@hidden> Dear Zhenghuai Guo, Probably you can try to do this with the methods from
http://getfem.org/userdoc/interMM.html. In particular, have a look at Interpolation on a cloud of points: void getfem::ga_interpolation_mti(md, expr, mti, result, extrapolation = 0, rg=mesh_region::all_convexes(), nbpoints = size_type(-1)); I assume you can create a cloud of points from a single point. But the above is a "heavy" tool which involves interpolation. Of course if you know that you have a node in that specific location, you can extract the degrees of freedom from the displacement vector. So, let me know what you're using it for. Best regards, Andriy On Sat, 16 Mar 2019 at 10:27, Zhenghuai Guo <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |