[petsc-users] Is use of Mirror Boundary with Box Stencil supported for 2D?
Barry Smith
bsmith at petsc.dev
Thu Feb 19 21:37:32 CST 2026
I believe the error checking is in place due to how to manage the extreme ghost corners of a rectangular (or box) region. Consider the grid with values as indicated
1 2 3 4 5
6 7 8 9 10
that we mirror in both directions with
x 6 7 8 9 10 y
2 1 2 3 4 5 4
7 6 7 8 9 10 9
z 1 2 3 4 5 w
I think it is likely I did not want to think about this case when I wrote the code hence put the error checking in.
Quickly looking now it seems the mirroring is well defined so it is possible the error checking is not needed so long as the code properly handles those points. Sadly the code to set up all the communication patterns is complicated and my short-term memory was too small to be able to think about the box code.
The code is in src/dm/impls/da/da2.c I hope you have more stamina than I do and can take a look at it and see if it needs changes etc.
Note that if you install PETSc not using a —prefix configure options you can change the code and just run make libs in a PETSc directory with PETSC_DIR (and PETSC_ARCH) set and it will update the library so you first turn off the error check and see what happens.
If you can get it to work please let us know, it would be nice to support this case. Good luck
Barry
]
> On Feb 19, 2026, at 9:08 PM, Macneice, Peter J. (GSFC-6740) via petsc-users <petsc-users at mcs.anl.gov> wrote:
>
>
> From my searching of the documentation, it looks to me as though this combination should work.
> However for my modified version of the ex66.c tutorial code, I get the error message below.
>
> Is this really not yet supported?
>
>
> Regards
>
> Peter MacNeice
>
>
>
>
> [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
> [0]PETSC ERROR: No support for this operation for this object type
> [0]PETSC ERROR: Mirror boundary and box stencil
> [0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!
> [0]PETSC ERROR: Option left: name:-dm_view (no value) source: command line
> [0]PETSC ERROR: Option left: name:-ksp_monitor (no value) source: command line
> [0]PETSC ERROR: See https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!c4lEIB-12hqgDjSzBQ8Q3sro45es-1d6wdQ2tLBRtAUg6mudiRWjcIFMcTu1RZYjSTK1WPXqCKVkPyoOIdVy568$ <https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!boqIOhIgncdTr1z60slIrCjusZEY0_bk-qkGbrlrmiepTiBAvCwW8s9c1IQ6vyT4fOeshVO3Bsu1F5HuERiBGRsq1r2LJ1zBtrM$> for trouble shooting.
> [0]PETSC ERROR: PETSc Release Version 3.24.3, Jan 01, 2026
> [0]PETSC ERROR: ex66_9pt with 1 MPI process(es) and PETSC_ARCH arch-darwin-c-debug on gs67-5186361 by pmacneic Thu Feb 19 21:03:16 2026
> [0]PETSC ERROR: Configure options: --with-mpi-dir=/Users/pmacneic/mpich-install-3.3-gcc15 --force
> [0]PETSC ERROR: #1 DMSetUp_DA_2D() at /Users/pmacneic/petsc-3.24.3/src/dm/impls/da/da2.c:212
> [0]PETSC ERROR: #2 DMSetUp_DA() at /Users/pmacneic/petsc-3.24.3/src/dm/impls/da/dareg.c:17
> [0]PETSC ERROR: #3 DMSetUp() at /Users/pmacneic/petsc-3.24.3/src/dm/interface/dm.c:807
> [0]PETSC ERROR: #4 main() at ex66_9pt.c:77
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -dm_view (source: command line)
> [0]PETSC ERROR: -ksp_monitor (source: command line)
> [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint at mcs.anl.gov----------
> application called MPI_Abort(MPI_COMM_SELF, 56) - process 0
>
>
>
>
>
>
>
> Macneice, Peter J. (GSFC-6740)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260219/d353052c/attachment-0001.html>
More information about the petsc-users
mailing list