Hello everyone !

I have (another) a problem in my code. I am trying to mix *step-12* and 
*step-31* for my project.
I want to solve 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;*

And the constructor of the class :


*      template <int dim> DG_FEM<dim>::DG_FEM ()        : fe_eq1 
(FE_DGQ<dim>(1),40), fe_eq2 (FE_Q<dim>(1), 1), dof_handler_eq1             
(triangulation), dof_handler_eq2 (triangulation) {}*

For the* eq1*, I am using like in *step-12* the *MeshWorker::mesh_loop(...)* 
to fill my matrix :


In the *cell_worker* function, in order to access the ith component of my 
shape function, I use the same technique as in *step-8*:

        ...
        









*        const unsigned int n_dofs_per_cell = 
scratch_data.fe_values.get_fe().dofs_per_cell;        for (unsigned int i = 
0; i < n_dofs_per_cell; ++i)        {            unsigned int component_i = 
fe_eq1.system_to_component_index(i).first;            // and then I access 
the "component_i" of my shape function "i" at gauss point "point" using    
         copy_data.cell_rhs(i) += .... fe_v.shape_value_component(i, point, 
component_i) ...        }*
        
        ...

This seems to work fine. Since I have 40 components and 4 nodes, I have 
*n_dofs_per_cell 
= 160*. That is confirmed by the debuggeur.

My problem arises when I am using the same technique in the *face_worker*.
        
        ...









*        const unsigned int n_dofs        = 
fe_iv.n_current_interface_dofs();        for (unsigned int i = 0; i < 
n_dofs; ++i)        {          unsigned int component_i = 
fe_eq1.system_to_component_index(i).first;             
copy_data_face.cell_matrix(i, j) += * fe_iv.shape_value((beta_dot_n > 0), 
j, qpoint, component_i)                }*
        
        ...

Here *n_dofs = 320* and so *system_to_component_index()* does not like to 
have an argument i>=160 and throws an error. 
How come n_dofs=320 in this case ? I was expecting 2 interfaces * 2 nodes * 
40 components = 160 dofs, unless I am considering all the interfaces of the 
cell at onces in which case I have 2 interfaces * 4 nodes * 40 components = 
320.

*My main question is therefore:*
How can I access the ith component of my shape function in face_worker like 
in the cell_worker if I cannot use system_to_component_index() ?

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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/80dd4f9c-e167-4644-80d0-57a7ee6ae73cn%40googlegroups.com.

Reply via email to