Mesh competence tutorial - #2370
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2370 +/- ##
=======================================
Coverage 82.28% 82.28%
=======================================
Files 125 125
Lines 20701 20701
=======================================
Hits 17033 17033
Misses 3668 3668 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lenaploetzke
left a comment
There was a problem hiding this comment.
Nice tutorial! Maybe a bit more of explanation would help :)
|
|
||
| if( T8CODE_BUILD_MESH_HANDLE ) | ||
| add_mesh_handle_tutorial( NAME t8_mesh_step3_adapt_forest SOURCES mesh_handle/t8_mesh_step3_adapt_forest.cxx ) | ||
| endif() | ||
|
|
||
| if( T8CODE_BUILD_MESH_HANDLE ) | ||
| add_mesh_handle_tutorial( NAME t8_mesh_step4_partition_balance_ghost SOURCES mesh_handle/t8_mesh_step4_partition_balance_ghost.cxx ) | ||
| endif() |
| t8code is a C library to manage a collection (a forest) of multiple | ||
| connected adaptive space-trees of general element types in parallel. | ||
|
|
||
| Copyright (C) 2015 the developers |
| @@ -0,0 +1,227 @@ | |||
| /* | |||
There was a problem hiding this comment.
As stated in the README Pr, we should maybe assign to this tutorial also a step (maybe step A??)
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| */ | ||
|
|
||
| /** \file t8_mesh_step3_adapt_forest.cxx |
| */ | ||
|
|
||
| /** \file t8_mesh_step3_adapt_forest.cxx | ||
| * This tutorial will explain the the use of competences native to the mesh_handle while explaining the already given competences but also going deeper in how to |
There was a problem hiding this comment.
Please explain what competences can be used for here and why they are cool for the mesh handle
| t8_global_productionf (" [tutorial] \n"); | ||
|
|
||
| demonstrate_cache_competences (*default_mesh->cbegin ()); /**< Calling the cache competence function defined above. */ | ||
|
|
There was a problem hiding this comment.
Maybe you write a short exlaination here what is happening next: We now define a second mesh to demonstrate a user defined competence.
|
|
||
| /* Defining a competence pack with the volume cache competence and our custom defined competence. */ | ||
| using custom_element_competences = element_competence_pack<cache_volume, /**< Volume cache competence. */ | ||
| volume_squared>; /**< Our custom competence. */ |
There was a problem hiding this comment.
Maybe its cool if you also name it volume_squared_custom_competence or so? Then you would not need both comments
|
|
||
| t8_global_productionf (" [tutorial] \n"); | ||
| t8_global_productionf ( | ||
| " [tutorial] Creating a custom mesh for the custom competence with initial refinement level of 2.\n"); |
| /* Creating a custom mesh with the mesh_type including our custom competence pack and the initial refinement level 2. */ | ||
| auto custom = handle_hypercube_hybrid_uniform_default<custom_mesh> (level, comm, false, false); | ||
|
|
||
| custom->commit (); /**< Committing the custom mesh. */ |
| t8_global_productionf (" [tutorial] Demonstrating the custom competence 'Squared Value'.\n"); | ||
| t8_global_productionf (" [tutorial] \n"); | ||
|
|
||
| demonstrate_custom_competence (*custom); /**< Calling the custom competence function defined above. */ |
There was a problem hiding this comment.
| demonstrate_custom_competence (*custom); /**< Calling the custom competence function defined above. */ | |
| demonstrate_custom_competence (*custom); |
Describe your changes here:
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).