Hello,
I'm using a structur
Hello,
I'm using a structured (orthogonal squared cells) grid, and I need to implement an algorithm which requires the values of a variable in the "above"/"below", "left"/"right", "front"/"back" cells. Is there a quick way to identify these cells? |
short answer: hmmm, sort of.
short answer: hmmm, sort of.
The fastest way as I see it is to access all the faces, check their face-normals and depending on their direction determine if they are left or right, et c. from that create a mapping of left -> face i, right -> face j, et c. (which of course require some mesh class hacking) you probably only need to do this once for a static mesh and after this it should be fast. |
Hmmm. Thanks for your reply Ni
Hmmm. Thanks for your reply Niklas.
I have a doubt on how the boundary cells are managed. I mean, I have 4 neighbours for the "internal" cells, but only 2 or 3 for the boundary cells, which are exceptions because they have one or more lacking "directions". How that procedure can identify them? Regards, Alberto |
All times are GMT -4. The time now is 12:11. |