[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] Print(u) print Test2_u
From: |
Yves Renard |
Subject: |
Re: [Getfem-users] Print(u) print Test2_u |
Date: |
Thu, 3 Dec 2015 08:44:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Dear Torquil,
the term u is not computed in your formulation because of the
workspace.assembly(2);
Since your expression is a order 1 expression, it will be derived and
what is computed is
Test_u*Print(Test2_u)
Is you want to see what is the value of u, you can just perform a
workspace.assembly(1);
Best regards,
Yves.
Le 02/12/2015 20:14, Torquil Macdonald Sørensen a écrit :
> Hi!
>
> I have used the expression Print(u) in the high-level assembly, but the
> output is:
>
> Print term Test2_u on Gauss point 0/1 of element 0: sizes (3, 1)
> vector(3) [ 0.333333, 0.333333, 0.333333 ]
>
> Should it not print "u" instead of "Test2_u"? Or have I misunderstood
> something?
>
> Here is the contents of main():
>
> GETFEM_MPI_INIT(argc, argv);
>
> getfem::mesh mesh;
>
> std::vector<getfem::size_type> ind(3);
> ind[0] = mesh.add_point(getfem::base_node(0.0, 0.0));
> ind[1] = mesh.add_point(getfem::base_node(1.0, 0.0));
> ind[2] = mesh.add_point(getfem::base_node(0.0, 1.0));
> mesh.add_simplex(2, ind.begin());
>
> getfem::mesh_fem mesh_fem(mesh);
> mesh_fem.set_finite_element(getfem::fem_descriptor("FEM_PK(2,1)"));
>
> getfem::mesh_im mesh_im(mesh);
>
> mesh_im.set_integration_method(getfem::int_method_descriptor("IM_TRIANGLE(1)"));
>
> getfem::ga_workspace workspace;
> getfem::base_vector U(mesh_fem.nb_dof());
> workspace.add_fem_variable("u", mesh_fem, gmm::sub_interval(0,
> mesh_fem.nb_dof()), U);
> workspace.add_expression("Test_u*Print(u)", mesh_im);
> workspace.assembly(2);
>
> GETFEM_MPI_FINALIZE;
> return(0);
>
> Using an updated SVN GetFEM built with gcc (Debian 5.2.1-27) 5.2.1 20151129.
>
> Best regards,
> Torquil Sørensen
>
>
> _______________________________________________
> 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
---------