[petsc-users] DMPlex adding boundary without PETSc discretization

Gong Yujie yc17470 at connect.um.edu.mo
Thu Oct 20 08:42:32 CDT 2022


Dear development team,

I'm trying to write a code to solve a partial differential equation. I didn't use PETSc's discretization. I have a question about the implementation of the boundary condition (Dirichlet boundary condition). When implementing the Dirichlet boundary condition. I need to set the corresponding rows in the Jacobian matrix diagonal 1 and others 0. I created the matrix use DMCreateMatrix.

Can I add the Dirichlet boundary condition to the DMPlex mesh so that the Jacobian matrix won't contain these Dirichlet boundary rows? If yes, is there a function that can set the Dirichlet boundary points' value?

Best Regards,
Jerry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221020/79e8183b/attachment.html>


More information about the petsc-users mailing list