On 4/20/23 17:27, Tao Jin wrote:

My question is, is there a way to involve two different dof_handlers when using the WorkStream class, something like the following:

What you are looking for is an object that looks like a *pair* of iterators
and when you call ++it on it, then it increments both elements of the pair. The class SynchronousIterator does exactly this.

Alternatively, it is possible to convert an iterator into one DoFHandler to an iterator into another DoFHandler, like in
  typename DoFHandler::active_cell_iterator cell_stokes
     = stokes_dof_handler.begin_active();

  for (..., ++cell_stokes)
  {
    typename DoFHandler::active_cell_iterator
      cell_T (cell_stokes->get_triangulation(),
              cell_stokes->level(),
              cell_stokes->index(),
              &temperature_dof_handler);
    ...do something with both iterators...
  }

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/80d5f898-7928-7e6a-5a62-bee26a307146%40colostate.edu.

Reply via email to