On 11/28/22 23:08, Abbas wrote:
As per the screenshot below, I created and imported a mesh using gmsh, with
two material IDs. I want to integrate on the edge that separate the two
materials for my weak form. I tried tagging the internal edge with an ID in
gmsh to loop on it, but of course dealii throws an error saying that I cannot
tag an internal edge with an ID.
If you have marked the cells of the two sub-domains with different
material_ids, then you can mark faces as follows:
for (const auto &cell : triangulation.active_cell_iterators())
for (const unsigned int face : cell->face_indices())
if ((cell->face()->at_boundary() == false)
&&
(cell->material_id() != cell->neighbor(face)->material_id()))
cell->face(f)->set_user_flag();
else
cell->face(f)->clear_user_flag();
Then you know that if a face has its user flag set that you need to integrate
over it.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/c7330eaa-7a21-9ec7-29e7-fd4a0df462ed%40colostate.edu.