Hi Daniel,

thank you for replying. I have looked thoroughly step 45 but it's not of 
much help for my case. I actually want to impose periodic boundary 
conditions for both velocities and pressure (I need to have a 
representative periodic cell). I used the following lines to set pressure 
to zero at the first node, but still gives me the same problem when I try 
to invert [B^T (diag M)^{-1} B] with cg solver for the purpose of Block 
Preconditioning - it says [B^T (diag M)^{-1} B] not invertible.

// constraint first pressure dof to be 0

std::vector<bool> boundary_dofs (dof_handler.n_dofs(), false);

DoFTools::extract_boundary_dofs (dof_handler, fe.component_mask(pressure), 
boundary_dofs);

const int first_boundary_dof = std::distance (boundary_dofs.begin(), 
std::find (boundary_dofs.begin(), boundary_dofs.end(), true));

constraints.add_line(first_boundary_dof);


I was thinking maybe the time-dependent stokes problem I'm trying to solve 
with fully periodic boundary conditions (velocities+pressure) is 
over-constrained and maybe that's why [B^T (diag M)^{-1} B] is not 
invertible. What do you think? Any ideas?


Thanks again for the help!


Best,

Magda

On Tuesday, January 15, 2019 at 11:05:38 AM UTC-5, Daniel Arndt wrote:
>
> Magda,
>
> [...]
>>     DoFTools::make_periodicity_constraints(dof_handler, 2, 3, 1, 
>> constraints);
>>     DoFTools::make_periodicity_constraints(dof_handler, 4, 1, 0, 
>> constraints);
>>
>>
> These two lines imply that you want to impose periodic boundary conditions 
> for all the components. Assuming the dof_handler variable is of type 
> FESystem and describes both velocity and pressure (as is the case in the 
> code-gallery example),
> this in particular holds true for the pressure. Is that what you are 
> intending?
> If so, you probably need another constraint to make the pressure unique.
> Otherwise, you might want to have a look at step-45 
> <https://www.dealii.org/9.0.0/doxygen/deal.II/step_45.html> where a 
> Stokes problem is solved with periodic boundary conditions on part of the 
> boundary.
> There only periodicity constraints for the velocity are stored in the 
> ConstraintMatrix object.
>
> Best,
> Daniel
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to