From 5bec69b41d67952d299c9303b4e56d7907fd57ad Mon Sep 17 00:00:00 2001 From: Lena Ploetzke Date: Fri, 16 Oct 2026 10:47:23 +0200 Subject: [PATCH 1/2] update doxyfile --- doc/Doxyfile.in | 2 +- .../features/t8_features_curved_meshes.cxx | 31 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 0a0b6a5f6b..e0594d8a57 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -984,7 +984,7 @@ WARN_LOGFILE = INPUT = @top_srcdir@/src \ @top_srcdir@/mesh_handle \ @top_srcdir@/test \ - @top_srcdir@/tutorials/mesh_handle + @top_srcdir@/tutorials # This tag can be used to specify the character encoding of the source files # that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tutorials/features/t8_features_curved_meshes.cxx b/tutorials/features/t8_features_curved_meshes.cxx index 948e49bb67..ce5e22f88f 100644 --- a/tutorials/features/t8_features_curved_meshes.cxx +++ b/tutorials/features/t8_features_curved_meshes.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Feature---Curved-meshes +/** \file t8_features_curved_meshes.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Feature---Curved-meshes * * This is a feature tutorial about curved meshes. * In the following we will generate an input mesh and input geometry in Gmsh. @@ -51,14 +52,14 @@ #include /* std::string */ #include /* std::array */ -/* We use this data to control to which level the elements at which +/** We use this data to control to which level the elements at which * geometry get refined. */ struct t8_naca_geometry_adapt_data { - int level; /** Uniform refinement level of the forest */ - int n_geometries; /** Amount of geometries we want to refine */ - int *geometries; /** Array with geometry indices */ - int *levels; /** Array with refinement levels */ + int level; /**< Uniform refinement level of the forest */ + int n_geometries; /**< Amount of geometries we want to refine */ + int *geometries; /**< Array with geometry indices */ + int *levels; /**< Array with refinement levels */ }; #if T8_ENABLE_OCC @@ -81,6 +82,7 @@ struct t8_naca_geometry_adapt_data * \param [in] forest The current forest that is in construction. * \param [in] forest_from The forest from which we adapt the current forest (in our case, the uniform forest) * \param [in] which_tree The process local id of the current tree. + * \param [in] tree_class The eclass of \a which_tree. * \param [in] lelement_id The tree local index of the current element (or the first of the family). * \param [in] scheme The refinement scheme for this tree's element class. * \param [in] is_family if 1, the first \a num_elements entries in \a elements form a family. If 0, they do not. @@ -142,6 +144,7 @@ t8_naca_geometry_adapt_callback (t8_forest_t forest, t8_forest_t forest_from, t8 * \param [in] level The uniform refinement level of the forest. * \param [in] rlevel_dorsal The refinement level of the elements touching the dorsal side of the wing. * \param [in] rlevel_ventral The refinement level of the elements touching the ventral side of the wing. + * \param [in] dim The dimension. */ int t8_naca_geometry_refinement (t8_forest_t forest, const std::string &fileprefix, int level, int rlevel_dorsal, @@ -197,15 +200,16 @@ t8_naca_geometry_refinement (t8_forest_t forest, const std::string &fileprefix, } #endif +/** Adaption parameter class used to specify the refinement in \ref t8_naca_plane_adapt_callback. */ struct t8_naca_plane_adapt_data { - int t; /* The time step we are in */ - int steps; /* The amount of time steps */ - double x_min; /* The minimum x-coordinate of the profile */ - double x_max; /* The maximum x-coordinate of the profile */ - double dist; /* The distance an element can have from the plane to still be refined */ - int level; /* The uniform refinement level */ - int rlevel; /* The max refinement level */ + int t; /**< The time step we are in */ + int steps; /**< The amount of time steps */ + double x_min; /**< The minimum x-coordinate of the profile */ + double x_max; /**< The maximum x-coordinate of the profile */ + double dist; /**< The distance an element can have from the plane to still be refined */ + int level; /**< The uniform refinement level */ + int rlevel; /**< The max refinement level */ }; /** @@ -228,6 +232,7 @@ struct t8_naca_plane_adapt_data * \param [in] forest The current forest that is in construction. * \param [in] forest_from The forest from which we adapt the current forest (in our case, the uniform forest) * \param [in] which_tree The process local id of the current tree. + * \param [in] tree_class The eclass of \a which_tree. * \param [in] lelement_id The tree local index of the current element (or the first of the family). * \param [in] scheme The refinement scheme for this tree's element class. * \param [in] is_family if 1, the first \a num_elements entries in \a elements form a family. If 0, they do not. From 9c5f830329c0680747ead34e13329b878b61152b Mon Sep 17 00:00:00 2001 From: Lena Ploetzke Date: Fri, 16 Oct 2026 11:25:21 +0200 Subject: [PATCH 2/2] comment files --- tutorials/general/t8_step0_helloworld.cxx | 4 +- tutorials/general/t8_step1_coarsemesh.cxx | 4 +- tutorials/general/t8_step2_uniform_forest.cxx | 4 +- tutorials/general/t8_step3.h | 13 +++---- tutorials/general/t8_step3_adapt_forest.cxx | 3 +- tutorials/general/t8_step3_main.cxx | 3 +- tutorials/general/t8_step4.h | 2 +- tutorials/general/t8_step4_main.cxx | 3 +- .../t8_step4_partition_balance_ghost.cxx | 3 +- tutorials/general/t8_step5.h | 2 +- tutorials/general/t8_step5_element_data.cxx | 21 ++++++++--- .../t8_step5_element_data_c_interface.c | 3 +- tutorials/general/t8_step5_main.cxx | 3 +- tutorials/general/t8_step6.h | 2 +- tutorials/general/t8_step6_main.cxx | 4 +- tutorials/general/t8_step6_stencil.cxx | 37 ++++++++++--------- tutorials/general/t8_step7.h | 2 +- tutorials/general/t8_step7_interpolation.cxx | 26 ++++++------- tutorials/general/t8_step7_main.cxx | 4 +- tutorials/general/t8_tutorial_build_cmesh.cxx | 11 +++--- tutorials/general/t8_tutorial_build_cmesh.h | 2 +- .../general/t8_tutorial_build_cmesh_main.cxx | 4 +- .../general/t8_tutorial_build_scheme.cxx | 4 +- tutorials/general/t8_tutorial_search.cxx | 18 +++++---- 24 files changed, 106 insertions(+), 76 deletions(-) diff --git a/tutorials/general/t8_step0_helloworld.cxx b/tutorials/general/t8_step0_helloworld.cxx index db49959ec3..0cf33d5031 100644 --- a/tutorials/general/t8_step0_helloworld.cxx +++ b/tutorials/general/t8_step0_helloworld.cxx @@ -20,13 +20,15 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-0---Hello-World +/** \file t8_step0_helloworld.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-0---Hello-World * * In this example we initialize t8code and print a small welcome message. * This is the t8code equivalent of HelloWorld. */ #include /* General t8code header, always include this. */ +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step1_coarsemesh.cxx b/tutorials/general/t8_step1_coarsemesh.cxx index 5b88faa0ac..a0c03ebf42 100644 --- a/tutorials/general/t8_step1_coarsemesh.cxx +++ b/tutorials/general/t8_step1_coarsemesh.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-1---Creating-a-coarse-mesh +/** \file t8_step1_coarsemesh.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-1---Creating-a-coarse-mesh * * In this example we build a coarse mesh with a cube geometry. * The cube is meshed with 6 coarse tetrahedra. @@ -92,6 +93,7 @@ t8_step1_destroy_cmesh (t8_cmesh_t cmesh) t8_cmesh_destroy (&cmesh); } +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step2_uniform_forest.cxx b/tutorials/general/t8_step2_uniform_forest.cxx index 3b37e17b12..7d0c3a6554 100644 --- a/tutorials/general/t8_step2_uniform_forest.cxx +++ b/tutorials/general/t8_step2_uniform_forest.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-2---Creating-a-uniform-forest +/** \file t8_step2_uniform_forest.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-2---Creating-a-uniform-forest * * After we learned how to create a cmesh in step1, we will * now build our first partitioned forest, get its local and global @@ -116,6 +117,7 @@ t8_step2_destroy_forest (t8_forest_t forest) t8_forest_unref (&forest); } +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step3.h b/tutorials/general/t8_step3.h index 36b435f2c0..ec60c2b83d 100644 --- a/tutorials/general/t8_step3.h +++ b/tutorials/general/t8_step3.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_step3.h +/** \file t8_step3.h * This is the header file to the step3 example of t8code. It collects * functions of t8_step3 that we reuse in other examples. * In this example we discuss how to adapt a forest. @@ -48,13 +48,12 @@ t8_step3_main (int argc, char **argv); void t8_step3_print_forest_information (t8_forest_t forest); -/* This is our own defined data that we will pass on to the - * adaptation callback. */ +/** This is our own defined data that we will pass on to the adaptation callback. */ struct t8_step3_adapt_data { - double midpoint[3]; /* The midpoint of our sphere. */ - double refine_if_inside_radius; /* if an element's center is smaller than this value, we refine the element. */ - double coarsen_if_outside_radius; /* if an element's center is larger this value, we coarsen its family. */ + double midpoint[3]; /**< The midpoint of our sphere. */ + double refine_if_inside_radius; /**< if an element's center is smaller than this value, we refine the element. */ + double coarsen_if_outside_radius; /**< if an element's center is larger this value, we coarsen its family. */ }; /** Adapt a forest according to our t8_step3_adapt_callback function. @@ -66,7 +65,7 @@ struct t8_step3_adapt_data t8_forest_t t8_step3_adapt_forest (t8_forest_t forest); -/* The adaptation callback function. This will refine elements inside of a given sphere +/** The adaptation callback function. This will refine elements inside of a given sphere * and coarsen the elements outside of a given sphere. * The necessary input data is of type t8_step3_adapt_data and should be passed to forest * via t8_forest_set_user_data before calling this function. diff --git a/tutorials/general/t8_step3_adapt_forest.cxx b/tutorials/general/t8_step3_adapt_forest.cxx index efddce13bb..c2846cb437 100644 --- a/tutorials/general/t8_step3_adapt_forest.cxx +++ b/tutorials/general/t8_step3_adapt_forest.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This is step3 of the t8code tutorials. +/** \file t8_step3_adapt_forest.cxx + * This is step3 of the t8code tutorials. * After generating a coarse mesh (step1) and building a uniform forest * on it (step2), we will now adapt (= refine and coarsen) the forest * according to our own criterion. diff --git a/tutorials/general/t8_step3_main.cxx b/tutorials/general/t8_step3_main.cxx index a04a0058a2..c1fba3c8eb 100644 --- a/tutorials/general/t8_step3_main.cxx +++ b/tutorials/general/t8_step3_main.cxx @@ -20,13 +20,14 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step3 example of t8code. +/** \file t8_step3_main.cxx This file is part of the step3 example of t8code. * Here, we only wrap the main function. See t8_step3_adapt_forest.cxx for the documentation of * the step3 example. */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step4.h b/tutorials/general/t8_step4.h index b55bd1f847..a15c1d261c 100644 --- a/tutorials/general/t8_step4.h +++ b/tutorials/general/t8_step4.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_step4.h +/** \file t8_step4.h * This is the header file to the step4 example of t8code. It collects * functions of t8_step4 that we reuse in other examples. * In this example we discuss the forest creation process in more detail including diff --git a/tutorials/general/t8_step4_main.cxx b/tutorials/general/t8_step4_main.cxx index 770a8a2396..25fe069b36 100644 --- a/tutorials/general/t8_step4_main.cxx +++ b/tutorials/general/t8_step4_main.cxx @@ -20,13 +20,14 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step4 example of t8code. +/** \file t8_step4_main.cxx This file is part of the step4 example of t8code. * Here, we only wrap the main function. See t8_step4_partition_balance_ghost.cxx for the documentation of * the step4 example. */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step4_partition_balance_ghost.cxx b/tutorials/general/t8_step4_partition_balance_ghost.cxx index 7337aa3a84..19a239f4d2 100644 --- a/tutorials/general/t8_step4_partition_balance_ghost.cxx +++ b/tutorials/general/t8_step4_partition_balance_ghost.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-4---Partition,-Balance,-Ghost +/** \file t8_step4_partition_balance_ghost.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-4---Partition,-Balance,-Ghost * * This is step4 of the t8code tutorials. * After generating a coarse mesh (step1), building a uniform forest diff --git a/tutorials/general/t8_step5.h b/tutorials/general/t8_step5.h index ede4f516b9..a10f699bac 100644 --- a/tutorials/general/t8_step5.h +++ b/tutorials/general/t8_step5.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_step5.h +/** \file t8_step5.h */ #ifndef T8_STEP5_H diff --git a/tutorials/general/t8_step5_element_data.cxx b/tutorials/general/t8_step5_element_data.cxx index 4044fc95a1..f0d6ac6b08 100644 --- a/tutorials/general/t8_step5_element_data.cxx +++ b/tutorials/general/t8_step5_element_data.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-5---Store-element-data +/** \file t8_step5_element_data.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-5---Store-element-data * * This is step5 of the t8code tutorials. * In the following we will store data in the individual elements of our forest. @@ -53,14 +54,19 @@ T8_EXTERN_C_BEGIN (); -/* The data that we want to store for each element. +/** The data that we want to store for each element. * In this example we want to store the element's level and volume. */ struct t8_step5_data_per_element { - int level; - double volume; + int level; /**< The level of the element. */ + double volume; /**< The volume of the element. */ }; +/** Build an adapted, partitioned and balanced forest with ghost elements as the initial forest, to which we will add + * element data in subsequent steps. + * \param [in] comm The MPI communicator to use. + * \param [in] level An initial uniform refinement level. + */ static t8_forest_t t8_step5_build_forest (sc_MPI_Comm comm, int level) { @@ -89,6 +95,9 @@ t8_step5_build_forest (sc_MPI_Comm comm, int level) return forest_apbg; } +/** Create an array for the element data of the forest. + * \param [in] forest The forest we want to create data for. + */ static struct t8_step5_data_per_element * t8_step5_create_element_data (t8_forest_t forest) { @@ -163,7 +172,7 @@ t8_step5_create_element_data (t8_forest_t forest) return element_data; } -/* Each process has computed the data entries for its local elements. +/** Each process has computed the data entries for its local elements. * In order to get the values for the ghost elements, we use t8_forest_ghost_exchange_data. * Calling this function will fill all the ghost entries of our element data array with the * value on the process that owns the corresponding element. */ @@ -186,7 +195,7 @@ t8_step5_exchange_ghost_data (t8_forest_t forest, struct t8_step5_data_per_eleme sc_array_destroy (sc_array_wrapper); } -/* Write the forest as vtu and also write the element's volumes in the file. +/** Write the forest as vtu and also write the element's volumes in the file. * * t8code supports writing element based data to vtu as long as its stored * as doubles. Each of the data fields to write has to be provided in its own diff --git a/tutorials/general/t8_step5_element_data_c_interface.c b/tutorials/general/t8_step5_element_data_c_interface.c index 715112afcb..f58025b389 100644 --- a/tutorials/general/t8_step5_element_data_c_interface.c +++ b/tutorials/general/t8_step5_element_data_c_interface.c @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-5---Store-element-data +/** \file t8_step5_element_data_c_interface.c + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-5---Store-element-data * * This is step5 of the t8code tutorials using the C interface of t8code. * In the following we will store data in the individual elements of our forest. diff --git a/tutorials/general/t8_step5_main.cxx b/tutorials/general/t8_step5_main.cxx index 06f22bbb51..c6a6870adf 100644 --- a/tutorials/general/t8_step5_main.cxx +++ b/tutorials/general/t8_step5_main.cxx @@ -20,13 +20,14 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step5 example of t8code. +/** \file t8_step5_main.cxx This file is part of the step5 example of t8code. * Here, we only wrap the main function. See t8_step5_element_data.cxx for the documentation of * the step5 example. */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step6.h b/tutorials/general/t8_step6.h index f1708eb630..7a4fb2ee08 100644 --- a/tutorials/general/t8_step6.h +++ b/tutorials/general/t8_step6.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_step6.h +/** \file t8_step6.h */ #ifndef T8_STEP6_H diff --git a/tutorials/general/t8_step6_main.cxx b/tutorials/general/t8_step6_main.cxx index d6f241992b..e0e33ce414 100644 --- a/tutorials/general/t8_step6_main.cxx +++ b/tutorials/general/t8_step6_main.cxx @@ -20,13 +20,15 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step6 example of t8code. +/** \file t8_step6_main.cxx + * This file is part of the step6 example of t8code. * Here, we only wrap the main function. See t8_step6_stencil.cxx for the documentation of * the step6 example. */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_step6_stencil.cxx b/tutorials/general/t8_step6_stencil.cxx index 05764966a9..b77c1e0fa8 100644 --- a/tutorials/general/t8_step6_stencil.cxx +++ b/tutorials/general/t8_step6_stencil.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Step-6-Computing-stencils +/** \file t8_step6_stencil.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Step-6-Computing-stencils * * This is step6 of the t8code tutorials using the C++ interface of t8code. * In the following we will store data in the individual elements of our forest. @@ -51,29 +52,29 @@ T8_EXTERN_C_BEGIN (); -/* The data that we want to store for each element. */ +/** The data that we want to store for each element. */ struct data_per_element { - /* The first three data fields are not necessary for our + /** The first three data fields are not necessary for our * computations in this step, but are left here for reference. */ - int level; - double volume; - double midpoint[3]; + int level; /**< Level of the element. */ + double volume; /**< Volume of the element. */ + double midpoint[3]; /**< Midpoint of the element. */ - /* Element length in x- and y-direction. */ - double dx; - double dy; + /** Element length in x- and y-direction. */ + double dx; /**< Element length in x-direction. */ + double dy; /**< Element length in y-direction. */ - /* `Height` which is filled according to the position of the element + /** `Height` which is filled according to the position of the element * in the computational domain. */ double height; - /* Storage for our finite difference computations. */ - double schlieren; - double curvature; + /** Storage for our finite difference computations. */ + double schlieren; /**< FD value schlieren. */ + double curvature; /**< FD value curvature. */ }; -/* In this function we first allocate a new uniformly refined forest at given +/** In this function we first allocate a new uniformly refined forest at given * refinement level. Then a second forest is created, where user data for the * adaption call (cf. step 3) is registered. The second forest inherits all * properties of the first ("root") forest and deallocates it. The final @@ -108,7 +109,7 @@ t8_step6_build_forest (sc_MPI_Comm comm, int dim, int level) return forest_apbg; } -/* Allocate and fill the element data array with `heights` from an arbitrary +/** Allocate and fill the element data array with `heights` from an arbitrary * mathematical function. Returns a pointer to the array which is then owned * by the calling scope. */ static struct data_per_element * @@ -171,7 +172,7 @@ t8_step6_create_element_data (t8_forest_t forest) return element_data; } -/* Gather the 3x3 stencil for each element and compute finite difference approximations +/** Gather the 3x3 stencil for each element and compute finite difference approximations * for schlieren and curvature of the stored heights in the elements. */ static void t8_step6_compute_stencil (t8_forest_t forest, struct data_per_element *element_data) @@ -277,7 +278,7 @@ t8_step6_compute_stencil (t8_forest_t forest, struct data_per_element *element_d } } -/* Each process has computed the data entries for its local elements. +/** Each process has computed the data entries for its local elements. * In order to get the values for the ghost elements, we use t8_forest_ghost_exchange_data. * Calling this function will fill all the ghost entries of our element data array with the * value on the process that owns the corresponding element. */ @@ -299,7 +300,7 @@ t8_step6_exchange_ghost_data (t8_forest_t forest, struct data_per_element *data) sc_array_destroy (sc_array_wrapper); } -/* Write the forest as vtu and also write the element's volumes in the file. +/** Write the forest as vtu and also write the element's volumes in the file. * * t8code supports writing element based data to vtu as long as its stored * as doubles. Each of the data fields to write has to be provided in its own diff --git a/tutorials/general/t8_step7.h b/tutorials/general/t8_step7.h index 965b2c3293..e2e4f9d8f8 100644 --- a/tutorials/general/t8_step7.h +++ b/tutorials/general/t8_step7.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_step7.h +/** \file t8_step7.h */ #ifndef T8_STEP7_H diff --git a/tutorials/general/t8_step7_interpolation.cxx b/tutorials/general/t8_step7_interpolation.cxx index 4bab4e5cae..53411f2aec 100644 --- a/tutorials/general/t8_step7_interpolation.cxx +++ b/tutorials/general/t8_step7_interpolation.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step7 example of t8code. +/** \file t8_step7_interpolation.cxx + * This file is part of the step7 example of t8code. * Showcase how to interpolate/project data during adaptation of a mesh. * Uses a single datapoint on each element, that is replicated during refinement, and averaged during coarsening. * Implementation of the t8_forest_replace callback, t8_forest_adapt callback @@ -41,26 +42,26 @@ T8_EXTERN_C_BEGIN (); -/* The data that we want to store for each element. +/** The data that we want to store for each element. In this tutorial we will store the distance to the centroid in the data. You can store more than one element here (see for example tutorial - step 5). */ struct t8_step7_element_data_t { - /* Storage for our element values. */ + /** Storage for our element values. */ double values; }; -/* This is our own defined data that we will pass on to the +/** This is our own defined data that we will pass on to the * adaptation callback. */ struct t8_step7_adapt_data { - t8_3D_vec midpoint; /* The midpoint of our sphere. */ - double refine_if_inside_radius; /* if an element's center is smaller than this value, we refine the element. */ - double coarsen_if_outside_radius; /* if an element's center is larger this value, we coarsen its family. */ - sc_array_t *element_data; + t8_3D_vec midpoint; /**< The midpoint of our sphere. */ + double refine_if_inside_radius; /**< if an element's center is smaller than this value, we refine the element. */ + double coarsen_if_outside_radius; /**< if an element's center is larger this value, we coarsen its family. */ + sc_array_t *element_data; /**< Array with the element data. */ }; -/* Set the value of an element to a given entry. */ +/** Set the value of an element to a given entry. */ static void t8_element_set_value (const t8_step7_adapt_data *adapt_data, t8_locidx_t ielement, double value) { @@ -69,14 +70,14 @@ t8_element_set_value (const t8_step7_adapt_data *adapt_data, t8_locidx_t ielemen *((t8_step7_element_data_t *) t8_sc_array_index_locidx (adapt_data->element_data, ielement)) = elem_data; } -/* Set the value of an element to a given element data. */ +/** Set the value of an element to a given element data. */ static void t8_element_set_element (const t8_step7_adapt_data *adapt_data, t8_locidx_t ielement, t8_step7_element_data_t element) { *((t8_step7_element_data_t *) t8_sc_array_index_locidx (adapt_data->element_data, ielement)) = element; } -/* Get the value of an element. */ +/** Get the value of an element. */ static t8_step7_element_data_t t8_element_get_value (const t8_step7_adapt_data *adapt_data, t8_locidx_t ielement) { @@ -100,7 +101,6 @@ t8_element_get_value (const t8_step7_adapt_data *adapt_data, t8_locidx_t ielemen * \param [in] forest_from The forest from which we adapt the current forest (in our case, the uniform forest) * \param [in] which_tree The process local id of the current tree. * \param [in] tree_class The eclass of \a which_tree - * \param [in] tree_class The tree_class of the elements of the tree. * \param [in] lelement_id The tree local index of the current element (or the first of the family). * \param [in] scheme The refinement scheme of the forest. * \param [in] is_family If 1, the first \a num_elements entries in \a elements form a family. If 0, they do not. @@ -271,7 +271,7 @@ t8_write_vtu (t8_forest_t forest, struct t8_step7_adapt_data *data, const char * T8_FREE (element_data); } -/* In this function the interpolation is described. As a first step a +/** In this function the interpolation is described. As a first step a * hypercubic cmesh and then a forest is created. * We create a data array with the distance to the centroid of each cell. * The forest is adapted and the data array is interpolated corresponding to diff --git a/tutorials/general/t8_step7_main.cxx b/tutorials/general/t8_step7_main.cxx index 4d34ed75da..01183e8843 100644 --- a/tutorials/general/t8_step7_main.cxx +++ b/tutorials/general/t8_step7_main.cxx @@ -20,13 +20,15 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the step7 example of t8code. +/** \file t8_step7_main.cxx + * This file is part of the step7 example of t8code. * Here, we only wrap the main function. See t8_step7_interpolation.cxx for the documentation of * the step7 example. */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_tutorial_build_cmesh.cxx b/tutorials/general/t8_tutorial_build_cmesh.cxx index fd59e1753f..ad5807fabf 100644 --- a/tutorials/general/t8_tutorial_build_cmesh.cxx +++ b/tutorials/general/t8_tutorial_build_cmesh.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Build-Cmesh +/** \file t8_tutorial_build_cmesh.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Build-Cmesh * * This is a tutorial regarding the creation of a cmesh using the C++ interface of t8code. * In the following we will create two user defined meshes. @@ -121,9 +122,9 @@ T8_EXTERN_C_BEGIN (); * * 7. Commit the mesh * t8_cmesh_commit (cmesh, comm); - * */ + */ -/* Definition of a two dimensional mesh with linear geometry and periodic boundaries. +/** Definition of a two dimensional mesh with linear geometry and periodic boundaries. * The mesh consists of four triangles and two quads. * * This is how the cmesh looks like. The numbers are the tree numbers: @@ -199,9 +200,9 @@ t8_cmesh_new_periodic_hybrid_2d (sc_MPI_Comm comm) return cmesh; } -/* Definition of a three dimensional mesh with linear geometry. +/** Definition of a three dimensional mesh with linear geometry. * The mesh consists of two tetrahedra, two prisms, one pyramid, and one hexahedron. - * */ + */ t8_cmesh_t t8_cmesh_new_hybrid_gate_3d (sc_MPI_Comm comm) { diff --git a/tutorials/general/t8_tutorial_build_cmesh.h b/tutorials/general/t8_tutorial_build_cmesh.h index b2573b7064..f905f51fc3 100644 --- a/tutorials/general/t8_tutorial_build_cmesh.h +++ b/tutorials/general/t8_tutorial_build_cmesh.h @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** file t8_tutorial_build_cmesh.h +/** \file t8_tutorial_build_cmesh.h */ #ifndef T8_TUTORIAL_BUILD_CMESH_H diff --git a/tutorials/general/t8_tutorial_build_cmesh_main.cxx b/tutorials/general/t8_tutorial_build_cmesh_main.cxx index 55ef3c5a1f..2695a79993 100644 --- a/tutorials/general/t8_tutorial_build_cmesh_main.cxx +++ b/tutorials/general/t8_tutorial_build_cmesh_main.cxx @@ -20,13 +20,15 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* This file is part of the t8code tutorial regarding the creation of a scmesh. +/** \file t8_tutorial_build_cmesh_main.cxx + * This file is part of the t8code tutorial regarding the creation of a scmesh. * Here, we only wrap the main function. See t8_tutorial_build_cmesh.cxx for the documentation of * the 'build-cmesh'-tutorial */ #include +/** Entry point of the program. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_tutorial_build_scheme.cxx b/tutorials/general/t8_tutorial_build_scheme.cxx index c5d05e3a59..6e87826884 100644 --- a/tutorials/general/t8_tutorial_build_scheme.cxx +++ b/tutorials/general/t8_tutorial_build_scheme.cxx @@ -20,7 +20,7 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* +/** \file t8_tutorial_build_scheme.cxx * In this tutorial we discuss how to use schemes in t8code. * Schemes are used to define the refinement and coarsening behavior of the forest. Upon building the forest from a cmesh, * the user can define a scheme that will be used for all tree-specific operations in the forest. That way the scheme @@ -88,7 +88,7 @@ t8_scheme_default_build_mixed (void) return builder.build_scheme (); } -/* The main function of this example. */ +/** The main function of this example. */ int main (int argc, char **argv) { diff --git a/tutorials/general/t8_tutorial_search.cxx b/tutorials/general/t8_tutorial_search.cxx index 1d54e86cb7..01ec400a92 100644 --- a/tutorials/general/t8_tutorial_search.cxx +++ b/tutorials/general/t8_tutorial_search.cxx @@ -20,7 +20,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* See also: https://github.com/DLR-AMR/t8code/wiki/Tutorial:-Search +/** \file t8_tutorial_search.cxx + * See also: https://github.com/DLR-AMR/t8code/wiki/Tutorial:-Search * In this tutorial we discuss t8code's search algorithm. * search is a powerful tool to identify leaf elements that match a given condition * and execute a function on them. @@ -117,23 +118,23 @@ #include /* For the search algorithm. */ #include /* Example forest adaptation from step 3 */ -/* Our search query, a particle together with a flag. */ +/** Our search query, a particle together with a flag. */ struct t8_tutorial_search_particle_t { - double coordinates[3]; /* The coordinates of our particle. */ - int is_inside_partition; /* Will be set to true if the particles lies inside this process' parallel partition. */ + double coordinates[3]; /**< The coordinates of our particle. */ + int is_inside_partition; /**< Will be set to true if the particles lies inside this process' parallel partition. */ }; -/* Additional user data that we process during search. +/** Additional user data that we process during search. * For each element we count the number of particles that it contains * and we count the total number of elements that we constructed during search. */ struct t8_tutorial_search_user_data_t { - sc_array *particles_per_element; /* For each element the number of particles inside it. */ - t8_locidx_t num_elements_searched; /* The total number of elements created. */ + sc_array *particles_per_element; /**< For each element the number of particles inside it. */ + t8_locidx_t num_elements_searched; /**< The total number of elements created. */ }; -/* +/** * The search callback. * It will be called once per element and generally decides whether or not * to continue the search with the children of the element. @@ -361,6 +362,7 @@ t8_tutorial_search_build_particles (size_t num_particles, unsigned int seed, sc_ return particles; } +/** Entry point of the program. */ int main (int argc, char **argv) {