On 6/11/21 8:42 AM, [email protected] wrote:
In my code, I have two DoFHandler objects one corresponding to a vector
solution and another corresponding to a scalar solution. I need to find an
active cell iterator that surrounds a given point for both DoFHandler
objects. I am using the function GridTools::find_active_cell_around_point
twice to find the cell iterator corresponding to each DofHandler. Now both
iterators are pointing to the same cell but have to search twice. So is there
any other way where to find an iterator, given a particular iterator that
belongs to a different object? Similarly, if we have a
traingulation::active_cell_iterator that points to a particular cell, is there
any way to find the iterator which points to the same cell but belongs to a
DofHandler class? Thank you.
Yes, you can do
DoFHandler::active_cell_iterator iterator_1 = ...
DoFHandler::active_cell_iterator iterator_2 (iterator_1->get_triangulation(),
iterator_1->level(),
iterator_1->index(),
&dof_handler_2);
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/7ed06924-ead5-8441-306f-3cdc3867ac49%40colostate.edu.