[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] Problem using GradGT in assembling boundary condition
From: |
Yves Renard |
Subject: |
Re: [Getfem-users] Problem using GradGT in assembling boundary condition |
Date: |
Mon, 19 Jul 2010 11:31:38 +0200 |
User-agent: |
KMail/1.13.2 (Linux/2.6.32-22-server; KDE/4.4.2; x86_64; ; ) |
Dear Cedric,
Yes, GradGT is the representation of K, the gradient of the geometric
transformation. And yes, it is a matrix, so there is two indices.
If you want to have a tangent unit vector from K, it is not so easy because
you have to multiply K by a vector which is tangent in the reference
configuration and then you have to divie it by its norm.
In 2D, you would better use Normal() which represent a unit normal vector.
Something like the following should work for your problem :
"t=comp(Grad(#1).Normal().Base(#1)); M(#1,#1)+=t(:,1,2,:)-t(:,2,1,:);"
Yves.
On lundi 19 juillet 2010, Cédric Venet wrote:
> Hi,
>
> The usage of GradGT is not documented and it is never used. From the
> documentation, GradGT should be the representation of K the gradient of
> the geometric transform. I suppose that it takes two "arguments". First
> the line number (ie the dimension in the problem/real/mesh space) and
> then the column number (ie the dimension in the reference space).
>
> I would like to assemble the condition (on the boundary of a 2D mesh so
> on 1D element):
>
> integral of ( du/dt * v )
>
> with t the tangent vector. I tried numerous formulation around this one:
>
> "M(#1,#1)+=sym(comp(Grad(#1).GradGT().Base(#1))(:,i,i,k,:))"
>
> but none seems to work. for me, i should be summed on {0,1} and k on {0}
> thus giving the formula:
>
> integral of ( (du/dx*dx/dt + du/dy*dy/dt) * v )
>
> the error is in getfem_mat_elem.cc line 364. (in the function
> expand_product_daxpy)
> it seems that the vector t is too small and the code try to dereference
> the iterator pt after the end of t.
>
> I tried to understand how t was sized, wihtout much success. I see that
> adjust_sizes is called numerous times. the last call before the crash is
> with the "array" [4 2 2 2 1] in argument. (my mesh use quad).
>
> Can you help me?
>
> Regards,
>
> Cédric
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
--
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
---------