getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Problem assembling convection contribution


From: Yves Renard
Subject: Re: [Getfem-users] Problem assembling convection contribution
Date: Tue, 9 Feb 2010 17:37:48 +0100
User-agent: KMail/1.9.9

On lundi 8 février 2010, Cédric Venet wrote:
> Hi,
>
> I am trying to assemble the term "v.Grad u" where v is a field of vector
> data on my mesh. u is a scalar field, and the unknow of my equation. I
> am trying to do this:
>
>    getfem::generic_assembly assem;
>    assem.push_mi(fm.GetIntegrationMesh());
>    assem.push_mf(fm.GetShapeMesh());
>    std::vector<T> tmpve(1,m_coef);
>    assem.push_data(tmpve);
>    assem.push_data(m_speed);
>    assem.push_mat(m_A);
>
> assem.set("F=data(1);M$1(#1,#1)+=comp(Base(#1).Grad(#1).Base(#1))(i,:,k,:).
>data$2(k,i).F(p)"); assem.assembly();
>
> however, it seems we cannot use two indexes on a data (here is the the
> node/DOF number and k the dimension number).
> can I do this? should I push three data vector? should I define a new
> fem mesh for the data?

It is possible to have vector data, but you declaration seems to be wrong. It 
should be something like that :

assem.set("F=data(1); G=data$2(qdim(#1), #1); M$1
(#1,#1)+=comp(Base(#1).Grad(#1).Base(#1))(i,:,k,:).G(k,i).F(p)"); 
assem.assembly();

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

---------



reply via email to

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