Dear All,
Have you experienced similar problems as the described below?
It seems that the output of vtk_export for vectorial elements
depends on the dimension of the mesh (geometric dimension, mesh.dim()
I meant).
For the following test code:
getfem::mesh mesh;
std::vector<bgeot::size_type> ind(4);
ind[0] = mesh.add_point(bgeot::base_node(0.0, 0.0,0.0));
ind[1] = mesh.add_point(bgeot::base_node(0.5, 0.0,0.0));
ind[2] = mesh.add_point(bgeot::base_node(1.0, 0.0,0.0));
ind[3] = mesh.add_point(bgeot::base_node(2.0, 0.0,0.0));
mesh.add_segment(ind[0], ind[1]);
mesh.add_segment(ind[1], ind[2]);
mesh.add_segment(ind[2], ind[3]);
getfem::mesh_fem fem(mesh);
fem.set_qdim(2);
fem.set_finite_element(getfem::fem_descriptor("FEM_PK(1,1)"));
getfem::size_type Ndof = fem.nb_dof();
std::vector<double> V(Ndof);
for (getfem::size_type i=0; i<Ndof; i++) {
V[i] = i+1;
}
getfem::vtk_export out(std::cout, true);
out.set_header("ala");
out.exporting(fem);
out.write_point_data(fem, V, "u");
I got different results depending if mesh is 3 dimensional or 2 dimensional,
( 2D mesh is created using 2 coordinates in call to
bgeot::base_node(0.0, 0.0)
)
For 2D mesh the vector field saved looks like:
VECTORS u float
1 2 0 3 4 0 5 6 0 7 8 0
which is what I have expected but for 3D mesh it looks like:
VECTORS u float
1 2 3 3 4 5 5 6 7 7 8 0
which seems to be wrong.
Regards
Roman
--
Roman Putanowicz, PhD < [email protected] >
interpolated with Hermite FEM).
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users