New question #97807 on DOLFIN: https://answers.launchpad.net/dolfin/+question/97807
Hello How do I get the vertex coordinates for a mesh with P2 elements? For a P1 mesh, this works fine: for (VertexIterator vertex(mesh); !vertex.end(); ++vertex) { xy = new Array<double>(dim, geometry.x(vertex->index())); x0 = (*xy)[0]; x1 = (*xy)[1]; std::cout << i << "(" << x0 << ", " << x1 << ")" << std::endl; ++i; } It doesn't work for a P2 mesh though. Some parts of my code which depend on knowing the vertex coordinates ultimately fail with the following error (P2 and above only): Assertion failed: (V.dofmap().global_dimension() <= x.size()), function Function, file dolfin/function/Function.cpp, line 62. Could someone please help with this. Thank you. Ted -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp