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:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/