Applying a zero constraints to cell based on material_id

28 views
Skip to first unread message

blais...@gmail.com

unread,
Oct 31, 2022, 8:36:50 AM10/31/22
to deal.II User Group
Dear all, I hope you are all doing fine :)!

I am trying to do some quick testing of something and this would require me applying a zero constraint to a set of cells which have a specific material id. I could surely do that from the weak form, but I was wondering if there was a way to do it strongly by applying a constraint like we do with boundary conditions (e.g. using VectorTools). I looked around in the documentation but I could not find anyway (but maybe I did not look carefully enough).

Thanks!
Bruno

Daniel Arndt

unread,
Oct 31, 2022, 9:19:51 AM10/31/22
to dea...@googlegroups.com
Bruno,

I don't think we have a function that would do that already. I would just loop over all (locally relevant) cells, and add the respective (locally relevant) dofs to the AffineConstraints object with add_line().

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/0605a226-d35e-4286-ad2e-13a7b1c185e9n%40googlegroups.com.

blais...@gmail.com

unread,
Oct 31, 2022, 10:37:58 AM10/31/22
to deal.II User Group
Elegant solution, I like it.
Thanks!
Reply all
Reply to author
Forward
0 new messages