getfem-users
[Top][All Lists]

## Re: [Getfem-users] periodic boundary conditions example and source term

 From: Yves Renard Subject: Re: [Getfem-users] periodic boundary conditions example and source term question Date: Fri, 9 Apr 2010 09:20:00 +0200 User-agent: KMail/1.9.9

```On vendredi 9 avril 2010, Kajetan Sikorski wrote:
> Yves,
>
> Thanks a lot. I've beet trying to implement what you suggested but I
> just can't seem to figure it out. If I could get some help on getting
> this code snippet working I think I could go from there. Right now
> it's throwing an error that about vGrad having the wrong number of
>
>
> gf_workspace('clear all');
> m = gf_mesh('cartesian',linspace(0,1,10),linspace(0,1,10));
> femu = gf_mesh_fem(m,2);
> femd = gf_mesh_fem(m,2,2);
>
> gf_mesh_fem_set(femu,'fem',gf_fem('FEM_QK(2,2)'));
> gf_mesh_fem_set(femd,'fem',gf_fem('FEM_QK(2,2)'));
>
> mim = gf_mesh_im(m, gf_integ('IM_GAUSS_PARALLELEPIPED(2,10)'));
>
> S = gf_mesh_fem_get(femd, 'eval', {'9.*x.^3+cos(y)' '8.*y.^2'
>
> V = gf_asm('volumic' , 'S=data(qdim(#1),#1);V(#1)+=comp(vGrad(#1))
> (i,j,i,j).S(i,j)', mim, femu, S);

Yes, I made a mistake. With the context you give, the right expression should
be:

(:,i,j,k,i,j).S(k)', mim, femu, femd, S);

(mBase is for matrix base -> 2x2)

Yves.

--

Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard

---------

```