Chuyi,

I still have a question about how to apply periodic boundary conditons: Is 
> there any possibility now to apply PBC with a value 1.0 in x_component and 
> y_component while -1.0 in z_component? I've read an older version of 
> step-45 before (like 8.3.0), which showed we could change that when calling 
> ConstraintMatrix::add_entry, but later this has been removed, and now I 
> can't find how to do it.
>
I guess with PBC in z_component with value -1.0 you mean something similar 
to u(x,y,0)=-u(x,y,1)?
Unfortunately, this is a bit complicated as constraints in a 
ConstraintMatrix can't be changed easily after they have been added.

Using make_periodicity_constraints you get u(x,y,0)=u(x,y,1) and then you 
would just invert the sign for all the entries in the lines corresponding 
to the respective DoFs in the ConstraintMatrix.
For doing so, you can get the interesting DoFs via 
DoFTools::extract_boundary_dofs() [1] and then request the respective 
constraints via ConstraintMatrix::get_constraint_lines() [2].
>From these information you would create another ConstraintMatrix (where the 
line entries have the inverted sign) and merge the other constraints in via 
ConstraintMatrix::merge() [3] with left_object_wins.

Best,
Daniel

[1] 
https://www.dealii.org/8.4.0/doxygen/deal.II/namespaceDoFTools.html#ad3067f335a97de429176178689222f3a
[2] 
https://www.dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a96b20c2f6162fdde6bafcea825f1cb31
[3] 
https://www.dealii.org/8.4.0/doxygen/deal.II/classConstraintMatrix.html#a08b5378ad8b23e5fb86c71a2c66bff13

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

Reply via email to