Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-18 Thread Matthew Knepley
On Sun, Dec 18, 2022 at 9:21 AM Jed Brown wrote: > Matthew Knepley writes: > > > On Fri, Dec 16, 2022 at 12:22 AM Praveen C wrote: > > > >> Thank you very much. I do see correct normals now. > >> > >> Is there a way to set the option > >> > >> -dm_localize_height 1 > >>> > >> > >> within the

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-18 Thread Jed Brown
Matthew Knepley writes: > On Fri, Dec 16, 2022 at 12:22 AM Praveen C wrote: > >> Thank you very much. I do see correct normals now. >> >> Is there a way to set the option >> >> -dm_localize_height 1 >>> >> >> within the code ? >> > > The problem is that the localization happens within the Gmsh

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-16 Thread Matthew Knepley
On Fri, Dec 16, 2022 at 12:22 AM Praveen C wrote: > Thank you very much. I do see correct normals now. > > Is there a way to set the option > > -dm_localize_height 1 >> > > within the code ? > The problem is that the localization happens within the Gmsh construction, so it is difficult to

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-15 Thread Praveen C
Thank you very much. I do see correct normals now. Is there a way to set the option >> -dm_localize_height 1 within the code ? best praveen > On 15-Dec-2022, at 9:53 PM, Matthew Knepley wrote: > > On Wed, Dec 14, 2022 at 9:20 AM Praveen C > wrote: >> Hello >> >> I

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-15 Thread Matthew Knepley
On Wed, Dec 14, 2022 at 9:20 AM Praveen C wrote: > Hello > > I tried this with the attached code but I still get wrong normals. > > ./dmplex -dm_plex_filename ug_periodic.msh -dm_localize_height 1 > > > Code and grid file are attached > I have fixed the code. The above options should now work

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-14 Thread Praveen C
HelloI tried this with the attached code but I still get wrong normals../dmplex -dm_plex_filename ug_periodic.msh -dm_localize_height 1Code and grid file are attachedThank youpraveen dmplex.c Description: Binary data ug_periodic.msh Description: Binary data On 14-Dec-2022, at 6:40 PM, Matthew

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-14 Thread Matthew Knepley
On Wed, Dec 14, 2022 at 2:38 AM Praveen C wrote: > Thank you, this MR works if I generate the mesh within the code. > > But using a mesh made in gmsh, I see the same issue. > Because the operations happen in a different order. If you read in your mesh with -dm_plex_filename mymesh.gmsh

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Praveen C
Thank you, this MR works if I generate the mesh within the code. But using a mesh made in gmsh, I see the same issue. Thanks praveen > On 14-Dec-2022, at 12:51 AM, Matthew Knepley wrote: > > On Tue, Dec 13, 2022 at 10:57 AM Matthew Knepley > wrote: >> On Tue, Dec

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Matthew Knepley
On Tue, Dec 13, 2022 at 10:57 AM Matthew Knepley wrote: > On Tue, Dec 13, 2022 at 6:11 AM Praveen C wrote: > >> Hello >> >> In the attached test, I read a small grid made in gmsh with periodic bc. >> >> This is a 2d mesh. >> >> The cell numbers are shown in the figure. >> >> All faces have

Re: [petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Matthew Knepley
On Tue, Dec 13, 2022 at 6:11 AM Praveen C wrote: > Hello > > In the attached test, I read a small grid made in gmsh with periodic bc. > > This is a 2d mesh. > > The cell numbers are shown in the figure. > > All faces have length = 2.5 > > But using PetscFVFaceGeom I am getting length of 7.5 for

[petsc-users] dmplex normal vector incorrect for periodic gmsh grids

2022-12-13 Thread Praveen C
HelloIn the attached test, I read a small grid made in gmsh with periodic bc.This is a 2d mesh.The cell numbers are shown in the figure.All faces have length = 2.5But using PetscFVFaceGeom I am getting length of 7.5 for some faces. E.g.,face: 59, centroid = 3.75, 2.50, normal = 0.00,