Re: [petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-28 Thread Matthew Knepley
On Fri, Apr 28, 2017 at 2:36 AM, neok m4700 wrote: > Hello Barry, > > Thank you for answering. > > I quote the DMDA webpage: > "The vectors can be thought of as either cell centered or vertex centered > on the mesh. But some variables cannot be cell centered and others

Re: [petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-28 Thread neok m4700
Hello Barry, Thank you for answering. I quote the DMDA webpage: "The vectors can be thought of as either cell centered or vertex centered on the mesh. But some variables cannot be cell centered and others vertex centered." So If I use this, then when creating the DMDA the overall size will be

Re: [petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-27 Thread Barry Smith
> On Apr 27, 2017, at 12:43 PM, neok m4700 wrote: > > Hi Matthew, > > Thank you for the clarification, however, it is unclear why there is an > additional unknown in the case of periodic bcs. > > Please see attached to this email what I'd like to achieve, the number of

Re: [petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-27 Thread neok m4700
Hi Matthew, Thank you for the clarification, however, it is unclear why there is an additional unknown in the case of periodic bcs. Please see attached to this email what I'd like to achieve, the number of unknowns does not change when switching to the periodic case for e.g. a laplace operator.

Re: [petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-27 Thread Matthew Knepley
On Thu, Apr 27, 2017 at 3:46 AM, neok m4700 wrote: > Hi, > > I am trying to change my problem to using periodic boundary conditions. > > However, when I use DMDASetUniformCoordinates on the DA, the spacing > changes. > > This is due to an additional point e.g. in

[petsc-users] explanations on DM_BOUNDARY_PERIODIC

2017-04-27 Thread neok m4700
Hi, I am trying to change my problem to using periodic boundary conditions. However, when I use DMDASetUniformCoordinates on the DA, the spacing changes. This is due to an additional point e.g. in dm/impls/da/gr1.c else if (dim == 2) { if (bx == DM_BOUNDARY_PERIODIC) hx = (xmax-xmin)/(M);