Re: [deal.II] Re: Finding unconnected regions in a triangulation

2023-07-10 Thread Kaushik Das
I see. thanks for the tip.

On Mon, Jul 10, 2023 at 1:07 PM Daniel Arndt  wrote:

> Kaushik,
>
> The implementation for those functions is pretty simple so it shouldn't be
> too hard to modify them to meet your needs, see
> https://dealii.org/current/doxygen/deal.II/grid__tools_8cc_source.html#l03828
> .
>
> Best,
> Daniel
>
> On Mon, Jul 10, 2023 at 1:01 PM Kaushik Das  wrote:
>
>> Hi   Bruno, thank you very much for your quick reply. This is what I was
>> looking for. Thanks. But I have another question, is there a way the
>> generate these graph by only considering a subset of cells from a
>> triangulation? Like cells that has a specific fe_index or material_id or
>> flags? Thank you.
>>
>> On Mon, Jul 10, 2023 at 11:43 AM Bruno Turcksin 
>> wrote:
>>
>>> Kaushik,
>>>
>>> You could use get_face_connectivity_of_cells()
>>> 
>>> or get_vertex_connectivity_of_cells()
>>> 
>>> (depending on what you mean by connected) to have a sparsity pattern. This
>>> maps to a graph where the nodes are the cells, now you just need to check
>>> if the graph is connected see here
>>> 
>>>
>>> Best,
>>>
>>> Bruno
>>> On Monday, July 10, 2023 at 10:33:21 AM UTC-4 k.d...@gmail.com wrote:
>>>
 Hi all,
 Is there any way to find or count number of unconnected regions in a
 triangulation. Triangulation will have non zero refinement levels.
 Thanks,
 Kaushik

>>> --
>>> 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/gQH57TWRGP0/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/c77b5d42-9228-497a-ab2b-2ac25dc06fb7n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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/CAC-fs6vmote0mqgCu7d60EjRrsAHpRPw-kSXeJJRtaFXg%2BXDtw%40mail.gmail.com
>> 
>> .
>>
> --
> 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/gQH57TWRGP0/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/CAOYDWbKH7hTA9PhQ8kE%2Bx8eUONPLjqGMCipEnWF9UYpKbLvX1g%40mail.gmail.com
> 
> .
>

-- 
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/CAC-fs6t3jSRmm7PmTN_21rpRP%3DUazcT1p1nk28KGojBt-Q8jqg%40mail.gmail.com.


Re: [deal.II] Re: Finding unconnected regions in a triangulation

2023-07-10 Thread Daniel Arndt
Kaushik,

The implementation for those functions is pretty simple so it shouldn't be
too hard to modify them to meet your needs, see
https://dealii.org/current/doxygen/deal.II/grid__tools_8cc_source.html#l03828
.

Best,
Daniel

On Mon, Jul 10, 2023 at 1:01 PM Kaushik Das  wrote:

> Hi   Bruno, thank you very much for your quick reply. This is what I was
> looking for. Thanks. But I have another question, is there a way the
> generate these graph by only considering a subset of cells from a
> triangulation? Like cells that has a specific fe_index or material_id or
> flags? Thank you.
>
> On Mon, Jul 10, 2023 at 11:43 AM Bruno Turcksin 
> wrote:
>
>> Kaushik,
>>
>> You could use get_face_connectivity_of_cells()
>> 
>> or get_vertex_connectivity_of_cells()
>> 
>> (depending on what you mean by connected) to have a sparsity pattern. This
>> maps to a graph where the nodes are the cells, now you just need to check
>> if the graph is connected see here
>> 
>>
>> Best,
>>
>> Bruno
>> On Monday, July 10, 2023 at 10:33:21 AM UTC-4 k.d...@gmail.com wrote:
>>
>>> Hi all,
>>> Is there any way to find or count number of unconnected regions in a
>>> triangulation. Triangulation will have non zero refinement levels.
>>> Thanks,
>>> Kaushik
>>>
>> --
>> 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/gQH57TWRGP0/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/c77b5d42-9228-497a-ab2b-2ac25dc06fb7n%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAC-fs6vmote0mqgCu7d60EjRrsAHpRPw-kSXeJJRtaFXg%2BXDtw%40mail.gmail.com
> 
> .
>

-- 
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/CAOYDWbKH7hTA9PhQ8kE%2Bx8eUONPLjqGMCipEnWF9UYpKbLvX1g%40mail.gmail.com.


Re: [deal.II] Re: Finding unconnected regions in a triangulation

2023-07-10 Thread Kaushik Das
Hi   Bruno, thank you very much for your quick reply. This is what I was
looking for. Thanks. But I have another question, is there a way the
generate these graph by only considering a subset of cells from a
triangulation? Like cells that has a specific fe_index or material_id or
flags? Thank you.

On Mon, Jul 10, 2023 at 11:43 AM Bruno Turcksin 
wrote:

> Kaushik,
>
> You could use get_face_connectivity_of_cells()
> 
> or get_vertex_connectivity_of_cells()
> 
> (depending on what you mean by connected) to have a sparsity pattern. This
> maps to a graph where the nodes are the cells, now you just need to check
> if the graph is connected see here
> 
>
> Best,
>
> Bruno
> On Monday, July 10, 2023 at 10:33:21 AM UTC-4 k.d...@gmail.com wrote:
>
>> Hi all,
>> Is there any way to find or count number of unconnected regions in a
>> triangulation. Triangulation will have non zero refinement levels.
>> Thanks,
>> Kaushik
>>
> --
> 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/gQH57TWRGP0/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/c77b5d42-9228-497a-ab2b-2ac25dc06fb7n%40googlegroups.com
> 
> .
>

-- 
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/CAC-fs6vmote0mqgCu7d60EjRrsAHpRPw-kSXeJJRtaFXg%2BXDtw%40mail.gmail.com.


[deal.II] Re: Finding unconnected regions in a triangulation

2023-07-10 Thread Bruno Turcksin
Kaushik,

You could use get_face_connectivity_of_cells() 

 
or get_vertex_connectivity_of_cells() 

 
(depending on what you mean by connected) to have a sparsity pattern. This 
maps to a graph where the nodes are the cells, now you just need to check 
if the graph is connected see here 


Best,

Bruno
On Monday, July 10, 2023 at 10:33:21 AM UTC-4 k.d...@gmail.com wrote:

> Hi all,
> Is there any way to find or count number of unconnected regions in a 
> triangulation. Triangulation will have non zero refinement levels. 
> Thanks,
> Kaushik 
>

-- 
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/c77b5d42-9228-497a-ab2b-2ac25dc06fb7n%40googlegroups.com.