getfem-users
[Top][All Lists]
Advanced

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

Re: interpolate displacement result on a set of points


From: Konstantinos Poulios
Subject: Re: interpolate displacement result on a set of points
Date: Wed, 26 Jan 2022 22:25:29 +0100

yes, have you tried it? It should work, at least if pos has the right shape (maybe you need to transpose it).

Otherwise you can also do:

pts = [[x1,x2,...],[y1,y2,...],[z1,z2,...]] # or read pts from a file in this format
sl_tracked = gf.Slice("points", mesh, pts)
...
u = gf.compute_interpolate_on(mfub, md.variable("ub"), sl_tracked)

This option is faster if the gf.compute_interpolate_on needs to be called many times.

BR
Kostas

On Wed, Jan 26, 2022 at 10:10 PM Lesage,Anne Cecile J <AJLesage@mdanderson.org> wrote:

Dear all

 

Imagine I read a set of points that are not on my mesh nodes nor on my dof nodes

 

   file  = open("pos.txt","r")

   pos = np.loadtxt(file,dtype=float)

 

how do I interpolate my displacement results on them?

 

Something like

tracked_u = gf.compute_interpolate_on(mfub, md.variable("ub"), pos)?

 

thank you

regards

Anne-Cecile

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

reply via email to

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