Conversation
…docstring still missing
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1714 +/- ##
==========================================
+ Coverage 78.25% 78.29% +0.04%
==========================================
Files 114 114
Lines 19050 19117 +67
==========================================
+ Hits 14907 14968 +61
- Misses 4143 4149 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Davknapp
left a comment
There was a problem hiding this comment.
A first round of remarks! Thanks for this addition!
Co-authored-by: David Knapp <david.knapp@dlr.de>
Co-authored-by: David Knapp <david.knapp@dlr.de>
…ature-ancestor_search
| Due to search calling get_linear_id with a too large level. | ||
| */ | ||
|
|
||
| const t8_locidx_t search_index = t8_forest_bin_search_lower (leafs, element_id + 1, element_id_at_next_level); |
There was a problem hiding this comment.
| const t8_locidx_t search_index = t8_forest_bin_search_lower (leafs, element_id + 1, element_id_at_next_level); | |
| const t8_locidx_t search_index = t8_forest_bin_search_lower (leafs, element_id_at_next_level, element_id + 1); |
Co-authored-by: David Knapp <david.knapp@dlr.de>
|
I added the tests for bin_search_upper and lower. Some doxygen errors show up but they are not related to my added functionality... But, you can finish with the review of the code :) |
|
I added a new test for the ancestor search. |
Nice, thanks a lot! Can you fix the doxygen? |
|
|
||
| /** Test the t8_forest_bin_search_upper function. | ||
| * We iterate through all elements of a forest. | ||
| * For each element E of level L, we call t8_forest_bin_search_lower on the forest's element array and expect |
There was a problem hiding this comment.
| * For each element E of level L, we call t8_forest_bin_search_lower on the forest's element array and expect | |
| * For each element E of level L, we call t8_forest_bin_search_upper on the forest's element array and expect |
| * the element to be found. | ||
| * For each element we then build one case where we search for an element that is not contained but will | ||
| * match a different element in the element array: | ||
| * We compute the linear Id of E at level L-1 (if it is >=0 ) and search for the L-1 element with this id. |
There was a problem hiding this comment.
| * We compute the linear Id of E at level L-1 (if it is >=0 ) and search for the L-1 element with this id. | |
| * We compute the linear Id of E at level L+1 (if it is >=0 ) and search for the L+1 element with this id. |
| * the element to be found. | ||
| * For each element we then build one case where we search for an element that is not contained but will | ||
| * match a different element in the element array: | ||
| * We compute the linear Id of E at level L+1 (if not exceeding the maxlevel) and search for the L+1 element with this id. |
There was a problem hiding this comment.
| * We compute the linear Id of E at level L+1 (if not exceeding the maxlevel) and search for the L+1 element with this id. | |
| * We compute the linear Id of E at level L (if not exceeding the maxlevel) and search for the L element with this id. |
| } | ||
|
|
||
| TEST_P (t8_bin_search_tester, bin_search_lower) | ||
| /** Test the t8_forest_bin_search_upper function. |
There was a problem hiding this comment.
| /** Test the t8_forest_bin_search_upper function. | |
| /** Test the t8_forest_bin_search_first_descendant_ancestor function. |
There was a problem hiding this comment.
Please update the rest of the comment, too
| inline auto print_eclass | ||
| = [] (const testing::TestParamInfo<t8_eclass> &info) { return t8_eclass_to_string[info.param]; }; | ||
|
|
||
| /** Define a lambda to beautify gtest output for tuples <level, cmesh>. |
There was a problem hiding this comment.
| /** Define a lambda to beautify gtest output for tuples <level, cmesh>. | |
| /** Define a lambda to beautify gtest output for tuples <<scheme, eclass>, level>. |
| auto pretty_print_eclass_scheme_and_level | ||
| = [] (const testing::TestParamInfo<std::tuple<std::tuple<int, t8_eclass_t>, int>> &info) { | ||
| std::string scheme = t8_scheme_to_string[std::get<0> (std::get<0> (info.param))]; | ||
| std::string eclass = t8_eclass_to_string[std::get<1> (std::get<0> (info.param))]; |
There was a problem hiding this comment.
| std::string eclass = t8_eclass_to_string[std::get<1> (std::get<0> (info.param))]; | |
| std::string eclass = t8_eclass_to_string[std::get<0> (std::get<1> (info.param))]; |
Closes #1715
Describe your changes here:
Currently waiting for #1640 to merge.
Will add a description afterwards.
All these boxes must be checked by the AUTHOR before requesting review:
Documentation:,Bugfix:,Feature:,Improvement:orOther:.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
Tests
If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):
Scripts and Wiki
script/find_all_source_files.scpto check the indentation of these files.License
doc/(or already has one).