Dear deal.II users,

I am trying to mix step-12 and step-31 for my project.
I have two coupled equations (named eq1 and eq2) that I am solving in 
parallel just like in step-31 but for one of them I am using the 
discontinuous Galerkin method like in step-12 (eq1) and for the other one I 
use standard Galerkin (eq2). I also have two dof_handler like in step-31 
one for each equation. It looks like this :







* FESystem<dim>        fe_eq1;        //FE element for equation 
1 FESystem<dim>        fe_eq2;         //FE element for equation 
2 DoFHandler<dim>      dof_handler_eq1; DoFHandler<dim>      
dof_handler_eq2;template <int dim> DG_FEM<dim>::DG_FEM (): fe_eq1 
(FE_DGQ<dim>(1),10), fe_eq2 (FE_Q<dim>(1), 1), dof_handler_eq1 
(triangulation), dof_handler_eq2 (triangulation) {}*

*The problem :*

My issue is with the *MeshWorker::mesh_loop*. Like in step-12, I am looping 
over cells, faces and boundaries with workers for eq1 like this :









*using Iterator = typename DoFHandler<dim>::active_cell_iterator;auto 
cell_worker = [&](const Iterator &  cell, ScratchData<dim> &scratch_data, 
CopyData & copy_data)   {//my code here needs data from eq2 as well 
}MeshWorker::mesh_loop(dof_handler_eq1.begin_active(),                        
dof_handler_eq1.end(),                        ,/*other 
arguments*/,                        cell_worker, /*other workers*/);*

However, since my two equations are coupled, I need to access data from eq2 
(solution at former time step) but I cannot do it with this iterator here 
since it is linked only to dof_handler_eq1.

Idealy, I would like to loop using two iterators, one for dof_handler_eq1 
and one for dof_handler_eq2.

I know how to do that "traditionnally", I would have something like








*auto       eq1_cell       = dof_handler_eq1.begin_active();const auto 
end1        = dof_handler_eq1.end();auto       eq2_cell       = 
dof_handler_eq2.begin_active();const auto end2        = 
dof_handler_eq2.end();for (;  eq1_cell != end1 &&  eq2_cell != end2 ; ++ 
eq1_cell , ++ eq2_cell ){//my code here}*

but with the cell_worker, I do not know.

*Question:*
How can I modify the cells worker loop (on dof1) initialisation to have a 
second iterator linked with a second dof_handler looping at the same time ? 
or how can I add a concurrentely running for loop to the cell_worker with a 
different iterator ?

I checked in step 16 and 47 as well as in the doc for MeshWorkers and I did 
not find a solution to this problem. I hope the question is clear enough, 
do not hesitate to inquires more details if I am missing something 
important.

Best regards,

Sylvain Mathonnière

-- 
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/0815ec0d-ce3d-4b45-af26-0ec1afbbdd34n%40googlegroups.com.

Reply via email to