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: Igor Peterlik
Subject: Re: [Getfem-users] How to get a solution at given point
Date: Fri, 30 Apr 2010 10:24:23 +0200

Hello,

thanks for posting the code for obtaining the value of solution in a
given point.
I am going to give it a try.
Nevertheless, I would like to ask, if there is some way how to get a derivative
of the solution in a given point. Just for a verification purposes, I need to
model single tetrahedron (quadratic) and to get the solution and its
derivative in
arbitrary point inside the tetra.

Concerning the slices, I used a slicers some time ago to get a slice
for a Helmholtz problem
(however, it was in some older version of GetFEM, probably 3.2 or so).
Having my problem in object 'p', in my case:

Helmhotlz_problem p;

after assembly and solution of the problem, I used this code to make a slice
in plane given by a point (base_node slice_point;) and
normal (base_node slice_normal;):

getfem::stored_mesh_slice sl;
sl.build(p.mesh, getfem::slicer_half_space(slice_point, slice_normal,
0), p.slRefine);

where p.slRefine determines the density of points in which the slice
is "sampled".
The name function slicer_half_space is self-explaining, I think there
are also other possibilities.
Afterwards, I used VTK export to save the slice:

getfem::vtk_export exp(p.vtkFileName + ".vtk",
p.PARAM.int_value("VTK_EXPORT")==1);
exp.exporting(sl);

Anyway, I am not sure if this can help...


          Igor




On Fri, Apr 30, 2010 at 12:27 AM, Roman Putanowicz
<address@hidden> 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
>
> --
> 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
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
>



reply via email to

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