Right, it won't clear it everywhere. You would need to use MPI to clear the
flag on the other processor. If you would do that you would create a huge
amount of messages and your code would be extremely slow.

Best,

Bruno

Le jeu. 27 avr. 2023 à 10:09, Abbas Ballout <abbas.ballou...@gmail.com> a
écrit :

> This works!! Thanks.
> I am guessing something like:
>
> if(cell_neighbour->is_ghost()==true)
> cell->face(neighbour_face_number)->clear_user_flag();
>
> won't clear the user flag everywhere either, because that didn't work.
> Right?
>
> On Thursday, April 27, 2023 at 2:48:23 PM UTC+2 bruno.t...@gmail.com
> wrote:
>
>> Hello,
>>
>> On Thursday, April 27, 2023 at 7:56:50 AM UTC-4 abbas.b...@gmail.com
>> wrote:
>>
>> This works with a single MPI but not for more. Is it because the cell->
>> face(face)->clear_user_flag()
>> doesn't clear the user flag in the other distributed meshes?
>>
>>
>> That's correct. The flag is only cleared locally not on the other
>> processor.
>>
>> I can't directly loop over faces because there is no
>> "face->is_locally_owned()"
>> I know that meshworker is an option. Is it the only option?
>>
>> You can check if the cell that shares the face (use this
>> <https://www.dealii.org/current/doxygen/deal.II/classCellAccessor.html#a177d9a97d1a0d8a066e45040c0b6aac9>)
>> is a ghost cell (use this
>> <https://www.dealii.org/current/doxygen/deal.II/classCellAccessor.html#a54375bf8f17e51501a4da7a2fac852ae>).
>> If that's the case, you can ask for the subdomain id of the locally owned
>> cell and the ghost cell (use this
>> <https://www.dealii.org/current/doxygen/deal.II/classCellAccessor.html#ae06835414c3c3f3359974f2c75a88033>).
>> Now you can decide that only the processor with the lower rank can "touch"
>> the face and the other processor should just skip it.
>>
>> Best,
>>
>> Bruno
>>
>>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/s07h9mCZhq4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/d7b3b433-e421-4b2c-a837-add3bd1d6f2en%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/d7b3b433-e421-4b2c-a837-add3bd1d6f2en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAGVt9ePNjo-9oOPy5YdfZ-RntzJDe7eu5Zdeyy6vFL8W9Jod_A%40mail.gmail.com.

Reply via email to