Re: [petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:49 PM Duan Junming wrote: > *From:* knep...@gmail.com > *Sent:* Sunday, June 18, 2023 20:35 > *To:* Duan Junming > *Cc:* petsc-users@mcs.anl.gov > *Subject:* Re: [petsc-users] Advice on small block matrix vector > multiplication > > > On Sun, Jun 18, 2023 at 2:13 PM

Re: [petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Duan Junming via petsc-users
From: knep...@gmail.com Sent: Sunday, June 18, 2023 20:35 To: Duan Junming Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Advice on small block matrix vector multiplication On Sun, Jun 18, 2023 at 2:13 PM Duan Junming via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: Dear all, I

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:21 PM YuSh Lo wrote: > Hi Matthew, > > Yes, I have called DMPlexDistribute(). > > so what I do is: > > CALL DMSetUseNatural(serialDM, PETSC_TRUE, errorCode) > CALL DMPlexDistribute(serialDM, 0, migrationSF, distributedDM, errorCode) > CALL

Re: [petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:13 PM Duan Junming via petsc-users < petsc-users@mcs.anl.gov> wrote: > Dear all, > > I am using DMPlex to manage the unknowns, two fields, one for pressure, > and one for velocities with two/three components, defined in each cell. > They're represented by polynomials,

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread YuSh Lo
Hi Matthew, Yes, I have called DMPlexDistribute(). so what I do is: CALL DMSetUseNatural(serialDM, PETSC_TRUE, errorCode) CALL DMPlexDistribute(serialDM, 0, migrationSF, distributedDM, errorCode) CALL DMPlexGetGlobalToNaturalSF(serialDM, naturalSF, errorCode) CALL PetscSFView(naturalSF,

[petsc-users] Advice on small block matrix vector multiplication

2023-06-18 Thread Duan Junming via petsc-users
Dear all, I am using DMPlex to manage the unknowns, two fields, one for pressure, and one for velocities with two/three components, defined in each cell. They're represented by polynomials, with N (10~50) dofs for each component. I have an operator which can be written in a matrix form (N-by-N,

Re: [petsc-users] Question about using MatCreateAIJ

2023-06-18 Thread Barry Smith
I am concerned this is not good advice being provided. Let's back up and look more closely at your use case. * What is the ratio of new nonzero locations added compared to the initial number of nonzeros for your code, for each of your iterations? * Is it possible for many iterations,

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread Matthew Knepley
On Sun, Jun 18, 2023 at 2:12 AM YuSh Lo wrote: > I am getting a null PetscSF after calling DMPlexGetGlobalToNatural > Did you call DMDIstribute()? This is where the map is created because until then, the map is identity. Thanks, Matt > YuSh Lo 於 2023年6月18日 週日 上午12:18寫道: > >> Hi

Re: [petsc-users] IS natural numbering to global numbering

2023-06-18 Thread YuSh Lo
I am getting a null PetscSF after calling DMPlexGetGlobalToNatural YuSh Lo 於 2023年6月18日 週日 上午12:18寫道: > Hi Matthew, > > After setting DMSetUseNatural to true and calling DMPlexGetGlobalToNatural, > I call PestcSFView right away, it gives segmentation fault. > I have also tried DMGetNaturalSF,