getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Interpolation problem in Matlab interface


From: Yves Renard
Subject: Re: [Getfem-users] Interpolation problem in Matlab interface
Date: Thu, 9 Feb 2017 16:10:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1



Dear Walker,

I do not understand what you mean by " I get the identically zero solution". Do you mean that D is zero ?
But if D is zero, then there is no chance that "gf_compute(mfu,D,’interpolate on’,nodes);" to give other
result than zero.

May be if you attach the simplest program you can that does not work, it could help.

Yves.



Le 08/02/2017 à 20:51, Walker, Ryan T. (GSFC-615.0)[UNIV OF MARYLAND] a écrit :
Hi all,

I’m working on plate bending (i.e., bilaplacian) for a problem where I have observed data for the stiffness D.

I’m setting D using gf_mesh_fem_get to evaluate the Matlab interpolation function interp2 on the lagrangian mesh.
This produces an identically zero solution, as if D = 0 everywhere. However, when I use gf_compute to evaluate D on the solution nodes, I get the values I was expecting from the interpolation.

The simplest thing I can do to get this problem is modifying demo_bilaplacian.m to include this:

% create “data” on coarse grid
[xx,yy] = meshgrid(0:0.1:0.4,0:0.1:1.2);
foo = 1 + xx.^2 + yy.^2; 
% trying to interpolate onto the lagrangian mesh mfd
getD = @(x,y,z) interp2(xx,yy,foo,x,y);
D = gf_mesh_fem_get(mfd,'eval',{getD});
gf_model_set(md, 'add initialized fem data', 'D', mfd, [D]);

When I do this, I get the identically zero solution. But if I then do
nodes = gf_mesh_get(mfu,’pts’);
D_pts = gf_compute(mfu,D,’interpolate on’,nodes);
I get the values of D I was expecting.

If I use the same formula for D directly without interpolating like this:
getD = @(x,y,z) 1 + x.^2 + y.^2;
D = gf_mesh_fem_get(mfd,'eval',{getD});
gf_model_set(md, 'add initialized fem data', 'D', mfd, [D]);
I get the right solution (and the right values of D on the solution nodes).

What am I doing wrong here?

Thanks,
Ryan



**********************************************
Dr. Ryan T. Walker
Earth System Science Interdisciplinary Center
University of Maryland at College Park
Cryospheric Sciences Laboratory, Code 615
NASA Goddard Space Flight Center
8800 Greenbelt Road
Greenbelt, MD 20771 USA






_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users


-- 

  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]