[petsc-users] Poisson problem with boundaries inside the domain
Smith, Barry F.
bsmith at mcs.anl.gov
Mon Oct 30 10:58:31 CDT 2017
If you using DMDA then you can't just "remove" some grid points from the vector.
What you need to do is for your function evaluation at these interior grid points do f[j][i] = u[j][i] - ub in the FormFunction (ub is the Dirichlet value) and put a 1 one the diagonal of that row of the Jacobian (and nothing off diagonal).
Barry
> On Oct 30, 2017, at 10:49 AM, Mani Chandra <mc0710 at gmail.com> wrote:
>
> Hello,
>
> I'm trying to solve the Poisson problem but with Dirichlet boundaries inside the domain (in addition to those imposed in the ghost zones). I'm using DMDA to create a structured grid and SNES coupled to this DMDA to solve the problem.
>
> The issue is that SNES doesn't converge when I impose Dirichlet boundary values inside the domain. I tried setting the residual corresponding to these internal points to zero but that isn't helping. Is there a right way to approach this problem? I just want to tell SNES to remove the chosen internal grid points from the solver iterations.
>
> Thanks,
> Mani
More information about the petsc-users
mailing list