Re: [petsc-users] DMPlex shared node indexing

2021-11-26 Thread Matthew Knepley
On Fri, Nov 26, 2021 at 12:49 AM 袁煕 wrote: > Dear PETSc-team, > > When the mesh is distributed, the vertices are renumbered and some > vertices are shared by neighboring CPUs. My question is: > > 1. How to check which vertice is a ghost one? > It is present in the PetscSF describing the

Re: [petsc-users] How to set boundary conditions for a structured finite volume (FV) discretization when using TS/SNES?

2021-11-26 Thread Matthew Knepley
What we do in the FVM examples is to use ghost cells around the boundary. Then the state in these cells is set so that the flux on the boundary surface is exactly what you want. You could also prescribe the fluxes directly, but that is not as natural in the setup I have used for FVM. Thanks,

Re: [petsc-users] configure error with fftw and without mpi

2021-11-26 Thread Fabio Rossi via petsc-users
Thank you Barry! Backported the patch to 3.16.0 and tested! I'll try to integrate downstream in Gentoo (https://bugs.gentoo.org/827185). Fabio > Il 26/11/2021 05:15 Barry Smith ha scritto: > > > > I have made a branch barry/2021-11-25/feature-fftw-seq  >

Re: [petsc-users] How to check NULL pointer in Fortran

2021-11-26 Thread Barry Smith
I believe I have fixed the bug in the branch barry/2021-11-26/fix-petscsfgetgraph-fortran/release https://gitlab.com/petsc/petsc/-/merge_requests/4605 See src/vec/is/sf/tutorials/ex1f.F90 for how to check if the returned value is a

Re: [petsc-users] DMPlex shared node indexing

2021-11-26 Thread Barry Smith
Actually, with DMPLEX the ghost vertices are not at the end of the local vector, they can be anywhere within the list. But I have a work-in-progress branch https://gitlab.com/petsc/petsc/-/merge_requests/4542 that labels the ghost

Re: [petsc-users] How to set boundary conditions for a structured finite volume (FV) discretization when using TS/SNES?

2021-11-26 Thread Barry Smith
Could you be more specific in saying how it fails (can you share the actual prototype code?) Note here you seem to be missing a /dx term G[i] = (u[i+1] - u[i]) - q_A; //Neumann BC: du/dx(x=0.0) = q_A; Barry > On Nov 26, 2021, at 4:02 AM, zhfreewill wrote: > > Hi all, >

Re: [petsc-users] Error Writing Large HDF5 File

2021-11-26 Thread Lawrence Mitchell
This is failing setting the chunksize: https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/da/gr2.c#L517 It is hard for me to follow this code, but it looks like the chunk is just set to the total extent of the DA (on the process?). This can grow too large for HDF5, which has limits described

[petsc-users] Error Writing Large HDF5 File

2021-11-26 Thread David Scott
Hello, I am trying to write out HDF5 files. The program I have works all right up to a point but then fails when I double the size of the file that I am trying to write out. I have attached a file containing the error message and another file containing the short program that I used to generate

Re: [petsc-users] DMPlex shared node indexing

2021-11-26 Thread Mark Adams
First, ghost vertices only show up in "local" (vs "global") vectors and the ghost values are ordered after the locally owned ones. Others might have more to add. Mark On Fri, Nov 26, 2021 at 12:49 AM 袁煕 wrote: > Dear PETSc-team, > > When the mesh is distributed, the vertices are renumbered and

[petsc-users] How to set boundary conditions for a structured finite volume (FV) discretization when using TS/SNES?

2021-11-26 Thread zhfreewill
Hi all, I have a basic question on how to apply B.C. for a cell-centered structured FV discretization when using the SNES and Ts object. For instance, for a 1-D transient diffusion equation *u_t = u_xx, 0 < x < 1* with IC: *u(x,t=0) = 0;* and Dirichlet BC: *u(x=0) = u_A = 0.0;* *u(x=1) = u_B