[petsc-users] DMDA matrices with one sided stencils

Alfredo J Duarte Gomez aduarteg at utexas.edu
Fri Sep 10 11:51:57 CDT 2021


Good afternoon,

I have developed and validated some matrix operators using petsc with a
structured dmda.

Some of these operators use one-sided stencils at the boundaries, which
following the way the dmda uses the stencil width value, requires me to
increase the stencil width to accommodate more entries at the boundary only
if I want to avoid errors with default options.

This is very wasteful and affects my performance, since there are a lot of
extra zeros corresponding to the inner points.

What is the best way to improve this?

I have read in some public threads the possibility of using MatOption to
allow us to put more entries into the matrix, but that does not allow me to
use MatSetStencil?

Alternatively, is there any way to use a larger stencil width and then trim
the zero entries that were entered automatically?

If there are any other solutions for this problem, please let me know.

Thank you,

-Alfredo Duarte

-- 
Alfredo Duarte
Graduate Research Assistant
The University of Texas at Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210910/80242157/attachment.html>


More information about the petsc-users mailing list