getfem-users
[Top][All Lists]
Advanced

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

[Getfem-users] Interpolation on 1 point


From: Sébastien Janas
Subject: [Getfem-users] Interpolation on 1 point
Date: Thu, 10 Mar 2011 09:06:17 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

Hi all,

I have a 1D solver and want to interpolate my solution on 1 point with getfem functions. I think I need to use the "getfem::interpolation()" function but I don't understand exactly how.

I have

a mesh : getfem::mesh mymesh;
a fem   : getfem::mesh_fem mf(mymesh);
a solution vector : std::vector<double> X(mf.nb_dof());

To interpolate, I need to create a mesh with only one point in it

getfem::mesh point_mesh;
std::vector<bgeot::size_type> ind(1);
ind[0] = point_mesh.add_point(bgeot::base_node(val, 0.0, 0.0));


but then I have to link a fem on it, but which kind should I use ????

the next step would be something like

getfem::mesh_fem mf_interp(point_mesh);
mf_interp.set_finite_element(getfem::fem_descriptor(?????????));
std::vector<double> S(1);
getfem::interpolation(mf,mf_interp,X,S);

Thanks a lot for your help,

Sébastien



reply via email to

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