You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A grid with holes in it is a valid grid, so putting under the normal validation function doesn't make sense. I just need a function to return whether a grid has holes or not for the dual mesh, because if a grid has holes in it, it should be approached differently especially when it comes to DataArrays.
A grid with holes in it is a valid grid, so putting under the normal validation function doesn't make sense. I just need a function to return whether a grid has holes or not for the dual mesh, because if a grid has holes in it, it should be approached differently especially when it comes to DataArrays.
validation if you see the file grid/validation.py there are functions such as _check_connectivity _check_duplicates etc., you can add something to detect holes _detect_holes a new function is not required.
The problem is the dual mesh must be constructed in a way that respects the topology of the original mesh, which can be non-trivial. What you really need is the idea of "geometry" and "mesh", it might be doable without the computational geometry here as we limit ourselves to spherical and earth type topology/meshes.
A grid with holes in it is a valid grid, so putting under the normal validation function doesn't make sense. I just need a function to return whether a grid has holes or not for the dual mesh, because if a grid has holes in it, it should be approached differently especially when it comes to DataArrays.
validation if you see the file grid/validation.py there are functions such as _check_connectivity _check_duplicates etc., you can add something to detect holes _detect_holes a new function is not required.
The problem is the dual mesh must be constructed in a way that respects the topology of the original mesh, which can be non-trivial. What you really need is the idea of "geometry" and "mesh", it might be doable without the computational geometry here as we limit ourselves to spherical and earth type topology/meshes.
I opened a PR earlier with my implementation idea, could you give it a review so I can better understand how you want it to be organized? I added a similar thing as what you said above, but I don’t know that it’s exactly what you are saying.
#899 is the PR number, I changed the name of the issue as I think it might have been poorly worded and possibly confusing. I don't want to add a new validation function, I simply just want to add a check for holes function inside of validation.py
This is a much needed check that we should include.
Looping @hongyuchen1030 in for any inputs on this. We can chat about the algorithm in next weeks UXarray meeting.
All face in the Uxarray grid should be convex. And this mean there will not be any "hole" inside
And before answering the "is Hole inside" algorithm, please think about the following question first:
How to detect if a point is inside a face on the spherical surface. (I know the immediate answer is ray-casting, but we are on the spherical surface, so the ray will go back!)
Activity
rajeeja commentedon Aug 22, 2024
aaronzedwick commentedon Aug 22, 2024
A grid with holes in it is a valid grid, so putting under the normal validation function doesn't make sense. I just need a function to return whether a grid has holes or not for the dual mesh, because if a grid has holes in it, it should be approached differently especially when it comes to DataArrays.
rajeeja commentedon Aug 22, 2024
validationif you see the filegrid/validation.pythere are functions such as_check_connectivity _check_duplicatesetc., you can add something to detect holes_detect_holesa new function is not required.The problem is the dual mesh must be constructed in a way that respects the topology of the original mesh, which can be non-trivial. What you really need is the idea of "geometry" and "mesh", it might be doable without the computational geometry here as we limit ourselves to spherical and earth type topology/meshes.
aaronzedwick commentedon Aug 22, 2024
I opened a PR earlier with my implementation idea, could you give it a review so I can better understand how you want it to be organized? I added a similar thing as what you said above, but I don’t know that it’s exactly what you are saying.
[-]Validation Function For Meshes With Holes[/-][+]Function to Check For Meshes With Holes[/+]aaronzedwick commentedon Aug 22, 2024
#899 is the PR number, I changed the name of the issue as I think it might have been poorly worded and possibly confusing. I don't want to add a new validation function, I simply just want to add a check for holes function inside of
validation.pyphilipc2 commentedon Aug 23, 2024
This is a much needed check that we should include.
Looping @hongyuchen1030 in for any inputs on this. We can chat about the algorithm in next weeks UXarray meeting.
hongyuchen1030 commentedon Aug 23, 2024
All face in the Uxarray grid should be convex. And this mean there will not be any "hole" inside
And before answering the "is Hole inside" algorithm, please think about the following question first:
hongyuchen1030 commentedon Aug 23, 2024
@aaronzedwick And I also add a comment for the current implementation in the PR #899 (comment)
Such implementation idea is not checking the hole, but to see if a face has FEWER nodes than other faces.
rajeeja commentedon Aug 23, 2024
Oh, in that case it'd come out as True for a mesh with faces with different numbers of edges (mixed mesh, eg. tri/quad/hex etc.)
hongyuchen1030 commentedon Aug 24, 2024
Sorry for the misunderstanding about the purpose of such a function. The updated comment listed here. #899 (comment)
Basically my question is why this function and what's the following steps for such function.