<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class="">Dear PETSc developer team,</div><div class=""><br class=""></div><div class="">I m trying to create à jacobian_matrix from distributed DM. I have followed the two examples (snes/tests/ex2.c and ex56.c). So I wrote this routine:</div><div class=""><br class=""></div><div class="">PetscDM orig_dm;</div><div class="">PetscDM dist_dm = NULL;</div><div class="">PetscPartitioner part;</div><div class="">DMPlexGetPartitioner(orig_dm, &part);</div><div class="">PetscPartitionerSetType(part, PETSCPARTITIONERPARMETIS);</div><div class="">DMPlexDistribute(orig_dm, 0, NULL, &dist_dm);</div><div class=""><br class=""></div><div class=""><b class="">PetscErrorCode err = DMCreateMatrix(dist_dm, &jacobian_matrix);</b></div><div class="">PetscInt M, N, m, n;</div><div class="">MatGetSize(jacobian_matrix, &M, &N);</div><div class="">MatGetLocalSize(jacobian_matrix, &m, &n);</div><div class=""><br class=""></div><div class="">Then I run my code with 2 processes and I obtained this result:</div><div class=""><b class="">Size from jacobian_matrix: M=0 m =0 (this result is the same in all processes).</b></div><div class=""><br class=""></div><div class="">I didn't understand if I forgot something in my code to obtain the correct values for the local and global sizes for the jacobean_matrix? (I mean if my code is missing something to obtain a distributed mesh over processes ?)</div><div class=""><br class=""></div><div class="">Thank you in advance for any help!</div><div class="">Sami,</div></div><div class=""><br class=""></div><br class=""><div class="">
<meta charset="UTF-8" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">--</div><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dr. Sami BEN ELHAJ SALAH<br class="">Ingénieur de Recherche (CNRS)<br class="">Institut Pprime - ISAE - ENSMA<br class="">Mobile: 06.62.51.26.74<br class=""><a href="mailto:sami.ben-elhaj-salah@ensma.fr" class="">Email: sami.ben-elhaj-salah@ensma.fr</a></div><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><a href="https://samiben91.github.io/samibenelhajsalah/index.html" class="">www.samibenelhajsalah.com</a><br class=""><br class=""><br class=""></div></div></div></div>
</div>
<br class=""></body></html>