Skip to content

Feature: mesh deformation with RBFs (TPS and CPC2) - #2470

Open
Lena-Richter wants to merge 36 commits into
mainfrom
feature-RBF_CPC2
Open

Lena-Richter wants to merge 36 commits into
mainfrom
feature-RBF_CPC2

Conversation

@Lena-Richter

@Lena-Richter Lena-Richter commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #2471

Describe your changes here:
This PR introduces an RBF-based mesh deformation, using OpenCASCADE and Eigen. It implements support for the compactly supported (CPC2) and globally supported (TPS) basis functions to compute the deformation for the inner nodes from the displacement of the boundary nodes. Additionally, for CPC2, a dynamic radius is implemented as well as a grading factor. The deformed geometry needs to have the same parametrization as the input geometry, otherwise the deformation will not work.

All these boxes must be checked by the AUTHOR before requesting review:

  • The PR is small enough to be reviewed easily. If not, consider splitting up the changes in multiple PRs.
  • The title starts with one of the following prefixes: Documentation:, Bugfix:, Feature:, Improvement: or Other:.
  • If the PR is related to an issue, make sure to link it.
  • The author made sure that, as a reviewer, he/she would check all boxes below.

All these boxes must be checked by the REVIEWERS before merging the pull request:

As a reviewer please read through all the code lines and make sure that the code is fully understood, bug free, well-documented and well-structured.

General

  • The reviewer executed the new code features at least once and checked the results manually.
  • The code follows the t8code coding guidelines.
  • New source/header files are properly added to the CMake files.
  • The code is well documented. In particular, all function declarations, structs/classes and their members have a proper doxygen documentation. Make sure to add a file documentation for each file!
  • README.md files are updated if necessary.
  • All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue).

Tests

  • The code is covered in an existing or new test case using Google Test.
  • The code coverage of the project (reported in the CI) should not decrease. If coverage is decreased, make sure that this is reasonable and acceptable.
  • Valgrind doesn't find any bugs in the new code. This script can be used to check for errors; see also this wiki article.

If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):

  • Should this use case be added to the github action?
  • If not, does the specific use case compile and all tests pass (check manually).

Scripts and Wiki

  • If a new directory with source files is added, it must be covered by the scripts/internal/find_all_source_files.sh to check the indentation of these files.
  • If this PR introduces a new feature, it must be covered in an example or tutorial and a Wiki article.

License

  • The author added a BSD statement to doc/ (or already has one).

@Lena-Richter Lena-Richter changed the title Feature rbf cpc2 Feature mesh deformation with RBFs (TPS and CPC2) Oct 5, 2026
@Lena-Richter Lena-Richter changed the title Feature mesh deformation with RBFs (TPS and CPC2) Feature: mesh deformation with RBFs (TPS and CPC2) Oct 5, 2026
@Lena-Richter
Lena-Richter marked this pull request as ready for review October 6, 2026 11:05
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.35%. Comparing base (50f62c8) to head (6f20288).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2470      +/-   ##
==========================================
+ Coverage   83.05%   83.35%   +0.29%     
==========================================
  Files         148      147       -1     
  Lines       22259    22179      -80     
==========================================
  Hits        18488    18488              
+ Misses       3771     3691      -80     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ole-alb
ole-alb self-requested a review October 6, 2026 13:10

@ole-alb ole-alb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this very cool contribution and implementation. I have a couple general remarks.
Can you check if ervything that can be const is const?

Please add tests for your functionality as it is not tested yet. Please also test the new dependecy on the newly added thirdparty library Eigen.
After the PR is merged, please keep in mind to update the wiki accordingly (Eigen, CMake,..).

Also I thought if there could be the option to use a system Eigen like it is for SC and p4est?

And last but not least, I coudn't find you in the CITATION.cff and in doc/auther_. Please add yourself here.

Comment thread CMakeLists.txt Resolved
@ole-alb ole-alb assigned Lena-Richter and unassigned ole-alb Oct 7, 2026
…on.cxx

Co-authored-by: Ole Albers <122293607+ole-alb@users.noreply.github.com>
@Lena-Richter Lena-Richter assigned ole-alb and unassigned Lena-Richter Oct 15, 2026

@ole-alb ole-alb left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have a few small remarks. Also I stumble upon one thing. Why is CPC2 the default, when you'd always recommend TPS and the default radius if CPC2 isn't really applicable to general applications?

Comment thread example/CMakeLists.txt Outdated
Comment on lines +92 to +93
add_t8_example( NAME t8_rbf_test SOURCES cmesh/t8_rbf.cxx )
target_link_libraries( t8_rbf_test PRIVATE Eigen3::Eigen )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build fails, because the file isn't remove from here. This also lead me to notice that the new CMake option is not enabled anywhere in the CI. So your CI ran through even though the build fails.

Comment thread CITATION.cff
family-names: George
email: Janot.George@dlr.de
affiliation: "German Aerospace Center (DLR)"
given-names: Lena-René

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
given-names: Lena-René
- given-names: Lena-René

Comment thread CITATION.cff
email: F.Becker@dlr.de
affiliation: "German Aerospace Center (DLR)"
orcid: "https://orcid.org/0000-0002-8384-9282"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove Florians Orcid?

@ole-alb ole-alb assigned Lena-Richter and unassigned ole-alb Oct 16, 2026
@sandro-elsweijer

Copy link
Copy Markdown
Member

Heyho,
I needed this branch and it was not going to build. I fixed that and activated the CI for Eigen so that this code is also checked in the CI.
Furthermore, I had do move all code using Eigen in headers into source files. We have to keep all Eigen inlcudes only in source files since we link privately against Eigen.
This means, that only t8code sees Eigen, not the application linking against t8code. And when the application includes a t8code header file which includes Eigen, the application indirectly includes Eigen and is not able to find it and wont compile.
Make shure to pull before you work on this.
@Lena-Richter @ole-alb

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature rbf cpc2

3 participants