Jasper,

Namely, for my problem, I need the solution to the global Lagrange multipliers during the assembly of the RHS. Hence, when looping over all cells during the numerical integration, I need to always have access to the solution on, e.g., the first cell. How is this compatible with the parallel approach using WorkStream presented in step-44, which I was hoping to use as a template?

In that case, determine the value of the Lagrange multiplier from the first cell once, save it in a variable, and only then start the loop over all cells.

---------------------------

Alternatively, I thought about using AffineConstraints, where all DOFs belonging to one Lagrange multiplier are constrained to the DOF with the lowest index. In this case, I would pass the constraints object to DoFTools::make_sparsity_pattern() hoping this might keep the size of the stiffness matrix reasonably small:

constraints.clear()
ComponentMask mask = fe.component_mask(multipliers_fe);
const IndexSet dofs =
       DoFTools::extract_dofs(dof_handler, mask);
     const types::global_dof_index first_dof =
       dofs.nth_index_in_set(0);

     for (const types::global_dof_index i : dofs)
     {
       if (i != first_dof)
       {
         constraints.add_constraint(i, {{first_dof, 1.0}});
       }
     }
constraints.close()

How do you rate this second approach compared to the first one? Are there any issues to be expected?

That would work too, if perhaps not the most efficient approach. It shouldn't be terrible, though.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@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/cff080b1-773d-4de1-9899-9f6eb47c2c21%40colostate.edu.

Reply via email to