simple application of anti-periodic boundary conditions

77 views
Skip to first unread message

Paras Kumar

unread,
Apr 14, 2022, 1:28:26 PM4/14/22
to deal.II User Group
Dear dealii Community,

I am working on a solid mechanics related problem involving anti-periodic constraints,  i.e.

u_leftFace = - u_RightFace,

where u is the unknown field (a component of the dim-dimensional displacement field).

One possible solution, I am aware of, involves marking the periodic faces by means of boundary-ids, traversing through the dofs for each periodic face-pair in order to determine the periodic dof pair and then manually add the entry in the constraint matrix. This approach also worked for cases involving periodic constraints with offsets.  

I would like to know if there exists a simpler way of achieving the aforementioned goal by a simpler approach, probably by passing some appropriate parameters to the make_periodicity_constraints() function, since we just have a sign change here.

Thanks and best regards,
Paras

Wolfgang Bangerth

unread,
Apr 14, 2022, 4:24:21 PM4/14/22
to dea...@googlegroups.com

Paras,
I don't think there is a way that's already implemented, but if you look at
the function that implements the periodic boundary conditions, you should be
able to clone it in your project and add the negative sign where necessary.

Alternatively, you can let the existing function create an AffineMatrix
object, and then iterate over it to create a second such object that has the
opposite sign.

Best
W.


On 4/14/22 11:28, Paras Kumar wrote:
> *** Caution: EXTERNAL Sender ***
> --
> The deal.II project is located at http://www.dealii.org/
> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dealii.org%2F&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C8f9fc858ff034f0e15ef08da1e3c3094%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637855542161551806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=D5%2B%2Fl2JSIEzLD8yAQ0g8S4npa7iZJBXOm0RNWrcMpW0%3D&reserved=0>
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fforum%2Fdealii%3Fhl%3Den&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C8f9fc858ff034f0e15ef08da1e3c3094%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637855542161551806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sBAFfhzgWJFRRvlWTXcZSvJrGGwXyIgarIHw04NnhB4%3D&reserved=0>
> ---
> 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+un...@googlegroups.com
> <mailto:dealii+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/b2783034-32fe-43d0-80fa-5ace7204f6c0n%40googlegroups.com
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fdealii%2Fb2783034-32fe-43d0-80fa-5ace7204f6c0n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C8f9fc858ff034f0e15ef08da1e3c3094%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637855542161551806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=DyeuUwE%2BH%2FQKzLAzF9lQhGU%2By4gvef3I%2FYUg%2FklzVJg%3D&reserved=0>.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Paras Kumar

unread,
Apr 19, 2022, 3:17:34 PM4/19/22
to dea...@googlegroups.com
Dear Wolfgang,

Thank you for the hints. The second approach seems easy to start with.

One follow-up question: The mesh (which is initially periodic at the boundaries)  is refined adaptively during the simulation and it cannot be guaranteed if both the left and the right boundary faces would be refined at the same time. Will make_periodicity_constraints() work in that case? If yes, how would the periodic constraints look like for the child cell dofs? In case it matters, I currently have a dealii::Triangulation and also wish to update to p:d:T in future.

Going through step-45 and the docu of collect_periodic_faces(), it was not clear to me what would happen for the case I described above.

Thanks and best regards,
Paras

You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/Y82j-T65T00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/72a3bb09-99bc-c9ea-1229-a4692c50b70e%40colostate.edu.

Wolfgang Bangerth

unread,
Apr 19, 2022, 10:20:40 PM4/19/22
to dea...@googlegroups.com
On 4/19/22 13:17, Paras Kumar wrote:
>
> One follow-up question: The mesh (which is initially periodic at the
> boundaries)  is refined adaptively during the simulation and it cannot be
> guaranteed if both the left and the right boundary faces would be refined at
> the same time. Will make_periodicity_constraints() work in that case? If yes,
> how would the periodic constraints look like for the child cell dofs? In case
> it matters, I currently have a dealii::Triangulation and also wish to update
> to p:d:T in future.

I don't recall the details, but at least for p::d::T, it is possible to tell
the triangulation about the periodicity of sides and it will ensure that if
you refine the cells on one side the ones on the other side are refined
accordingly.

Others might remember more of the details.

Best
W.

Daniel Arndt

unread,
Apr 21, 2022, 8:29:37 AM4/21/22
to dea...@googlegroups.com
Paras,

You can also use add_periodicity with regular Triangulation objects, see https://www.dealii.org/current/doxygen/deal.II/classTriangulation.html#adbf04756b28dae69194870812acaf941. This should make sure that periodic neighbors differ at most by one refinement.

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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/be3be255-d6a0-bdbd-fb56-f46161fc0856%40colostate.edu.
Reply all
Reply to author
Forward
0 new messages