Thanks a lot for your answers! Timo, of course you are right for the general case. In my case, I don't need higher order elements, so for the moment there should be a simple mapping between vertices and dof indices.
Markus, thanks, that did the trick. Shame on me, I assumed there must be some internal reordering and didn't realize the global vertex_index is the same. Best regards Christian On Thu, Jan 20, 2011 at 10:44 AM, Markus Bürg <[email protected]> wrote: > Hello Christian, > > a slight improvement would be the comparison of vertex indices, because the > first index in your vertices vector will get vertex_index 0 in the > triangulation, the second will get vertex_index 1 and so on. > > Best Regards, > Markus > > > > Am 20.01.11 10:28, schrieb Christian May: >> >> Dear readers, >> >> I was so far unsuccessful to find an acceptably efficient solution to >> the following problem: >> I create a triangulation using >> triangulation.create_triangulation(vertices,cells,SubCellData()). >> Now I need a mapping between the index of a vertex in the vector >> vertices and the dof index. >> So far, all I came up with was looping over the vertices and comparing >> vertex coordinates, which is prohibitively expensive. >> Any suggestions for a more efficient implementation are highly >> appreciated. >> >> Thanks >> Christian >> _______________________________________________ >> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii >> >> > > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii > _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
