jsitaraman / tioga

Tioga is a library for overset grid assembly on parallel distributed systems
GNU Lesser General Public License v3.0
67 stars 36 forks source link

How to differentiate between in/field, hole and fringe cells #43

Closed mennodeij closed 4 years ago

mennodeij commented 4 years ago

I'm testing tioga with a 3D overset grid assembly in which one grid ('foreground') is completely within another grid ('background'). I have a couple of questions about this.

  1. When I run tioga, I only get cell status 1 or -1 on both grids, is that supposed to happen? I see that cell status of 1 is always an in/field cell, and cell status of -1 is a fringe cell on the foreground grid and a hole cell on the background grid.
  2. If so, how can I differentiate between in/field cells, hole cells and fringe cells (without prior knowledge of which grid is foreground and which is background)?
sayerhs commented 4 years ago

@mennodeij TIOGA iblank has three states

See the following image.

Screen Shot 2020-10-19 at 9 50 25 AM

Your second question doesn't make sense to me. You'll have to tell TIOGA some information about the meshes that you're sending it... specifically you'll have to give it information on the wall boundaries (so that it can identify hole nodes) and overset boundaries (so that it can tag those nodes in the foreground mesh that you mentioned) as mandatory fringes. If you just give it two meshes, with similar cell resolutions then it doesn't really have a good criteria to pick one vs. the other and the results might not be what you expect.

Another thing I would point out is that TIOGA doesn't cut a hole in the background mesh by default. It will tag all the cells that lie inside another mesh (with a smaller cell resolution) as receptors and tag them with IBLANK = -1. There is an option reduce_fringes that you can use to detect this and minimize the number of receptor nodes and deactivate the remaining cells that are entirely surrounded by fringe/hole.

mennodeij commented 4 years ago

Indeed, I’m giving node tags to the boundary of the overset mesh (obcnode) and to the wall (wbcnode) using arrays in the two tioga_registergrid_data_mb calls, one for the foreground and one for the background grid.

Thanks for pointing out the hole cutting behaviour for the background grid, that is probably why I don’t see any iblank=0 values.

mennodeij commented 4 years ago

Ok, it is clear to me now how this works and that reduce_fringes is used to cut holes.