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
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to