Dear getfem users,I am still trying to use gf_global_function with the Matlab interface. It seems not possible to use gf_global_function under the Matlab interface without using levelset (but it is possible in C++) and I try to understand how it works.
I try a (new) stupid example to understand :
m = gfMesh('cartesian', 0:1, 0:1); % Unit square with only one element.
gf = gfGlobalFunction('parser', '1'); % Global function is 1.
ls = gfLevelSet(m, 1);
ls.set('values', 'x-2.'); % With this levelset p(x, y) < 0 inside the
domain.
mls = gfMeshLevelSet(m);
mls.set('add', ls);
mfg = gfMeshFem('global function', m, ls, {gf});
mils = gf_mesh_im('levelset', mls, 'outside', gf_integ('IM_QUAD(3)'));
volume = gf_asm('volumic', m.get('cvid'), 'V(#1)+=comp(Base(#1))(:)',
mils, mfg); % I integrate my global function over the whole domain.
As my global function is 1 over the domain (and the mesh contains only one element), I thought that I would obtain the area of the domain but I just got zero. What is wrong?
Thank you in advance for your advice, Best regards, Ronan
<<attachment: ronan_perrussel.vcf>>
_______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
