[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-users] High level generic assembly procedures
From: |
Marco Pischedda |
Subject: |
[Getfem-users] High level generic assembly procedures |
Date: |
Mon, 31 Mar 2014 14:00:24 +0200 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-users] High level generic assembly procedures,
Marco Pischedda <=