Thanks Konstantinos It does work That leverages a lot of my postprocess analysis comparing simulations and surgery data Plus I can perform a lot of math on the results with numpy in the python script
From: Konstantinos Poulios <[email protected]> Sent: Wednesday, January 26, 2022 3:25 PM To: Lesage,Anne Cecile J <[email protected]> Cc: [email protected] Subject: [EXT] Re: interpolate displacement result on a set of points WARNING: This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe. 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 <[email protected]<mailto:[email protected]>> 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. 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.
