[petsc-dev] KSP in DMPlex

Faibussowitsch, Jacob jfaibussowitsch at anl.gov
Thu Nov 14 12:30:38 CST 2019


Hello,

So I am trying to make a simple 5 pt stencil finite difference laplacian operator (https://akmitra.public.iastate.edu/aero361/design_web/Laplace.pdf) work on a dmplex mesh, but all of the examples that I have found in ksp/examples/tutorials all use DMDA. The only way that I have managed to get the KSP to even run is by creating the operator matrix myself by hand. The workflow for the working implementation is as follows:

DMPlexMakeBoxMesh -> KSPCreate -> KSPsetDM -> KSPDeactiveDM -> Make the matrix by hand ->  KSPSetOperator(matrix) -> KSPSetComputeRHS -> Solve

Given that I tether KSP to the DM by KSPSetDM, but then immediately deactivate it (because then it complains about mallocs), this doesn’t work when reading in an actual unstructured mesh. Does KSP just not support dmplex?

Best,

Jacob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20191114/2cebaaf6/attachment.html>


More information about the petsc-dev mailing list