> The function KinematicLocalisationAnalyser::DefToFile(const char* > output_file_name) is > now generating files like this (code below). > Can you check how to make vtk magic with that? > Note that ids will start at 6 in some cases as ids=0...5 are for walls. > I attach one small example.
Hi Bruno, it would be nice to have access to triangulation and related data from python. There is (since around Christmas) way to construct numpy arrays from c++, so I think it would be nice to make a function that would return dictionary mapping names to arrays (numpy arrays are very memory-efficient in terms of avoiding copying data, and are a de-facto standard in python world). We support 1d/2d, Real/int arrays (can be extended, but I doubt anything beyond is useful here), the function would return python::dict (have a look at py/_eudoxos.cpp::137 (testNumpy), which creates 2 arrays and returns those) with something like: ret["vertices"]=2d Real array sized (nVertices x 3), where each column would have 3 Real numers with vertex coordinates (i.e. sphere position). ret["triangulation"]=2d int array sized (nTetrahedra x 4), each column containing 4 ints of the tetrahedron vertices. ret["strain"]=2d Real array sized (nTetrahedra x numberOfStrainComponents), each columns containing strain for the respective tetrahedron ret["verticesStrain"]=same, but averaged for each vertex (body position) from its neighbouring tetrahedra etc (I am not sure what your code can really compute). It would be up to the user to interpret those things right, i.e. know that "vertices" define vertices and so on. I can give some advices on that but unfortunately I don't have time to do that myself now. Cheers, Vaclav _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

