getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Another question...


From: Yves Renard
Subject: Re: [Getfem-users] Another question...
Date: Thu, 6 Sep 2007 14:12:03 +0200
User-agent: KMail/1.9.5

Le jeudi 6 septembre 2007 13:42, vous avez écrit :
> Yves Renard ha scritto:
> > to build a vectorial finite element, you just have to do a
> > mf_data.set_qdim(2)
> > "qdim" is the dimension of the vector field represented.
> > The degrees of freedom are still stored in a vector, not in a matrix, but
> > of course having a size multiplied by "qdim". In practice, for a standard
> > Lagrange fem the components are intercaled in the vector (a1a2b1b2c1c2
> > ...).
>
> Thank you for the advice, I'll try also this other way... Just one more
> question, I've seen in the getfem_interpolation.h that it is possible to
> interpolate a given function on a mesh, and also to interpolate in
> different meshes my solution. If I just want to interpolate my solution
> in a point that does not correspond to a node value, what can I do?
> I need a function that given mf_u , U and the coordinates of the point,
> displays the interpolated value of the solution. Does it exist?
> Mattia

Yes, of course. If you want an efficient algorithm, the way to do depends on 
the utilization you have.

case 1 : You already know the element of the mesh where the point is and the 
local coordinate in it. Then, you just have to use the interpolation 
functions of the finite element method (like in the nonlinear term).  

case 2 : You have a lot of points, and you a priori don't known in which 
elements they are. Then you can use the function in getfem_interpolation.h:
getfem::interpolation(const mesh_fem &mf_source, mesh_trans_inv &mti,
                                  const VECTU &U, VECTV &V, bool extrapolation 
= false)
where the object mti has to be initialized with the set of points (an example 
of use is in the file  getfem_interpolation.h itself). Some kdtrees are used 
to accelerate the search.

-- 
Yves.

-------------------------------------------------------------------------
  Yves Renard (address@hidden)       tel : (33) 04.72.43.80.11
  Pole de Mathematiques,                       fax : (33) 04.72.43.85.29
  Institut Camille Jordan - CNRS UMR 5208
  INSA de Lyon, Universite de Lyon
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard
-------------------------------------------------------------------------



reply via email to

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