Dear Wolfgang, Thank you so much for your inputs. Indeed, Step-31 is a good example for what I am looking for. However, I have a follow-up question regarding using the *WorkStream* class based on TBB during the assembly stage when two different dof_handlers are involved.
To be specific, in Step-31, two different dof_handlers are defined, one for the Stoke sub-problem and the other for the thermal sub-problem. Since the thermal sub-problem depends on the velocity field solved from the Stokes sub-problem, the following is done to ensure that the cell from the two dof_handlers are in sync: auto *cell* = stokes_dof_handler.begin_active(); const auto endc = stokes_dof_handler.end(); auto *temperature_cell* = temperature_dof_handler.begin_active(); for (; cell != endc; ++cell, ++temperature_cell) { stokes_fe_values.reinit(*cell*); temperature_fe_values.reinit(*temperature_cell*); ... } My question is, is there a way to involve two different dof_handlers when using the WorkStream class, something like the following: WorkStream::run( m_dof_handler_mechanical.active_cell_iterators(), [this](const typename DoFHandler<dim>::active_cell_iterator &cell, ScratchData_ASM_mechanical & scratch, PerTaskData_ASM_mechanical & data) { this->assemble_system_one_cell_mechanical(cell, scratch, data); }, [this](const PerTaskData_ASM_mechanical &data) { this->m_constraints_mechanical.distribute_local_to_global(data.m_cell_matrix, data.m_cell_rhs, data.m_local_dof_indices, m_tangent_matrix_mechanical, m_system_rhs_mechanical); }, scratch_data, per_task_data); Thank you so much! Best, Tao On Sunday, April 16, 2023 at 8:13:41 PM UTC-4 Wolfgang Bangerth wrote: > On 4/15/23 22:31, Tao Jin wrote: > > > > During a time interval, I want to use the first split operator > > *A B * u1 = b1 *to solve*u1 *and*u2.* > > *B C u2 b2* > > Then, plug the solved u1 and u2 into the second split operator > > *F * u3 = b3* > > where *F* contains the information of the newly solved *u1* and *u2*. > > You will want to look at how step-32 solves the coupled problem. There, it > is > a time-dependent one where we first want to solve for the first two > variables, > and then the third. > > If F depends on u1 and u2, you will have to assemble that matrix separate > from > the A,B,C matrices. In that case, you might also want to consider the > approach > of step-31. > > step-31 and -32 solve the same problem. It might be useful to compare and > contrast. > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > 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 dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/5390f489-a650-40ef-b64d-3689bdf2de72n%40googlegroups.com.