Dear Julian, In general its not easy to provide the functionality that you're looking for because not every degree-of-freedom is associated with a support point (e.g. the FE_DGPMonomial element) and let alone a vertex (e.g. an FE_Q of polynomial order 2 has DoFs with support points at face and edge centres).
For your simple case (Q1 as you've stated) you could use the cell->vertex_dof_index <https://www.dealii.org/developer/doxygen/deal.II/classDoFAccessor.html#a5560151b5407e4851d5c1009c7753764> that would mean that you'd require a single grid traversal to extract each DoF value associated with support points corresponding to the vertices. If this is something that you might repeat often then you could use the GridTools::vertex_to_cell_map <https://www.dealii.org/developer/doxygen/deal.II/namespaceGridTools.html#a9b7e2ca8ecd26a472e5225ba91a58acb> to cache this association once up front. For the most general case, you might need to use DoFTools::map_dofs_to_support_points <https://dealii.org/developer/doxygen/deal.II/namespaceDoFTools.html#aec064dac51c8f66b7aa2a7747641584f> as covered in this post <https://groups.google.com/forum/#!searchin/dealii/vertex$20dof$20index%7Csort:relevance/dealii/pWgrcTjFAUk/u52qlc3RnmMJ>. Also see this post <https://groups.google.com/forum/#!searchin/dealii/vertex_dof_index|sort:date/dealii/WoRfMt71KAo/PttR-xRbBQAJ> and this search query <https://groups.google.com/forum/#!searchin/dealii/vertex_dof_index%7Csort:date>for more information. I hope that this helps you. Regards, Jean-Paul On Thursday, November 10, 2016 at 3:16:39 PM UTC+1, Julian Dorn wrote: > > ok. Something like this: > cell = dof_handler.begin_active (); > endc = dof_handler.end (); > for (; cell != endc; ++cell) > { > for (unsigned int vertex = 0; > vertex < GeometryInfo<dim>::vertices_per_cell; ++vertex) > { > cell->vertex(vertex) > } > } > > Thank you! > ... the only thing that if one has a loop through Q1-dofs, then to get the > corresponding vertex coordinates of the i-th dof in such a way might be > expensive. The solution is to put this part into the preprocessing-phase > though. > > > On Thursday, November 10, 2016 at 2:45:34 PM UTC+1, Deepak Gupta wrote: >> >> Dear Julian, >> >> This question has been asked in the past and there are already some >> threads which might be of help to you: >> >> https://groups.google.com/forum/#!searchin/dealii/dof$20coordinates%7Csort:relevance >> >> Best, >> Deepak >> >> On Thu, Nov 10, 2016 at 2:41 PM, Julian Dorn <julian...@gmail.com> wrote: >> >>> Dear all, >>> >>> if I have >>> FE_Q<dim> fe; // to be Q1 finite element in 2D >>> DoFHandler<dim> dof_handler; >>> >>> how to get coordinates of dofs (for Q1 this will be exactly coordinates >>> of quads' vertices)? >>> >>> Thank you in advance! >>> >>> -- >>> The deal.II project is located at http://www.dealii.org/ >>> For mailing list/forum options, see >>> https://groups.google.com/d/forum/dealii?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "deal.II User Group" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to dealii+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.