Re: [deal.II] How to add 2nd iterator to MeshWorker::mesh_loop ?

2021-07-15 Thread Jean-Paul Pelteret
To add to what Wolfgang has already said, there’s this entry in our FAQ on this topic: https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#can-i-convert-triangulation-cell-iterators-to-dofhandler-cell-iterators

Re: [deal.II] Map from dof index to vertex index

2021-07-15 Thread Jean-Paul Pelteret
To add to what Wolfgang has already said, there’s this entry in our FAQ on this topic (well, the reverse mapping from vertex to DoF): https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-do-i-get-the-degree-of-freedom-indices-at-vertices

Re: [deal.II] Map from dof index to vertex index

2021-07-15 Thread Wolfgang Bangerth
On 7/15/21 3:09 PM, Kaushik Das wrote: Is there a way to know which dof_index is located at which vertex. For example, I want to "map" a dof_index that I get from affine_constrains.get_constraint_entries(line); to a vertex index that are in the range of triangulation.begin_vertex() and

[deal.II] Map from dof index to vertex index

2021-07-15 Thread Kaushik Das
Hello, Is there a way to know which dof_index is located at which vertex. For example, I want to "map" a dof_index that I get from affine_constrains.get_constraint_entries(line); to a vertex index that are in the range of triangulation.begin_vertex() and triangulation.end_vertex(). Thank

Re: [deal.II] How to add 2nd iterator to MeshWorker::mesh_loop ?

2021-07-15 Thread Wolfgang Bangerth
On 7/15/21 2:45 AM, Sylvain Mathonnière wrote: *typenameDoFHandler::active_cell_iteratorcell_2 (cell_1->get_triangulation(), cell_1->level(), cell_1->index(), dof_handler_2);* The compiler error tells you that you need pointers, not references. So this should work: typename

Re: [deal.II] How to add 2nd iterator to MeshWorker::mesh_loop ?

2021-07-15 Thread Sylvain Mathonnière
I tried as you suggested but it seems there is a little error still. I found the constructor in TriaActiveIterator (5/8 constructor) though. I wrote : *typename DoFHandler::active_cell_iterator cell_2 (cell_1->get_triangulation(), cell_1->level(), cell_1->index(), dof_handler_2);* and the