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/>