Great.

Thank you very much for the quick replies.

Noam
On Thursday, January 11th, 2024 at 9:34 PM, Matthew Knepley <knep...@gmail.com> 
wrote:

> On Thu, Jan 11, 2024 at 12:53 PM Noam T. <dontbugthed...@proton.me> wrote:
>
>> There could be some overlapping/redundancy between the default and the 
>> user-defined groups, so perhaps that was the intended behavior. Glad to hear 
>> it's possible to have access to everything.
>
> Here is the MR: https://gitlab.com/petsc/petsc/-/merge_requests/7178
>
> If you build that branch, you can use -dm_plex_gmsh_use_generic to turn on 
> those labels.
>
> Thanks,
>
> Matt
>
>> Thanks,
>> Noam
>> On Thursday, January 11th, 2024 at 6:31 PM, Matthew Knepley 
>> <knep...@gmail.com> wrote:
>>
>>> On Thu, Jan 11, 2024 at 11:59 AM Noam T. <dontbugthed...@proton.me> wrote:
>>>
>>>> Without using the flag -dm_plex_gmsh_use_regions, the DMGetNumLabels says 
>>>> there are 5, named celltype, depth, cell/face/vertex sets.
>>>> With the flag, the labels are celltype, depth, my_vol, my_surface (using 
>>>> the same example as before).
>>>> Am I misusing the flag somehow, and I should be able to access those of 
>>>> cell/face/vertex as well?
>>>
>>> Shoot, yes this changed after another request. Yes, we can put in a flag 
>>> for that. Should not take long.
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>>> PS: Using PETSc 3.20.3
>>>>
>>>> Thanks,
>>>> Noam
>>>> On Thursday, January 11th, 2024 at 5:28 PM, Matthew Knepley 
>>>> <knep...@gmail.com> wrote:
>>>>
>>>>> On Thu, Jan 11, 2024 at 11:18 AM Noam T. via petsc-users 
>>>>> <petsc-users@mcs.anl.gov> wrote:
>>>>>
>>>>>> Would it be feasible to have an option (e.g. new flag along the lines of 
>>>>>> -dm_plex_gmsh_...) that allows the user to access both the default sets 
>>>>>> (Cell / Face / Vertex) together with user-defined gorups (those under 
>>>>>> $PhysicalNames, available when using -dm_plex_gmsh_use_regions)?
>>>>>
>>>>> I am not sure I understand the question. When you turn on regions, it 
>>>>> makes extra labels, but the generic labels still exist.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Matt
>>>>>
>>>>>> That is, with a *.msh file containing
>>>>>>
>>>>>> $PhysicalNames
>>>>>> 2
>>>>>> 2 100 "my_surface"
>>>>>> 3 200 "my_vol"
>>>>>>
>>>>>> the return of DMGetLabelName(dm, n, name) would be (order may differ)
>>>>>>
>>>>>> n = 0, name = "celltype"
>>>>>> n = 1, name = "depth"
>>>>>> n = 2, name = "Cell Sets"
>>>>>> n = 3, name = "my_vol"
>>>>>> n = 4, name = "Face Sets"
>>>>>> n = 5, name = "my_surface"
>>>>>> ...
>>>>>>
>>>>>> I poked into src/dm/impls/plex/plexgmsh.c and have managed to print all 
>>>>>> the labels after changing a couple of variable values, so perhaps it is 
>>>>>> doable.
>>>>>> The changes made are not a solution, simply naively set some variables 
>>>>>> to skip checking for the use_regions flag, so it understandably crashes 
>>>>>> soon after.
>>>>>>
>>>>>> Thanks, Noam
>>>>>
>>>>> --
>>>>>
>>>>> What most experimenters take for granted before they begin their 
>>>>> experiments is infinitely more interesting than any results to which 
>>>>> their experiments lead.
>>>>> -- Norbert Wiener
>>>>>
>>>>> [https://www.cse.buffalo.edu/~knepley/](http://www.cse.buffalo.edu/~knepley/)
>>>
>>> --
>>>
>>> What most experimenters take for granted before they begin their 
>>> experiments is infinitely more interesting than any results to which their 
>>> experiments lead.
>>> -- Norbert Wiener
>>>
>>> [https://www.cse.buffalo.edu/~knepley/](http://www.cse.buffalo.edu/~knepley/)
>
> --
>
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to which their experiments 
> lead.
> -- Norbert Wiener
>
> [https://www.cse.buffalo.edu/~knepley/](http://www.cse.buffalo.edu/~knepley/)

Reply via email to