<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> 於 2023年5月31日 週三 下午1:02寫道:<br></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 dir="ltr">On Wed, May 31, 2023 at 1:53 PM YuSh Lo <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@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 dir="ltr">Hi Matthew, </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> 於 2023年5月31日 週三 上午5:08寫道:<br></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 dir="ltr">On Wed, May 31, 2023 at 1:25 AM YuSh Lo <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@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">Hi,<div><br></div><div>I have some multiple points constraint input as follows,</div><div><br></div><div>A_1 a_4 </div><div>B_2 b_5</div><div>C_3 c_6</div><div><br></div><div>each columns are stored in different IS.</div></div></blockquote><div><br></div><div>So one IS lists the capital letter and one lists the lowercase?</div></div></div></blockquote><div> Yes.</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 class="gmail_quote"><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>After dmplex distribute, they will be renumbered and distribution to certain processors. </div></div></blockquote><div><br></div><div>Plex does normally renumber and send ISes, so you are doing this yourself?</div></div></div></blockquote><div> No, Plex does the distribution. </div></div></div></blockquote><div><br></div><div>I do not understand this. How does the DM know about this IS? Are you calling DMDistributeFieldIS()?</div></div></div></blockquote><div> I first create a serial DM and use DMLabel to mark those nodes, and store them in IS. Then I call DMPlexDistribute. </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 class="gmail_quote"><div> <br></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 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 class="gmail_quote"><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>I have two questions:</div><div><br></div><div>(1) I need both complete ISs are all the processors. Can I just do ISALLGather()?</div></div></blockquote><div><br></div><div>I think so. I cannot tell what you want to do.</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>(2) Although renumbered, will the original order remain(ABC and abc)?</div><div>If the number is the node number, after distribution and I do an ISALLGather()</div><div>will I have the following on each processor?</div><div><br></div><div>A_3 a_1</div><div>B_4 b_2</div><div>C_6 c_5</div><div>(I randomly renumber them)</div><div><br></div><div><br></div><div>This is what I can come up with now. Is there any better way to do it? </div></div></blockquote><div><br></div><div>Can you tell me what you want to use this for? Maybe there is an easier way. For example,</div><div>if we want to impose a constraint on a mesh point, usually I mark that point with a DMLabel.</div><div>These are propagated during distribution so you do not have to think about it.</div></div></div></blockquote><div><br></div><div> So I have to impose constraint between two nodes. The upper case node is controlled by the lower case node, and there can be many pairs of constraint. When looping over elements if one node is controlled by the other then the corresponding entry has to be added to a different location e.x. [an index][A_3] to [an index][a_1]. I know how to use DMLabel, but I have used it on one node at a time only. I used DMLabel to mark those nodes with BCs. Now I must know the info of two nodes at the same time. The operations only have to done in assembling and calculating the element stiffness matrix of the elements that contain the upper case node, but I must know the info of the corresponding lower case node so I know where to assemble the entry. </div></div></div></blockquote><div><br></div><div>Oh, if you want to associate two mesh points, use a PetscSF. These can also be remapped.</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 class="gmail_quote"><div>Thanks,</div><div>Josh</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 class="gmail_quote"><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>Thanks,</div><div>Josh</div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>
</blockquote></div></div>