getfem-users
[Top][All Lists]
Advanced

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

[Getfem-users] Question concerning reordering in mesh_fem; Patch for ge


From: Mirko Windhoff
Subject: [Getfem-users] Question concerning reordering in mesh_fem; Patch for getfemmatlab.tex
Date: Thu, 29 Jan 2009 16:36:06 +0100

Dear Mailing list, dear Yves Renard, dear Julien Pommier,

I want to use getfem to compute the gradient of a scalar field given
on the nodes of a 3D-mesh (tetraeders) using the Matlab interface. I
have a problem with the reordering of the nodes in the mesh_fem
object.

I do the following in Matlab:
% ------------------
% import the mesh
m=gfMesh('import', 'gmshv2', 'meshfile.gmsh');
% get the points
points=gf_mesh_get(m,'pts')';
% calculate the scalar field at the node positions
% (using a FEM-calculation, that does not use getfem yet)
U=calculate_scalar_field(points);

% create a mesh_fem for the gradient computation
mf=gfMeshFem(m,1);
% 3 dimensions, linear interpolation
set(mf, 'fem', gfFem('FEM_PK(3,1)'));

% the following does not give the right result because the convexes
% and nodes are reordered somehow with the cuthill_mckee_on_convexes
% method and U is supposed to be a field on the mesh_fem and not
% on the mesh as in my case - is that right?
DU=gf_compute(mf, U, 'gradient', mf);

% So I need something like:
V=reorder_according_to_the_mesh_fem_order_of_points(U, mf);
DV=gf_compute(mf, V, 'gradient', mf);
% ------------------

Is there a possibility to reorder my scalar field or to associate the
values with the nodes in the mesh_fem? I could not find an appropriate
function, that gives the ordering used in mesh_fem. I'm quite new to
getfem.

I prepared a little patch for the getfemmatlab.tex, correcting some
spelling errors (see attachment), you might want to apply it.
And a suggestion: I would appreciate a getfem-users wiki or even
better if your website would run on a wiki (using for example
http://dokuwiki.org/) and I could provide help with that, if you want.

Thank you for your time,
Mirko Windhoff
http://kyb.mpg.de/~mwindhoff

Attachment: getfemmatlab.tex-mirko.diff
Description: Binary data


reply via email to

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