getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] gradient interpolation matrix


From: EDOUARD OUDET
Subject: Re: [Getfem-users] gradient interpolation matrix
Date: Thu, 16 Nov 2017 17:28:52 +0100 (CET)

Dear Yves,

The solution you proposed worked perfectly to interpolate gradient on points pts:

GU = md.interpolation('Grad_u', pts.T, tmesh)

I understood that localization of the points in the mesh is a time consuming and I read in the documentation the optional fields "int region[, int extrapolation[, int rg_source]]]".
I wonder if giving the element number in which the point pts is located could speed up the call ? If it is the case, how should I definie these optional fields: I only get empty answer array with a call like

GU = md.interpolation('Grad_u', pts.T in the element num, tmesh, num)

Thanks,

best.

--
Edouard Oudet : http://www-ljk.imag.fr/membres/Edouard.Oudet/
IMAG - Bureau 164
700 avenue Centrale
38400 Saint Martin d'Hères
+33 (0)4 57 42 17 71  (office LJK)
+33 (0)4 79 68 82 06  (home)


De: "Yves Renard" <address@hidden>
À: "EDOUARD OUDET" <address@hidden>
Cc: "getfem-users" <address@hidden>
Envoyé: Dimanche 5 Novembre 2017 16:11:07
Objet: Re: [Getfem-users] gradient interpolation matrix

Dear Edouard,

No, unfortunately, there is no function in Getfem that gives the interpolation matrix for a derivative of a field. You can perform the interpolation itself with the high level generic assembly, but it does not give an interpolation matrix. If you want to interpolate on a discontinuous fem, you can instead compute the projection matrix which will be easy to invert because it will be local (a small matrix on each element). Then if your projection is exact, then the inverse will also be an interpolation matrix ...

Best regards,

Yves.



----- Original Message -----
From: "EDOUARD OUDET" <address@hidden>
To: address@hidden
Sent: Friday, November 3, 2017 11:43:34 AM
Subject: [Getfem-users] gradient interpolation matrix

Dear all,
Is there a way with the getfem python interface to assembly the matrix associated to the interpolation matrix of a first derivative evaluation of a fem (or its full gradient).
I found

Mi = asm_interpolation_matrix(MeshFem mf, vec pts)

for the evaluation of the function u = MeshFem mf itself, but I was not able to identify the relevant generalization for derivatives of u: \partial u_x, \partial u_y, etc.
Thanks a lot for this great library,
best, Edouard.

--
Edouard Oudet : http://www-ljk.imag.fr/membres/Edouard.Oudet/
IMAG - Bureau 164
700 avenue Centrale
38400 Saint Martin d'Hères
+33 (0)4 57 42 17 71 (office LJK)
+33 (0)4 79 68 82 06 (home)

reply via email to

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