Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

levelset: interface intersection #462

Merged
merged 7 commits into from
Jul 31, 2024
Merged

Conversation

ksamouchos
Copy link
Contributor

@ksamouchos ksamouchos commented Apr 12, 2024

  1. Introduce the pixel, triangle and polygon intersection with plane.
  2. Allow the intersection of interfaces with smoothed continuous surface. It's mandatory for the conversion of Immerflow to a cut-cell software.

@ksamouchos ksamouchos self-assigned this Apr 12, 2024
@ksamouchos ksamouchos changed the title Levelset.interface.intersection levelset: Interface Intersection Apr 12, 2024
@andrea-iob andrea-iob changed the title levelset: Interface Intersection levelset: interface intersection Apr 12, 2024
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 25d9137 to 7ca7c9d Compare April 24, 2024 14:27
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 7ca7c9d to 4965845 Compare May 14, 2024 17:48
@ksamouchos
Copy link
Contributor Author

Rebased on current branch #461

@ksamouchos ksamouchos marked this pull request as ready for review May 14, 2024 17:49
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 4965845 to 705e4ec Compare May 16, 2024 16:49
@ksamouchos
Copy link
Contributor Author

Rebased on current branch #461

@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 705e4ec to 3902e37 Compare May 31, 2024 10:49
@ksamouchos
Copy link
Contributor Author

Rebased on current branch #461

@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 3902e37 to d330f22 Compare June 5, 2024 17:27
@ksamouchos
Copy link
Contributor Author

Rebased on current branch #461. Additionally, small modifications were made to enable the return of the intersection point between an interface and the boundary.

@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from d330f22 to a64ee6c Compare June 6, 2024 12:05
@ksamouchos
Copy link
Contributor Author

Rebased on current master

src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetKernel.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetKernel.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetObject.hpp Outdated Show resolved Hide resolved
src/levelset/levelSetObject.hpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from a64ee6c to f5688a3 Compare June 21, 2024 19:15
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch 2 times, most recently from 4101be8 to 05c6c60 Compare July 3, 2024 11:25
@ksamouchos
Copy link
Contributor Author

ksamouchos commented Jul 3, 2024

After the review of @andrea-iob and the discussion I had with @marcocisternino and @andrea-iob I completely changed this branch by reprogramming everything from scratch. New features are introduced and others are removed. The new version is more generic and does not depend exclusively on my work related to the cut-cell method. This branch is responsible for:

  1. introducing the pixel, triangle and polygon intersections with planes
  2. the intersecting interfaces with smoothed continuous surfaces

The considerable amount of modifications requires a new review to the whole pull-request.

src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/levelset/levelSetSegmentationObject.cpp Outdated Show resolved Hide resolved
src/patchkernel/patch_kernel.cpp Outdated Show resolved Hide resolved
src/patchkernel/patch_kernel.cpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
src/CG/CG_elem.cpp Outdated Show resolved Hide resolved
@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 05c6c60 to 193862f Compare July 19, 2024 13:26
@ksamouchos
Copy link
Contributor Author

I updated the branch following the review of @andrea-iob . I believe that @edoardolombardi and @roccoarpa should also be added as reviewers, because this pull-request affects their work.

@roccoarpa
Copy link
Contributor

hello @ksamouchos, thank you for the warning, but for me it's difficult to do a proper review since there's lot of stuff going on in this pull (not only the part that interest me). This is my personal opinion: for me it's ok whatever you decide to do, as long as the code works and it's properly tested. I will update my part in mimic eventually. Ty.

@ksamouchos
Copy link
Contributor Author

hello @ksamouchos, thank you for the warning, but for me it's difficult to do a proper review since there's lot of stuff going on in this pull (not only the part that interest me). This is my personal opinion: for me it's ok whatever you decide to do, as long as the code works and it's properly tested. I will update my part in mimic eventually. Ty.

ok, thank you for your kind response

@ksamouchos ksamouchos force-pushed the levelset.interface.intersection branch from 193862f to 380f09b Compare July 24, 2024 13:20
@andrea-iob
Copy link
Member

The changes are fine, however explicitly using the triangulation functions of the CG module would have been better because if these function are improved (for example adding support for concave polygons), also the intersection functions will befit of this improvements for free.

@ksamouchos
Copy link
Contributor Author

ksamouchos commented Jul 25, 2024

The changes are fine, however explicitly using the triangulation functions of the CG module would have been better because if these function are improved (for example adding support for concave polygons), also the intersection functions will befit of this improvements for free.

The algorithm works fine for convex or concave polygons as it is. The triangulation is just a trick for using the plane-triangle intersection provided by bitpit and it doesn't have any important role in the geometrical construction. That's why it's removed without harming the generality of the algorithm.

@ksamouchos
Copy link
Contributor Author

@edoardolombardi would you like to have a look before merging this branch?

@ksamouchos
Copy link
Contributor Author

One last thing. I don't really like the introduction of function "computePolygonNormal" in CG.hpp. The computation of the polygon's normal already exist in module "patchkernel", but it has a different definition. I think that using the already existing function instead of "computePolygonNormal" won't harm the algorithm, but I'm not completely sure. That's why I kept Rocco's definition.

Let me know, if you have any better idea about how to improve this part.

@ksamouchos
Copy link
Contributor Author

@andrea-iob , @marcocisternino and @edoardolombardi if you don't have any other comments to make, I'll merge this branch tomorrow morning

@ksamouchos ksamouchos merged commit e3de171 into master Jul 31, 2024
10 checks passed
@ksamouchos ksamouchos deleted the levelset.interface.intersection branch July 31, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants