getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] advection term in getfem


From: Yves Renard
Subject: Re: [Getfem-users] advection term in getfem
Date: Mon, 3 Sep 2007 18:34:41 +0200
User-agent: KMail/1.9.5

Le lundi 3 septembre 2007 17:53, vous avez écrit :
> Dear professor,
> I am an italian undergraduate student of  mathematics, and I am using
> getfem in my thesis.
> I would like to know if it is possible to assemble advection terms like
> integral of (F(u)grad(u) wdx).
> where u is the unknown, grad is the gradient, w is the test function and
> F(u) is a function of u (that eventually I can treat in explicit...so it
> can be considered simply as a coefficient).
> I searched on the help file, but I was able to find only assembler for
> mas matrix, stiffness matrix or assembler for spacific problems.
> Looking foreward for your reply,
> I thank you very much for your help.
> Mattia Bozzola


Here is an example of assembly procedure for an advection term. Vector A 
should contain the vectorial parameter you called F(u) traited explicitely.

  template<typename MAT, typename VECT>
  void asm_advection
  (const MAT &M, const mesh_im &mim, const mesh_fem &mf,
   const mesh_fem &mf_data,
   const VECT &A, const mesh_region &rg = mesh_region::all_convexes()) {

    generic_assembly 
      assem("a=data$1(#2); M$1(#1,#1)+="
            "comp(Base(#1).vBase(#2).Grad(#1))(:,i,j,:,j).a(i)");
    assem.push_mi(mim);
    assem.push_mf(mf);
    assem.push_mf(mf_data);
    assem.push_data(A);
    assem.push_mat(const_cast<MAT&>(M));
    assem.assembly(rg);
  }


If you want to treat explicitely the term F(u) then you have either to make 
iterations (fixed point strategy) or to use a Newton method. With the Newton 
method you have to compute the derivative of F(u) with respect to u.

Best regards,

Yves.

-------------------------------------------------------------------------
  Yves Renard (address@hidden)       tel : (33) 04.72.43.80.11
  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]