Dear Veronique, using the Matlab Interface I used the following workaround to map my variable fi on a mesh to mesh_fem order:
% get mesh to mesh_fem order map cvids=gf_mesh_fem_get(mf, 'convex_index'); m_pid_cvid=gf_mesh_get(m, 'pid from cvid', cvids); mf_dof_cvid=gf_mesh_fem_get(mf, 'dof from cvid', cvids); m_mf_map(m_pid_cvid(:))=mf_dof_cvid(:); % reorder fi to mesh_fem order fi_mf=zeros(1,size(fi_mesh,1); fi_mf(m_mf_map(1:size(fi_mesh,1)))=fi_mesh(1:size(fi_mesh,1)); % now we can use fi_mf on the mesh_fem to calculate for example the gradient: Dfi=gf_compute(mf, fi_mf, 'gradient', mf); Here is what Ives suggested to me in that case: http://www.mail-archive.com/[email protected]/msg00387.html Using the c++ library you may be have to do something similar... Regards, Mirko 2009/7/27 Véronique Pham <[email protected]>: > Hi everyone, > > Here is another wondering about the library. > > I have a mesh file with values at each node. I can load the mesh into a > getfem::mesh but when I apply P1 shape function to the linked > getfem::mesh_fem, the node are renumberer. How can I use the value in the > file in this case? > I have seen interpolate function and interpolate mesh but they do not > correspond to what I want to do. > Should I hack the lib to make the renumbering optional, or to save it > somewhere? or do you see a better method? > I suppose I could also traverse all the element and try to find the > renumbering afterward by matching coordinate, but it seen a waste of > computationnal time. > This seems like a standard operation to me, surely there is already > something available? > > Thanks for your help. > Véronique. > > _______________________________________________ > Getfem-users mailing list > [email protected] > https://mail.gna.org/listinfo/getfem-users > > _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
