<div dir="ltr">Hi Petsc Users,<br><br><br>I am working on setting up the star forest to connect my meshes on different processors. <br><br>For a 2-processor example, I have set up a dmplex object and read in the coordinates nodes and cell2node charts on each one. But right now they are independent effectively.<br><br>For simplicity lets just say each process has 4 cells. <br><br><img src="cid:ii_la73euyu0" alt="image.png" width="511" height="115"><br><br>I'm trying to build the star forest that sets the edge between the two partitions. (see fig)<br><br>To my understanding, I do this using PetscSFSetGraph. I choose either 9-10 on rank 0 or 1-2 on rank 1 to be the "roots". For simplicity lets say the 1-2 on rank 1 are roots. <br><br>(also for the rest of the discussion I'm switching 1 and 2 to be 0 and 1 and 9 and 10 to be 8 9 ) (the figure is 1 indexed but for the code below it will be 0)<div><br>So on rank 0 I would set <br><br>nleaves=2<br>nroots= 8+c1  (graph is only cells and verts so its 8 verts plus the cell count(c1)<br><br><div>remote[0].rank=1<br>remote[0].index=0+(cell count on rank1) <br>leaf[0]=8+c1<div><br></div><div>remote[1].rank=1</div><div>remote[1].index=0+(cell count on rank1) <br>leaf[1]=9+c1</div><div><br><br>and on rank 1 we would set <br><br>nroots= ncells+nverts<br>nleaves=0 <br><br>Since its all roots I don't think I need to set anything else?<br><br><br><br>PetscSFSetGraph(sf,nroots,nleaves,leaves,PETSC_COPY_VALUES,remote,PETSC_COPY_VALUES)<br><br>I am certain I am making a mistake somewhere since I get an error when I then call PetscSFSetup. I am working in C++ right now but this is just testing out before implementation in fortran which is why I am using PETSC_COPY. <br><br>Any help and clarification would be appreciated.<br><br><br>Sincerely <br>Nicholas<br><br><br clear="all"><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><font color="#000000">Nicholas Arnold-Medabalimi<br><br></font><span style="font-family:sans-serif;font-size:14px">Ph.D. Candidate</span><font color="#000000"><br>Computational Aeroscience Lab<br>University of Michigan</font></div></div></div></div></div></div></div></div></div>