parallelization - boundaries

5 views
Skip to first unread message

Jan Kis

unread,
Jun 4, 2012, 11:01:51 AM6/4/12
to open...@googlegroups.com
Hi Guys,

I have added some ideas on what the different boundary classes can be to my blog:
It discusses the different kinds of boundaries and how to utilize them by having special boundaries in distributed version. Feel free to comment on anything what is not clear and what you think would not work :)

Cheers,
Jan

Andreas Ipp

unread,
Jun 4, 2012, 11:51:58 AM6/4/12
to open...@googlegroups.com
Looks good. One should not forget that also diagonal boundaries would be required (for example for the "SCATTER" stage), so in 2 dimensions, each node has 8 neighbors (but I assume you left those out in order not to clutter the graphics).

I wonder, how difficult would it be at this stage to allow not only for "1 past the last one" (in grid boundary for hardwall, periodic, and gate), but "n past the last one" with n being a user-definable number (e.g. n=1, 2, 3, ...), where n of course is less than (or equal to) the smallest grid size of a node. This could be a global number for the whole simulation. Higher-order algorithms for derivative and curl may require access to n neighboring cells in each direction. If it is not a big problem, one could introduce this variable. If you think it would complicate things a lot, let's just hard-code 1 for now.

Also, in the graphics "boundary classes", the grid classes and particle classes seem completely unrelated. While it may be interesting to explore situations where nodes are connected differently for grids or particles, in most physical cases they would be connected in the same way (e.g. if grid 1 bottom border is connected to grid 3 top border, then also particle border 1 bottom will be connected to particle border 3 top). So i wonder if it would make sense to establish the connection only once, and let both, particles and grids, communicate over the same connection? Maybe this is just a detail of implementation.

Cheers
Andreas

Jan Kis

unread,
Jun 4, 2012, 12:09:58 PM6/4/12
to open...@googlegroups.com
Looks good. One should not forget that also diagonal boundaries would be required (for example for the "SCATTER" stage), so in 2 dimensions, each node has 8 neighbors (but I assume you left those out in order not to clutter the graphics).

I am counting with that :), I just forgot to mention that in the description of the picture. 

I wonder, how difficult would it be at this stage to allow not only for "1 past the last one" (in grid boundary for hardwall, periodic, and gate), but "n past the last one" with n being a user-definable number (e.g. n=1, 2, 3, ...), where n of course is less than (or equal to) the smallest grid size of a node. This could be a global number for the whole simulation. Higher-order algorithms for derivative and curl may require access to n neighboring cells in each direction. If it is not a big problem, one could introduce this variable. If you think it would complicate things a lot, let's just hard-code 1 for now. 

The problem is I do not know how much it would complicate things at this stage :) I definitely agree that in the code we should not have +1 but use a constant instead (eg. BOUNDARY_WIDTH = 1). However, to simplify things I would skip the thought of larger boundary width for now. I would introduce the constant now (I mean in the near future when I will write the code) and address this issue once we have at least the simplest version working.  

Also, in the graphics "boundary classes", the grid classes and particle classes seem completely unrelated. While it may be interesting to explore situations where nodes are connected differently for grids or particles, in most physical cases they would be connected in the same way (e.g. if grid 1 bottom border is connected to grid 3 top border, then also particle border 1 bottom will be connected to particle border 3 top). So i wonder if it would make sense to establish the connection only once, and let both, particles and grids, communicate over the same connection? Maybe this is just a detail of implementation.

We definitely do not want to have two open connections with one node but as you said this is an implementation detail, so we still can have a separate particle and grid boundary. I think we also want that since the former works with particles whereas the latter with boundary which are two quite different things. If we always want one kind of grid boundary to go with one kind of particle boundary there are other ways how to enforce that.
Reply all
Reply to author
Forward
0 new messages