<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><br><br><hr id="zwchr"><blockquote id="DWT4815" style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;"><br>On May 23, 2012, at 11:20 PM, Timothy J. Tautges wrote:<br><br>> <br>> <br>> ----- Original Message -----<br>>> From: "Robert Jacob" <jacob@mcs.anl.gov><br>>> To: "Timothy J. Tautges" <tautges@mcs.anl.gov><br>>> Cc: "Iulian Grindeanu" <iulian@mcs.anl.gov>, moab-dev@mcs.anl.gov<br>>> Sent: Wednesday, May 23, 2012 11:17:06 PM<br>>> Subject: Re: [MOAB-dev] Edges at the ends of a periodic mesh?<br>>> This was motivated by a more practical question. If there are N cells<br>>> in the j-direction, there will be N+1 edges but the last is the same<br>>> as<br>>> the first. So in the call to box create, do we specify N vertices in<br>>> the j-direction or N+1? I'm still not sure.<br>>> <br>> <br>> In parallel, N+1, with is_periodic false.  In serial, N, with is_periodic true.<br>> <br>Do you assume the partition is over j direction? What if the partition is over other directions, which ends up with the mesh on each process is really a periodic mesh?<br><br>Xiabing<br></blockquote>So, first you decide if the global mesh is periodic. Let's say it is periodic in i direction.<br><br>When you SCDInterface::compute_partition, you pass gdims [3]-gdims[0] = N+1, where N is the number of cells, even if it is periodic in i.<br><br>If (ldims[3]-ldims[0] == gdims[3]-gdims[0]) it means that your partition was not broken in i direction, so when you create the box, you have to do periodic in i, so it will create only N nodes in i direction.<br><br>It is a bad case (small number of processors, or number of data in j direction is very large compared to i). In "most" of the cases, you should have a break in both directions, then your periodicity will be broken.<br><br>But you have to account for these "worse case scenarios" too.<br><br>Iulian<br><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>> - tim<br>> <br>>> Rob<br>>> <br>>> <br>>> On 5/23/12 10:26 PM, Timothy J. Tautges wrote:<br>>>> Yes. But, in parallel, each piece of mesh looks like a serial mesh,<br>>>> so locally it won't appear periodic (the right hand edge will be<br>>>> distinct from the left hand edge). Logically across processors,<br>>>> though, the right edge on the rightmost processor will be the same<br>>>> as the left edge on the leftmost processor. If you write the mesh to<br>>>> a single file, there will be a common edge between the rightmost and<br>>>> leftmost quad.<br>>>> <br>>>> - tim<br>>>> <br>>>> ----- Original Message -----<br>>>> From: "Robert Jacob"<jacob@mcs.anl.gov><br>>>> To: "Timothy J. Tautges"<tautges@mcs.anl.gov><br>>>> Cc: "Iulian Grindeanu"<iulian@mcs.anl.gov>, moab-dev@mcs.anl.gov<br>>>> Sent: Wednesday, May 23, 2012 9:13:20 PM<br>>>> Subject: Re: [MOAB-dev] Edges at the ends of a periodic mesh?<br>>>> <br>>>> <br>>>> <br>>>> On 5/23/12 9:01 PM, Timothy J. Tautges wrote:<br>>>>> Be careful about the parallel case though, where on each proc<br>>>>> sharing the edge the edge is represented.<br>>>> <br>>>> So in the parallel case the edge WOULD be represented on both sides<br>>>> if<br>>>> there are multiple processors in the j direction?<br>>>> <br>>>> Rob<br>>>> <br>>>>> <br>>>>> Also, if you're just trying to create all the edges in one big<br>>>>> batch, just put all the quads in a range, then call<br>>>>> get_adjacencies, with the last argument Interface::UNION, and that<br>>>>> should create/return all of them.<br>>>>> <br>>>>> - tim<br>>>>> <br>>>>> ----- Original Message -----<br>>>>> From: "Iulian Grindeanu"<iulian@mcs.anl.gov><br>>>>> To: "Robert Jacob"<jacob@mcs.anl.gov><br>>>>> Cc: moab-dev@mcs.anl.gov<br>>>>> Sent: Wednesday, May 23, 2012 12:34:12 PM<br>>>>> Subject: Re: [MOAB-dev] Edges at the ends of a periodic mesh?<br>>>>> <br>>>>> <br>>>>> <br>>>>> <br>>>>> ----- Original Message -----<br>>>>> <br>>>>> <br>>>>> <br>>>>> Hi,<br>>>>> <br>>>>> If I have a 2D rectangular mesh which is periodic in one direction,<br>>>>> lets<br>>>>> say the j direction, then the leftmost and rightmost edge of the<br>>>>> mesh<br>>>>> are really the same edge. Do they both need to be declared in MOAB?<br>>>>> Or<br>>>>> does the periodic property mean you only need to describe one of<br>>>>> the<br>>>>> edges and the other end will know its adjacent to it?<br>>>>> <br>>>>> Thanks,<br>>>>> Rob<br>>>>> Hi,<br>>>>> I assume that you use ScdInterface;<br>>>>> If the box is periodic in j direction, the nodes in that direction<br>>>>> will be "periodic".<br>>>>> Nodes are not duplicated, the edges that you get on the leftmost<br>>>>> and rightmost sides are really pointing to the same nodes, they<br>>>>> will not be duplicated, either.<br>>>>> <br>>>>> How do you get edges after you create quads?<br>>>>> You can use "get_adjacency" methods, with "create_if_missing" flag<br>>>>> true. Only one edge would be created.<br>>>>> The problem is that the order in which these are created is not<br>>>>> very "structured"<br>>>>> Or do you create them with new scd boxes, of dimension 1, in a loop<br>>>>> over i (and then j?)? In that case, you have complete control over<br>>>>> "order" they are created in.<br>>>>> I hope this helps.<br>>>>> Iulian<br>>>>> <br>>>>> <br>>>>> Iulian<br>>>>> <br>>>> <br><br></blockquote><br></div></body></html>