## Re: [Libmesh-users] interpolation

 Re: [Libmesh-users] interpolation From: John Peterson - 2007-03-21 17:47:23 ```That is a linear search. MeshFunction has logarithmic search performance because it uses a quad/octtree, which is exactly what Derek was talking about. -John li pan writes: > It's easy to find which element contains this point. I > just go over all the elements and call > elem.contains=5Fpoint(p). >=20 > pan >=20 >=20 > --- Derek Gaston wrote: >=20 > > If you're going to be finding which element contains > > the point and > > then trying to get a value at that point... you > > really are best off to > > use MeshFunction. That's pretty much what it was > > meant to do, and > > will do a fairly efficient search (well, better than > > linear in most > > cases)... > >=20 > > But it does come with the caveats that Roy > > mentioned... > >=20 > > Derek > >=20 > > On 3/21/07, li pan wrote: > > > I'm using tetrahedron. The variable is > > displacement. I > > > interpolate the point displacement in two steps: > > > first, figure out the element which contains this > > > point. Second, using linear interpolation > > > u=3Dshape1*u1+shape2*u2+shape3*u3+shape4*u4. > > > Shape(number) are the shape functions, u(number) > > are > > > the node displacements. > > > > > > best > > > > > > pan > > > > > > > > > --- Paulo Correia wrote: > > > > > > > Hi all, > > > > > > > > Is there any function to interpolate the > > solution on > > > > a given point (say in an element basis)=3F > > > > > > > > Thank you, > > > > > > > > Paulo Correia > > > > Mathematics Department > > > > University of =C9vora > > > > Portugal ```