Improvement: add test for t8_forest_element_neighbor_eclass#2276
Improvement: add test for t8_forest_element_neighbor_eclass#2276benegee wants to merge 3 commits into
t8_forest_element_neighbor_eclass#2276Conversation
|
Not a brilliant test because the test code is actually quite close to the code being tested. Anyways, this is a start. I think it might be useful to have a partitioned cmesh, but I was not able to produce one so far. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2276 +/- ##
=======================================
Coverage 82.59% 82.59%
=======================================
Files 115 115
Lines 18545 18545
=======================================
Hits 15318 15318
Misses 3227 3227 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| t8code is a C library to manage a collection (a forest) of multiple | ||
| connected adaptive space-trees of general element classes in parallel. | ||
|
|
||
| Copyright (C) 2015 the developers |
There was a problem hiding this comment.
| Copyright (C) 2015 the developers | |
| Copyright (C) 2026 the developers |
| } | ||
| } | ||
|
|
||
| INSTANTIATE_TEST_SUITE_P (t8_gtest_element_neighbor_eclass, element_neighbor_eclass, AllSchemeCollections); |
There was a problem hiding this comment.
we should parametrize it over some levels too, not only level 1.
Can we also start testing on level 0 and use a mesh with multiple trees?.
| EXPECT_EQ (neigh_class, T8_ECLASS_INVALID); | ||
| } | ||
| else { | ||
| EXPECT_EQ (neigh_class, tree_eclass_ref[cmesh_dual_itree]); |
There was a problem hiding this comment.
I am not too happy with the tree_eclass_ref-vector here. I am not sure if this is the way neighbor-information should be handled, as it causes additional memory in the size of of O(trees). I understand that is is possibly cheaper (in runtime) to use this approach, which is why I think it is ok to use it for testing.
however we should know that our tests can be used as examples to users, therefore we should at least add a comment that a decision about the tradeoff between memory/runtime has been made here.
Describe your changes here:
I am trying to resolve #2240.
My plan was:
t8_forest_element_neighbor_eclassI had to adjust this a bit and now record the and compare to eclasses of all cmesh trees. (I was not able to move form cmesh trees to forest trees because some of them were not forest local).
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
scripts/internal/find_all_source_files.shto check the indentation of these files.License
doc/(or already has one).