[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] Interpolation on 1 point
From: |
Roman Putanowicz |
Subject: |
Re: [Getfem-users] Interpolation on 1 point |
Date: |
Thu, 10 Mar 2011 10:53:25 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
> 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.
Not necesarilly - another solution is to use getfem::interpolator_on_mesh_fem
This structure has a function eval which interpolates the solution and
its gradient.
The code could approximately look like:
----------------------------------------------------------------------
getfem::mesh_fem femT;
std::vector<bgeot::scalar_type> T;
/*
...
setup femT and the rest of the problem, solve it and then
extract the DOFs value into vector T.
...
*/
getfem::base_vector sol; // interpolated solution at probePoint
getfem::base_matrix grad; // iterpolated solution gradient
getfem::base_node probePoint;
/*
...
set up coordinates of the probePoit */
...
*/
getfem::interpolator_on_mesh_fem itpr(femT, T);
itpr.eval(probePoint, sol, grad);
---------------------------------------------------------------------
Regards,
Roman
--
Roman Putanowicz, PhD < address@hidden >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034