Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
Jed creates the LocalToGlobal that does this elimination in plexsfc.c Thanks, Matt On Tue, Jul 18, 2023 at 12:07 PM Barry Smith wrote: > >They are never really "eliminated" because extra copies in the global > vector never exist. > > On Jul 18, 2023, at 12:03 PM, Karthikeyan

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Barry Smith
They are never really "eliminated" because extra copies in the global vector never exist. > On Jul 18, 2023, at 12:03 PM, Karthikeyan Chockalingam - STFC UKRI > wrote: > > Thank you, Barry. I am using the MPIAIJ format for a Finite Element > application. So, I am trying to understand

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Thank you, Barry. I am using the MPIAIJ format for a Finite Element application. So, I am trying to understand what is implemented in DMDA to eliminate those extra nodes. Best, Karthik. From: Barry Smith Date: Tuesday, 18 July 2023 at 16:58 To: Chockalingam, Karthikeyan (STFC,DL,HC) Cc:

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Barry Smith
If you are using DMDA with periodic boundary conditions for example only one "copy" of such nodes exists in the global vector (the vector the solvers see) so one does not need to eliminate extra ones > On Jul 18, 2023, at 11:51 AM, Karthikeyan Chockalingam - STFC UKRI via > petsc-users

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Yes, I clearly understand I need to eliminate one set of periodic nodes. I was hoping to use x = P x’ to eliminate one set. It is a kind of mapping. Sorry, I am not sure if it is the LocalToGlobal mapping you are referring to. Is there an example or reference to show how the LocalToGlobal

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
On Tue, Jul 18, 2023 at 11:18 AM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > Thanks Matt. > > > > The mesh is structured (rectilinear), so it is periodic in that sense. > > > > Can you please explain how I can impose it strongly? > Strongly means make

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Thanks Matt. The mesh is structured (rectilinear), so it is periodic in that sense. Can you please explain how I can impose it strongly? My initial thought was to come up with a relation between the periodic nodes: x = P x’ Say for 1-D problem with two elements

Re: [petsc-users] periodic boundary conditions

2023-07-18 Thread Matthew Knepley
On Tue, Jul 18, 2023 at 9:02 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users wrote: > Hello, > > > > This is exactly not a PETSc question. I am solving a Poisson equation > using finite elements. I would like to impose PBC. I am thinking of using > the Lagrange multiplier method to

[petsc-users] periodic boundary conditions

2023-07-18 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Hello, This is exactly not a PETSc question. I am solving a Poisson equation using finite elements. I would like to impose PBC. I am thinking of using the Lagrange multiplier method to impose them as constraints. Or do you think I could take an alternative approach? Thank you for your help.

Re: [petsc-users] Matrix-free generalised eigenvalue problem

2023-07-18 Thread Quentin Chevalier
My apologies I didn't think the previous message through - the operation USV^H is far from 16 inner products and more like 1 M^2 inner products of length 4. I guess I should try to exploit sparsity of U and V (CSR works in parallel ?) but create a dense R. Cheers, Quentin Quentin CHEVALIER –

Re: [petsc-users] Matrix-free generalised eigenvalue problem

2023-07-18 Thread Quentin Chevalier
Matrix to matrix products are taking much longer than expected... My snippet is below. m and n are quite large, >1M each. I'm running this on 35 procs. As you can see U, S and V are quite sparse SVD matrices (only their first 4 columns are dense, plus a chop). I expected therefore approximate R to