getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] How to get a solution at given point


From: Yves Renard
Subject: Re: [Getfem-users] How to get a solution at given point
Date: Fri, 30 Apr 2010 15:25:31 +0200
User-agent: KMail/1.9.9

On vendredi 30 avril 2010, Roman Putanowicz wrote:
> > Dear All,
> >
> > Apparently a simple question but I could not find a simple answer for it:
> > I would like to evaluate solution to my problem a given point in space.
>
> Answering my own post: the class that solves the above problem is
> getfem::interpolator_on_mesh_fem.
>
> I have overlooked it in the reference documentation.
>
> Its usage is roughly equivalent to:
>
>  getfem::base_node A; bgeot::sc(A)=0.01,0.01;
>  plain_vector T;
>  gmm::resize(T, mf_T.nb_dof());
>  gmm::copy(model.real_variable("T"), T);
>  getfem::interpolator_on_mesh_fem itpr(mf_T, T);
>  getfem::base_vector solA;
>  getfem::base_matrix gradA;
>  itpr.eval(A, solA, gradA);
>
> > I tired to use some slicer object but cannot figure out the pattern of
> > its usage. I would appreciate any hint.
>
> The question still remains about slicers. Is it possible to use them for
> this purpose (especially if we have a cloud of points instead of a
> single point)?
>
> Regards,
>
> Roman

If you have a cloud of points, you can use the function

  template<typename VECTU, typename VECTV>
  void interpolation(const mesh_fem &mf_source, mesh_trans_inv &mti,
                     const VECTU &U, VECTV &V, int extrapolation = 0,
                     dal::bit_vector *dof_untouched = 0)

defined in getfem_interpolation.h
The role of argument mti is to store the cloud of points.

Regards,

Yves.


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  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]