getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Interpolation


From: Yves Renard
Subject: Re: [Getfem-users] Interpolation
Date: Wed, 7 Mar 2007 09:55:19 +0100
User-agent: KMail/1.7.2

Le Lundi 05 Mars 2007 20:35, Giovani a écrit :
> Dear getfem++ users:
>
> I'm working on a dynamic problem that involves 2 different meshes:
>
>     Mesh "S" (for Small), whose nodes equations of movement I'm solving
> in a non-standard way, and
>
>     Mesh "L" (for Large), which is both coarser and larger than mesh S.
> The mesh S is 'inside' the mesh L. By inside I do not mean that mesh L
> has holes; the purpose of mesh S is to represent extra degrees of
> freedom of the same structure that's also represented by mesh L.
>
> What I need to do is interpolate the accelerations from the nodes of
> mesh S (which are known quantities) to the nodes of mesh L. This
> interpolated data is used to calculate the movement of mesh L.
>
> One important detail here is that the interpolation should be applied in
> a consistent way across space. That means that in regions where S and L
> overlap the interpolation would be applied; in places where only L
> exists, no interpolation should be done, and those nodes of L would have
> no movement.
>
>
> The following piece of code is being used to achieve this
>
>        ////////////////////////START OF CODE////////////////////////
>        (here comes a function that updates the data on the S_ax, S_ay
> and S_az vectors )
>
>        //Declaring the matrix N that evaluates the shape functions of L
>        //in the coordinates of the nodes of S:
>
>        gmm::dense_matrix< double > N ( S_fem->nb_dof(), L_fem->nb_dof()  );
>        getfem::interpolation( *L_fem, *S_fem, N);
>
>        //Now for each direction, interpolate the data from mesh S to mesh
> L:
>
>         gmm::mult( gmm::transposed(N), S_ax , L_ax);
>         gmm::mult( gmm::transposed(N), S_ay , L_ay);
>         gmm::mult( gmm::transposed(N), S_az , L_az);
>
>        (here comes a function that uses the values in L_ax, L_ay and
> L_az to calculate L's movement)
>        ////////////////////////END OF CODE////////////////////////
>

The interpolation functions are tested in tests/test_interpolation.cc and 
seems to be stable. So, I do not see what is not working in your example 
(except the fact that you would better use a sparse matrix than a dense one).
Of course, gmm::mult( gmm::transposed(N), S_ax , L_ax); is not strictly 
speaking an interpolation of the solution on the fine mesh onto the coarse 
mesh, but in multigrid approach, such a operation is used and this should not 
affect nodes that are far from the overlapping region.

Could you send, say the smallest piece of compilable code which allows to see 
this error ?

Best regard,

Yves.

-------------------------------------------------------------------------
  Yves Renard (address@hidden)       tel : (33) 04.72.43.80.11
  Pole de Mathematiques, INSA de Lyon          fax : (33) 04.72.43.85.29
  Institut Camille Jordan - CNRS UMR 5208
  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]