[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] gf_asm : How to use?
From: |
julien pommier |
Subject: |
Re: [Getfem-users] gf_asm : How to use? |
Date: |
Mon, 16 Jul 2007 13:57:08 +0200 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070604) |
Hi Richard,
Your expression for I1 is the correct one. The first index of a Base(),
vBase(), Grad etc is always the one refering to the corresponding degree
of freedom
a=data(#1) and a=data$1(#1) are equivalent. The '$' is only useful when
you have more than one data argument (for example b=data$2(#1))
The #1 says that the corresponding dimension is the number of degrees of
freedom of the mesh_fem number 1
if U lives on a mesh_fem mf, and a lives on a mesh_fem mfd (a scalar
mesh_fem whose qdim is 1), then the expression for I2 is:
I2 = gf_asm('boundary',1,'u=data$1(#1);a=data$2(#2);
V()+=a(i).u(j).comp(vBase(#1).Base(#2).Normal())(j,k,i,k);',mim,mf,mfd,U,A);
In order to understand that, just write
a(x) = sum(a_i * Phi_i(x)) with Phi_i(x) being the scalar base
functions of mesh_fem mf1
U(x) = sum(u_j * Psi_j(x)) with Psi_j(x) being the vector base
functions of mf (so Psi_j(x)[k] is one of its components).
Everything that is inside the 'comp' is in the integral, so you have
sum_{i,j,k} a_i * U_j * integral(Phi_i(x) * Psi_j(x)[k] * Normal[k] dS)
I hope it is more clear now !
Best regards,
Julien
Richard George wrote:
Hello
I'd like to evaluate the integral of the normal component of a vector
valued mesh_fem on a boundary,
I have 'U' as a vector valued function represented by a FEM_PK(3,1)
object, and 'a' being a scalar valued function
that takes a constant value on each convex, represented by a
FEM_DISCONTINUOUS_PK(3,0) object.
term
term 2
The code for evaluating the first integral via gf_asm is possible I
think by making a contraction of a vBase() with a Normal()
I1 =
gf_asm('boundary',1,'u=data(#1);V()+=u(i).comp(vBase(#1).Normal())(i,j,j);',mim,mf,U);
This appears to give the right results in some simple tests - I'm
assuming that i sums over nodes, while j,j sums over vector components
and provides
a dot product - but I don't really understand how are the indexes on
the comp() function are determined ? When do the indexes all refer to
cartesian
vector components, and when are they local node numbers? am I using
the Normal() option correctly?
I think it should be possible to specify the second integral as a
contraction of 'a', 'U' and a tensor but
I don't think I grasp the syntax of the gf_asm command properly.
Could you explain how to specify integral I2 via gf_asm, and when it's
appropriate to use
a=data(#1)
a=data$1(#1)
a=data(#1,qdim(#1))
I2 = gf_asm('boundary',1,'u=data(#1);a=data(#2)
;V()+=a(i).u(j,k).comp(---??---.vBase(#1).Normal())(i,j,k,l,l);',mim,mf1,mf0,U,A);
Thanks for any help you can provide
Yours
Richard George
------------------------------------------------------------------------
_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users
--
Julien Pommier, bureau 111
GMM, INSA Toulouse, tél:05 61 55 93 42