<div dir="ltr"><div dir="ltr">On Wed, May 27, 2020 at 4:14 AM Prateek Gupta <<a href="mailto:prateekgupta1709@gmail.com">prateekgupta1709@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi, <br></div><div>I am new to using petsc and need its nonlinear solvers for my code. I am currently using parmetis (outside petsc) to partition an unstructured mesh element-wise, but working with data on the vertices of the mesh. <br></div><div>Consequently, I have repeated vertices in different MPI-processes/ranks. At the solver stage, I need to solve for the data on vertices (solution vector is defined on the vertices). So, I need to create a distributed vector over vertices of the mesh, but the distribution in MPI-ranks is not contiguous since partitioning is (has to be) done element wise. I am trying to figure out,</div><div>1. if I need only Local to Global IS or do I need to combine them with AO? <br></div><div>2. Even at the VecCreateMPI stage, is it possible to inform petsc that, although, say, rank_i has n_i components of the vector, but those components are not arranged contiguously? <br></div><div><br></div><div>For instance, <br></div><div><br></div><div>Global vertices vector v : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]</div><div>v_rank_1 : [2, 3, 4, 8, 9, 7] ; v_rank_2 : [0, 1, 2, 3, 6, 10, 11, 8, 9, 5]</div></div></blockquote><div><br></div><div>PETSc is going to number the unknowns contiguously by process. If you want to also have another numbering, as above,</div><div>you must handle it somehow. You could use an AO. However, I believe it is easier to just renumber your mesh after</div><div>partitioning. This is what PETSc does in its unstructured mesh code.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Any help is greatly appreciated.<br></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><div>Thank you.<br>Prateek Gupta</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>