I am doing the following in my face worker, which seems to work.
best
praveen


   const unsigned int n_cell_dofs = fe_face_values.get_fe().n_dofs_per_cell();
   const unsigned int n_face_dofs = fe_face_values.n_current_interface_dofs();

   for(unsigned int q=0; q<n_q_points; ++q)
   {
      Vector<double> num_flux(nvar);
      PDE::numerical_flux(param->flux_type, 
                          left_state[q], 
                          right_state[q], 
                          q_points[q], 
                          fe_face_values.normal(q),
                          num_flux);
      for (unsigned int i = 0; i < n_face_dofs; ++i)
      {
         unsigned int ii = (i < n_cell_dofs) ? i : i - n_cell_dofs;
         const auto c = 
fe_face_values.get_fe().system_to_component_index(ii).first;
         cell_rhs(i) -= num_flux[c] *
                        fe_face_values.jump_in_shape_values(i, q, c) *
                        fe_face_values.JxW(q);
      }
   }

> On 14 Sep 2024, at 4:55 PM, Praveen C <[email protected]> wrote:
> 
> Hello
> 
> While assembling interface terms in a DG code with FESystem and 
> FEInterfaceValues, I am not able to get the component which I would normally 
> do with
> 
> for(i=0; i<fe.dofs_per_cell; ++i)
>   fe.system_to_component_index(i).first
> 
> Now since “i” comes from joint dof indices, above will not work.
> 
> Do you have a suggestion for this ?
> 
> I suppose I could use interface_dof_to_dof_indices()
> 
> https://dealii.org/current/doxygen/deal.II/classFEInterfaceValues.html#ad3e0203907da47ea2e312e94ec342b39
> 
> which gives the dof index on one cell and then do 
> fe.system_to_component_index(i).first.
> 
> But this returns a tuple, and I have to find one of them which is valid, 
> which seems ugly.
> 
> Thanks
> praveen

-- 
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/99A47675-48E0-4B42-8535-90224BA5F72F%40gmail.com.

Reply via email to