[Top][All Lists]

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

[Getfem-users] gf_global_function Matlab interface.

From: Ronan Perrussel
Subject: [Getfem-users] gf_global_function Matlab interface.
Date: Thu, 14 Oct 2010 15:06:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

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,

Attachment: ronan_perrussel.vcf
Description: Vcard

reply via email to

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