getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] High level generic assembly procedures


From: Yves Renard
Subject: Re: [Getfem-users] High level generic assembly procedures
Date: Tue, 01 Apr 2014 08:42:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Dear Marco,

Yes, your code is correct and it should work correctly.
Note that you can also use the high level generic assembly with the
model object using a generic assembly brick.
Note also that high level assembly is only available in the svn
repository version of Getfem
(and a very recent version, at least r4570 because a bug have been
corrected on coupled problems recently).

Yves.


Le 31/03/2014 14:00, Marco Pischedda a écrit :
> Dear all,
>
> I want to use the high level generic assembly procedures in order to
> use the automatic differentation for calculating the Jacobian of a
> non-linear problem.
>
> For example I want to calculate the Jacobian of two vectorial
> equations in the unknowns "u" and "p". The first vectorial equation is
> (u+p).Test_u while the second is (u+p).Test_p.
>
>  It is correct the following code?
>
>  gmm::sub_interval Iu(0, ndofs_u);
>  gmm::sub_interval Ip(ndofs_u,ndofs_p);
>  workspace.add_fem_variable("u", mf_u, Iu, U);
>  workspace.add_fem_variable("p", mf_p, Ip, P);
>  workspace.add_expression("(u+p).Test_u + (u+p).Test_p",mim);
>  getfem::model_real_sparse_matrix Jac(ndofs_u+ndofs_p, ndofs_u+ndofs_p);
>  workspace.set_assembled_matrix(Jac);
>  workspace.assembly(2);
>
> In the matrix Jac I have the Jacobian of the system?
>
>
> Thanks in advance
>
> Marco
>
> _______________________________________________
> 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

---------




reply via email to

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