getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] assembling a vectorial source


From: Yves Renard
Subject: Re: [Getfem-users] assembling a vectorial source
Date: Wed, 3 Oct 2007 12:47:30 +0200
User-agent: KMail/1.9.5

On Sunday 30 September 2007 19:10, Alex Magnes wrote:
> hi everybody!
>
> another question concerning the generic assembling procedures. i try to
> assemble a volumic source term "integral grad(Ni).Ts", where Ni are the
> basis functions of a scalar fem and Ts is a vectorial source term. so i
> set up a mesh with a data-fem with "FEM_NEDELEC(3)" elements and a
> "FEM_PK(3,1)" for setting the scalar basis functions.
> then:
>
>     assemble_source_term.push_mi(im);
>     assemble_source_term.push_mf(mf_scalar);
>     assemble_source_term.push_mf(mf_Ts);
>     assemble_source_term.push_data(Ts);     <- input data, length=dof of
> the nedelec fem.
>     assemble_source_term.push_vec(result);
>     assemble_source_term.set("F=data(qdim(#1),#2);" "
> V(#1)+=comp(Grad(#1).vBase(#2))(???????).F(???);");
>     assemble_source_term.assembly();
>
> my problem is, i do not really understand the reduction operation
> mentioned in the documentation, because i'm not familiar with tensor
> notation. the examples i found in the tests folder just showed how to
> handle something like "comp(Base(#1).vBase(#2))".
> so how do i have to set these indices to get a result?
> i hope i did a proper problem description and someone can help me.
>
> best regards and thanks in advance, alex

Dear alex,

What kind of problem do you want to treat ? The Nedelec fems are in fact 
mainly adapted to electromagnetic problems. If you just want to express a 
vectorial quantity, you can use a more basic fem as  "FEM_PK(3,1)" and 
specify on the corresponding mesh_fem object that you need to represent a 
vectorial field. in you case:

mf_Ts.set_qdim(3).

Then the assembly command should be

assemble_source_term.set("F=data(#2)"
                    "V(#1)+=comp(Grad(#1).vBase(#2))(:,i,j,i).F(j);");

Best,

Yves.

-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques,                       fax : (33) 04.72.43.85.29
  Institut Camille Jordan - CNRS UMR 5208
  INSA de Lyon, Universite de Lyon
  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]