Skip to content

Feature element boundary [3/3]#1081

Open
holke wants to merge 58 commits intomainfrom
feature-element_boundary
Open

Feature element boundary [3/3]#1081
holke wants to merge 58 commits intomainfrom
feature-element_boundary

Conversation

@holke
Copy link
Collaborator

@holke holke commented Jun 5, 2024

Closes #1630

Describe your changes here:

Implemented a function to check whether a leaf element is at the domain boundary or not.
We need to take special care with forests with holes, since these forests have inner boundaries.

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 Makefiles

  • The code is well documented

  • All function declarations, structs/classes and their members have a proper doxygen documentation

  • 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

Github action

  • The code compiles without warning in debugging and release mode, with and without MPI (this should be executed automatically in a github action)

  • All tests pass (in various configurations, this should be executed automatically in a github action)

    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 script/find_all_source_files.scp to check the indentation of these files.
  • If this PR introduces a new feature, it must be covered in an example/tutorial and a Wiki article.

Licence

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

@holke holke marked this pull request as draft June 5, 2024 13:30
@lukasdreyer lukasdreyer assigned holke and unassigned lukasdreyer Jun 10, 2024
@holke holke added enhancement Enhances already existing code Follow-up PR labels Jun 19, 2024
@holke holke requested a review from lukasdreyer June 19, 2024 14:23
@holke holke assigned lukasdreyer and unassigned holke Jun 19, 2024
@holke holke marked this pull request as ready for review June 19, 2024 14:23
@holke holke enabled auto-merge June 19, 2024 14:23
@holke
Copy link
Collaborator Author

holke commented Jun 19, 2024

Ready for review - i added a test case.

@holke holke requested a review from lukasdreyer May 12, 2025 12:08
/* forest_commit does not support empty cmeshes, we skip this case */
GTEST_SKIP ();
}
/* Build the default scheme (TODO: Test this with all schemes) */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please parameterize this test, so that all scheme collections can be tested, once the standalone scheme with types is available.
Or ask @ole-alb to do so, he has done this a few times.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

* \return True (non-zero) if face \a face of \a leaf lies at the domain boundary.
*/
int
t8_forest_leaf_is_boundary (const t8_forest_t forest, t8_locidx_t local_tree, const t8_element_t *leaf, int face);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think our current convention is to mark passed-by-value variables as const in header and implementation, if they are not adjusted inside the function.

I am unsure about the advantages of including the const in the header, but please include it at least in the implementation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i included it in the header and the implementation.

@lukasdreyer lukasdreyer assigned holke and unassigned lukasdreyer May 19, 2025
@holke holke assigned lukasdreyer and unassigned holke May 26, 2025
@holke
Copy link
Collaborator Author

holke commented May 26, 2025

Should be finished.
I currently cannot verify via the CI since the package update step fails with a 404 error.
Is probably resolved in a few hours.

@holke holke assigned holke and unassigned lukasdreyer May 26, 2025
@codecov
Copy link

codecov bot commented May 28, 2025

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.29%. Comparing base (fffd06c) to head (b292f17).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/t8_forest/t8_forest.cxx 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1081      +/-   ##
==========================================
+ Coverage   78.27%   78.29%   +0.01%     
==========================================
  Files         114      114              
  Lines       19101    19119      +18     
==========================================
+ Hits        14952    14969      +17     
- Misses       4149     4150       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@holke
Copy link
Collaborator Author

holke commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.04%. Comparing base (dfaecea) to head (cf4057e).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/t8_forest/t8_forest.cxx 94.73% 1 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:

This is the line that is not covered by tests:

SC_ABORT ("This forest has holes and a computation of boundary elements is not supported. Once "
             "https://github.com/DLR-AMR/t8code/issues/825 is resolved, the function will be available.\n");

Since it is a) hard to test at all and b) quite obvious that this line does what it says, i believe we do not need to test it.

@holke holke assigned lukasdreyer and unassigned holke Jun 5, 2025
@holke
Copy link
Collaborator Author

holke commented Mar 6, 2026

Merged with main.
Used the new function in the geometry example where we have an adapt callback that refines boundary elements.s

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

Labels

enhancement Enhances already existing code Follow-up PR priority:low Should be solved eventually

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature element boundary [3/3]

3 participants