Dear Jehanzeb,

You have to use a volumic assembly . An example  for the matrix of the  
Laplace operator is

gf_asm('volumic',['a=data(#2); ',...
         
'M(#1,#1)+=sym(comp(Grad(#1).Grad(#1).Base(#2))(:,i,:,i,j).a(j))'],  
mim, mf, mf_data, A);

A matrix for a mixed term can be obtained in a same way with two mf :

  gf_asm('volumic', 'M(#1,#1)+=comp(Grad(#1).Base(#2))(:,i,i,:)', mim,  
mf1, mf2);

where mf1 should be a vectorial fem (for more details see the Getfem++  
documentation).

Yves.


Jehanzeb Hameed <[email protected]> a écrit :

> I had a look at the Stokes example. It uses model bricks to form the
> system. From the documentation, it seems using model bricks implicitly
> chooses the bilinear variational form. I would like to define my own
> bilinear form to form the matrix, in which I can define terms like
> div(q) + c u  (q = vector, c = constant, u = another variable besides
> q). How would I go about this?
>
> Thanks,
> -Jehanzeb
>
> On Sun, Jul 5, 2009 at 11:05 AM, Iago  
> Barbeiro<[email protected]> wrote:
>> Dear Jehanzeb,
>>
>> I think you may start by looking the Stokes example.
>> It deals with two variables (û=uî+v^j and p) and has the term div(û).dp.
>> Bon courage!
>>
>> Iago
>>
>> On Sun, Jul 5, 2009 at 6:07 AM, Jehanzeb Hameed <[email protected]>
>> wrote:
>>>
>>> Hello,
>>>
>>> Is there a simple example in getfem where assembly is for two
>>> variables? E.g. we may want to solve for "u" and "q" (with an equation
>>> defining the relationship between u and q) . Such a case arises in
>>> mixed methods.  Is there an example for mixed-poisson problem
>>> somewhere? I know mixed-elasticity problem is given with getfem, but I
>>> am not familiar with that particular problem.
>>>
>>> In particular, I am not sure how to refer to "q" and "u" in
>>> generic_assembly routines. Say my weak form involves div(q) . v ? How
>>> will I write this in "assem.set" routine? (I am guessing thats what I
>>> am supposed to do).
>>>
>>> Thanks,
>>> -Jehanzeb
>>>
>>> _______________________________________________
>>> 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
>




_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to