t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_forest.h
Go to the documentation of this file.
1 /*
2  This file is part of t8code.
3  t8code is a C library to manage a collection (a forest) of multiple
4  connected adaptive space-trees of general element classes in parallel.
5 
6  Copyright (C) 2015 the developers
7 
8  t8code is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  t8code is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with t8code; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
27 /* TODO: begin documenting this file: make doxygen 2>&1 | grep t8_forest */
28 
29 #ifndef T8_FOREST_H
30 #define T8_FOREST_H
31 
32 #include <sc_statistics.h>
33 #include <t8_cmesh.h>
34 #include <t8_element.h>
35 #include <t8_vtk.h>
36 #include <t8_data/t8_containers.h>
37 
39 typedef struct t8_forest *t8_forest_t;
40 typedef struct t8_tree *t8_tree_t;
41 
45 typedef enum
46 {
52 
57 typedef void (*t8_generic_function_pointer) (void);
58 
59 T8_EXTERN_C_BEGIN ();
60 
90 typedef void (*t8_forest_replace_t) (t8_forest_t forest_old,
91  t8_forest_t forest_new,
92  t8_locidx_t which_tree,
94  int refine,
95  int num_outgoing,
96  t8_locidx_t first_outgoing,
97  int num_incoming,
98  t8_locidx_t first_incoming);
99 
120 /* TODO: Do we really need the forest argument? Since the forest is not committed yet it
121  * seems dangerous to expose to the user. */
122 typedef int (*t8_forest_adapt_t) (t8_forest_t forest,
123  t8_forest_t forest_from,
124  t8_locidx_t which_tree,
125  t8_locidx_t lelement_id,
126  t8_eclass_scheme_c *ts,
127  const int is_family,
128  const int num_elements,
130 
142 void t8_forest_init (t8_forest_t *pforest);
143 
153 
163 
174 int t8_forest_is_equal (t8_forest_t forest_a,
175  t8_forest_t forest_b);
176 
187 void t8_forest_set_cmesh (t8_forest_t forest,
188  t8_cmesh_t cmesh, sc_MPI_Comm comm);
189 
200 void t8_forest_set_scheme (t8_forest_t forest,
201  t8_scheme_cxx_t *scheme);
202 
213 void t8_forest_set_level (t8_forest_t forest, int level);
214 
228 void t8_forest_set_copy (t8_forest_t forest,
229  const t8_forest_t from);
230 
253 /* TODO: make recursive flag to int specifying the number of recursions? */
254 void t8_forest_set_adapt (t8_forest_t forest,
255  const t8_forest_t set_from,
256  t8_forest_adapt_t adapt_fn,
257  int recursive);
258 
266 void t8_forest_set_user_data (t8_forest_t forest, void *data);
267 
274 void *t8_forest_get_user_data (t8_forest_t forest);
275 
288  functrion);
289 
297 
319  const t8_forest_t set_from,
320  int set_for_coarsening);
321 
346  const t8_forest_t set_from,
347  int no_repartition);
348 
357 void t8_forest_set_ghost (t8_forest_t forest, int do_ghost,
358  t8_ghost_type_t ghost_type);
359 
368 void t8_forest_set_ghost_ext (t8_forest_t forest, int do_ghost,
369  t8_ghost_type_t ghost_type,
370  int ghost_version);
371 
372 /* TODO: use assertions and document that the forest_set (..., from) and
373  * set_load are mutually exclusive. */
374 void t8_forest_set_load (t8_forest_t forest,
375  const char *filename);
376 
382 
388 void t8_forest_commit (t8_forest_t forest);
389 
402 
409 
416 
425 
433  t8_locidx_t ltreeid);
434 
445  t8_gloidx_t gtreeid);
446 
457  t8_locidx_t ltreeid);
458 
469  t8_locidx_t lctreeid);
470 
479  t8_locidx_t ltreeid);
480 
504  t8_locidx_t ltreeid,
505  const t8_element_t *leaf,
507  **pneighbor_leafs[],
508  int face,
509  int *dual_faces[],
510  int *num_neighbors,
512  **pelement_indices,
514  **pneigh_scheme,
515  int forest_is_balanced);
516 
527 /* TODO: In \ref t8_forest_ghost_cxx we already implemented a begin and end function
528  * that allow for overlapping communication and computation. We will make them
529  * available in this interface in the future. */
531  sc_array_t *element_data);
532 
544  int set_profiling);
545 
546 /* TODO: document */
547 void t8_forest_compute_profile (t8_forest_t forest);
548 
549 const sc_statinfo_t *t8_forest_profile_get_adapt_stats (t8_forest_t forest);
550 
551 const sc_statinfo_t *t8_forest_profile_get_ghost_stats (t8_forest_t forest);
552 
553 const sc_statinfo_t *t8_forest_profile_get_partition_stats (t8_forest_t
554  forest);
555 
556 const sc_statinfo_t *t8_forest_profile_get_commit_stats (t8_forest_t forest);
557 
558 const sc_statinfo_t *t8_forest_profile_get_balance_stats (t8_forest_t forest);
559 
560 const sc_statinfo_t *t8_forest_profile_get_balance_rounds_stats (t8_forest_t
561  forest);
562 
570 
580 
593  int *procs_sent);
594 
606  int *balance_rounds);
607 
620  *ghosts_sent);
621 
632  forest);
633 
635 void t8_forest_ghost_print (t8_forest_t forest);
636 
647  sc_MPI_Comm comm,
648  int set_profiling);
649 
655 sc_MPI_Comm t8_forest_get_mpicomm (t8_forest_t forest);
656 
662 
668 
674 
680 
690  t8_locidx_t ltreeid);
691 
699  t8_locidx_t ltree_id);
700 
708  t8_locidx_t ltreeid);
709 
717  t8_locidx_t ltree_id);
718 
724 
735  t8_locidx_t lelement_id,
736  t8_locidx_t *ltreeid);
737 
747  t8_locidx_t ltreeid,
748  t8_locidx_t leid_in_tree);
749 
756  t8_locidx_t ltreeid);
757 
767  t8_locidx_t ltreeid);
768 
774 
781  t8_locidx_t ltreeid);
782 
791 
798 
808 
819  t8_locidx_t ltreeid,
820  const t8_element_t
821  *elem, int face);
822 
840  t8_locidx_t ltreeid,
841  const t8_element_t *elem,
842  t8_element_t *neigh,
844  *neigh_scheme, int face,
845  int *neigh_face);
846 
847 /* TODO: implement */
848 void t8_forest_save (t8_forest_t forest);
849 
885  const char *fileprefix,
886  int write_treeid,
887  int write_mpirank,
888  int write_level,
889  int write_element_id,
890  int write_ghosts,
891  int write_curved,
892  int do_not_use_API,
893  int num_data,
894  t8_vtk_data_field_t *data);
895 
911 int t8_forest_write_vtk (t8_forest_t forest,
912  const char *fileprefix);
913 
914 /* TODO: implement */
915 void t8_forest_iterate (t8_forest_t forest);
916 
927  t8_locidx_t ltree_id,
928  const t8_element_t *element,
929  int corner_number,
930  double *coordinates);
931 
944  t8_locidx_t ltreeid,
945  const t8_element_t *element,
946  double *coordinates);
947 
958 double t8_forest_element_diam (t8_forest_t forest,
959  t8_locidx_t ltreeid,
960  const t8_element_t *element);
961 
974  t8_locidx_t ltreeid,
975  const t8_element_t *element);
976 
989  t8_locidx_t ltreeid,
990  const t8_element_t *element,
991  int face);
992 
1003  t8_locidx_t ltreeid,
1004  const t8_element_t
1005  *element, int face,
1006  double centroid[3]);
1007 
1019  t8_locidx_t ltreeid,
1020  const t8_element_t
1021  *element, int face,
1022  double normal[3]);
1023 
1042  t8_locidx_t ltreeid,
1043  const t8_element_t
1044  *element,
1045  const double point[3],
1046  const double tolerance);
1047 
1048 /* TODO: if set level and partition/adapt/balance all give NULL, then
1049  * refine uniformly and partition/adapt/balance the unfiform forest. */
1062  t8_scheme_cxx_t *scheme,
1063  int level, int do_face_ghost,
1064  sc_MPI_Comm comm);
1065 
1077 /* TODO: make user_data const. */
1079  t8_forest_adapt_t adapt_fn,
1080  int recursive, int do_face_ghost,
1081  void *user_data);
1082 
1087 void t8_forest_ref (t8_forest_t forest);
1088 
1100 void t8_forest_unref (t8_forest_t *pforest);
1101 
1102 T8_EXTERN_C_END ();
1103 
1104 #endif /* !T8_FOREST_H */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:83
This structure holds the data of a local tree including the information about face neighbors.
Definition: t8_cmesh_types.h:189
This struct holds virtual functions for a particular element class.
Definition: t8_element_cxx.hxx:47
The t8_element_array_t is an array to store t8_element_t * of a given eclass_scheme implementation.
Definition: t8_containers.h:42
This structure is private to the implementation.
Definition: t8_forest_types.h:69
The scheme holds implementations for one or more element classes.
Definition: t8_element.h:51
The t8 tree datatype.
Definition: t8_forest_types.h:139
t8_eclass_t eclass
The element class of this tree.
Definition: t8_forest_types.h:141
t8_element_array_t elements
locally stored elements
Definition: t8_forest_types.h:140
Definition: t8_vtk.h:70
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:105
int32_t t8_locidx_t
A type for processor-local indexing.
Definition: t8.h:94
We define the coarse mesh of trees in this file.
We define the t8_element_array that stores elements of a given eclass scheme.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.
This file defines basic operations on an element in a refinement tree.
struct t8_element t8_element_t
Opaque structure for a generic element, only used as pointer.
Definition: t8_element.h:42
double t8_forest_element_face_area(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, int face)
Compute the area of an element's face if a geometry for this tree is registered in the forest's cmesh...
Definition: t8_forest_cxx.cxx:568
void t8_forest_set_partition(t8_forest_t forest, const t8_forest_t set_from, int set_for_coarsening)
Set a source forest to be partitioned during commit.
Definition: t8_forest.c:188
t8_eclass_scheme_c * t8_forest_get_eclass_scheme(t8_forest_t forest, t8_eclass_t eclass)
Return the eclass scheme of a given element class associated to a forest.
Definition: t8_forest.c:1096
t8_eclass_t t8_forest_get_tree_class(t8_forest_t forest, t8_locidx_t ltreeid)
Return the eclass of a tree in a forest.
Definition: t8_forest.c:1055
t8_locidx_t t8_forest_get_num_local_trees(t8_forest_t forest)
Return the number of local trees of a given forest.
Definition: t8_forest.c:833
double t8_forest_element_volume(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element)
Compute the volume of an element if a geometry for this tree is registered in the forest's cmesh.
Definition: t8_forest_cxx.cxx:365
int t8_forest_element_point_inside(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, const double point[3], const double tolerance)
Query whether a given point lies inside an element or not.
Definition: t8_forest_cxx.cxx:1035
double t8_forest_element_diam(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element)
Compute the diameter of an element if a geometry for this tree is registered in the forest's cmesh.
Definition: t8_forest_cxx.cxx:227
t8_ctree_t t8_forest_get_coarse_tree(t8_forest_t forest, t8_locidx_t ltreeid)
Given the local id of a tree in a forest, return the coarse tree of the cmesh that corresponds to thi...
Definition: t8_forest.c:1216
t8_locidx_t t8_forest_get_tree_element_offset(t8_forest_t forest, t8_locidx_t ltreeid)
Return the element offset of a local tree, that is the number of elements in all trees with smaller l...
Definition: t8_forest.c:1023
t8_forest_t t8_forest_new_uniform(t8_cmesh_t cmesh, t8_scheme_cxx_t *scheme, int level, int do_face_ghost, sc_MPI_Comm comm)
Build a uniformly refined forest on a coarse mesh.
Definition: t8_forest.c:1532
double * t8_forest_get_tree_vertices(t8_forest_t forest, t8_locidx_t ltreeid)
Return a pointer to the vertex coordinates of a tree.
Definition: t8_forest.c:890
double t8_forest_profile_get_adapt_time(t8_forest_t forest)
Get the runtime of the last call to t8_forest_adapt.
Definition: t8_forest.c:1354
t8_locidx_t t8_forest_cmesh_ltreeid_to_ltreeid(t8_forest_t forest, t8_locidx_t lctreeid)
Given the local id of a tree in the coarse mesh of a forest, compute the tree's local id in the fores...
Definition: t8_forest.c:1180
t8_gloidx_t t8_forest_get_global_num_elements(t8_forest_t forest)
Return the number of global elements in the forest.
Definition: t8_forest.c:735
void t8_forest_commit(t8_forest_t forest)
After allocating and adding properties to a forest, commit the changes.
Definition: t8_forest.c:454
void t8_forest_set_profiling(t8_forest_t forest, int set_profiling)
Enable or disable profiling for a forest.
Definition: t8_forest.c:1222
void t8_forest_element_face_centroid(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, int face, double centroid[3])
Compute the vertex coordinates of the centroid of an element's face if a geometry for this tree is re...
Definition: t8_forest_cxx.cxx:660
t8_gloidx_t t8_forest_get_first_local_element_id(t8_forest_t forest)
Compute the global index of the first local element of a forest.
Definition: t8_forest.c:1075
double t8_forest_profile_get_ghost_time(t8_forest_t forest, t8_locidx_t *ghosts_sent)
Get the runtime of the last call to t8_forest_create_ghosts.
Definition: t8_forest.c:1386
double t8_forest_profile_get_ghostexchange_waittime(t8_forest_t forest)
Get the waittime of the last call to t8_forest_ghost_exchange_data.
Definition: t8_forest.c:1399
void t8_forest_element_centroid(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, double *coordinates)
Compute the coordinates of the centroid of an element if a geometry for this tree is registered in th...
Definition: t8_forest_cxx.cxx:267
int t8_forest_get_maxlevel(t8_forest_t forest)
Return the maximum allowed refinement level for any element in a forest.
Definition: t8_forest_cxx.cxx:77
t8_locidx_t t8_forest_ltreeid_to_cmesh_ltreeid(t8_forest_t forest, t8_locidx_t ltreeid)
Given the local id of a tree in a forest, compute the tree's local id in the associated cmesh.
Definition: t8_forest.c:1146
t8_element_array_t * t8_forest_tree_get_leafs(t8_forest_t forest, t8_locidx_t ltree_id)
Return the array of leaf elements of a local tree in a forest.
Definition: t8_forest.c:898
void t8_forest_set_balance(t8_forest_t forest, const t8_forest_t set_from, int no_repartition)
Set a source forest to be balanced during commit.
Definition: t8_forest.c:215
void t8_forest_set_user_function(t8_forest_t forest, t8_generic_function_pointer functrion)
Set the user function pointer of a forest.
Definition: t8_forest.c:322
void t8_forest_set_ghost_ext(t8_forest_t forest, int do_ghost, t8_ghost_type_t ghost_type, int ghost_version)
Like t8_forest_set_ghost but with the additional options to change the ghost algorithm.
Definition: t8_forest.c:245
double t8_forest_profile_get_balance_time(t8_forest_t forest, int *balance_rounds)
Get the runtime of the last call to t8_forest_balance.
Definition: t8_forest.c:1375
t8_ghost_type_t
This type controls, which neighbors count as ghost elements.
Definition: t8_forest.h:46
@ T8_GHOST_VERTICES
Consider all vertex (codimension 3) and edge and face neighbors.
Definition: t8_forest.h:50
@ T8_GHOST_FACES
Consider all face (codimension 1) neighbors.
Definition: t8_forest.h:48
@ T8_GHOST_NONE
Do not create ghost layer.
Definition: t8_forest.h:47
@ T8_GHOST_EDGES
Consider all edge (codimension 2) and face neighbors.
Definition: t8_forest.h:49
t8_gloidx_t t8_forest_global_tree_id(t8_forest_t forest, t8_locidx_t ltreeid)
Return the global id of a local tree or a ghost tree.
Definition: t8_forest.c:857
void t8_forest_set_adapt(t8_forest_t forest, const t8_forest_t set_from, t8_forest_adapt_t adapt_fn, int recursive)
Set a source forest with an adapt function to be adapted on commiting.
Definition: t8_forest.c:277
void(* t8_generic_function_pointer)(void)
This typedef is needed as a helper construct to properly be able to define a function that returns a ...
Definition: t8_forest.h:57
t8_element_t * t8_forest_get_element(t8_forest_t forest, t8_locidx_t lelement_id, t8_locidx_t *ltreeid)
Return an element of the forest.
Definition: t8_forest.c:941
void t8_forest_set_copy(t8_forest_t forest, const t8_forest_t from)
Set a forest as source for copying on commiting.
Definition: t8_forest.c:162
t8_locidx_t t8_forest_get_num_ghost_trees(t8_forest_t forest)
Return the number of ghost trees of a given forest.
Definition: t8_forest.c:822
void t8_forest_set_user_data(t8_forest_t forest, void *data)
Set the user data of a forest.
Definition: t8_forest.c:309
t8_locidx_t t8_forest_get_local_id(t8_forest_t forest, t8_gloidx_t gtreeid)
Given a global tree id compute the forest local id of this tree.
Definition: t8_forest.c:1124
void t8_forest_init(t8_forest_t *pforest)
Create a new forest with reference count one.
Definition: t8_forest.c:38
void t8_forest_ref(t8_forest_t forest)
Increase the reference counter of a forest.
Definition: t8_forest.c:1661
struct t8_forest * t8_forest_t
Opaque pointer to a forest implementation.
Definition: t8_forest.h:39
int t8_forest_is_initialized(t8_forest_t forest)
Check whether a forest is not NULL, initialized and not committed.
Definition: t8_forest.c:63
double t8_forest_profile_get_partition_time(t8_forest_t forest, int *procs_sent)
Get the runtime of the last call to t8_forest_partition.
Definition: t8_forest.c:1364
t8_locidx_t t8_forest_get_tree_num_elements(t8_forest_t forest, t8_locidx_t ltreeid)
Return the number of elements of a tree.
Definition: t8_forest.c:1044
void t8_forest_unref(t8_forest_t *pforest)
Decrease the reference counter of a forest.
Definition: t8_forest.c:1668
void t8_forest_set_scheme(t8_forest_t forest, t8_scheme_cxx_t *scheme)
Set the element scheme associated to a forest.
Definition: t8_forest.c:136
t8_scheme_cxx_t * t8_forest_get_scheme(t8_forest_t forest)
Return the element scheme associated to a forest.
Definition: t8_forest.c:1087
void t8_forest_set_level(t8_forest_t forest, int level)
Set the initial refinement level to be used when forest is commited.
Definition: t8_forest.c:150
t8_generic_function_pointer t8_forest_get_user_function(t8_forest_t forest)
Return the user function pointer associated with a forest.
Definition: t8_forest.c:331
int t8_forest_is_committed(t8_forest_t forest)
Check whether a forest is not NULL, initialized and committed.
Definition: t8_forest.c:81
void t8_forest_element_coordinate(t8_forest_t forest, t8_locidx_t ltree_id, const t8_element_t *element, int corner_number, double *coordinates)
Compute the coordinates of a given vertex of an element if a geometry for this tree is registered in ...
Definition: t8_forest_cxx.cxx:199
void t8_forest_set_cmesh(t8_forest_t forest, t8_cmesh_t cmesh, sc_MPI_Comm comm)
Set the cmesh associated to a forest.
Definition: t8_forest.c:113
t8_locidx_t t8_forest_get_tree_element_count(t8_tree_t tree)
Return the number of elements of a tree.
Definition: t8_forest.c:1031
void t8_forest_element_face_normal(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *element, int face, double normal[3])
Compute the normal vector of an element's face if a geometry for this tree is registered in the fores...
Definition: t8_forest_cxx.cxx:788
t8_element_t * t8_forest_get_element_in_tree(t8_forest_t forest, t8_locidx_t ltreeid, t8_locidx_t leid_in_tree)
Return an element of a local tree in a forest.
Definition: t8_forest.c:1010
void t8_forest_partition_cmesh(t8_forest_t forest, sc_MPI_Comm comm, int set_profiling)
Change the cmesh associated to a forest to a partitioned cmesh that is partitioned according to the t...
Definition: t8_forest.c:780
t8_tree_t t8_forest_get_tree(t8_forest_t forest, t8_locidx_t ltree_id)
Return a pointer to a tree in a forest.
Definition: t8_forest.c:881
t8_forest_t t8_forest_new_adapt(t8_forest_t forest_from, t8_forest_adapt_t adapt_fn, int recursive, int do_face_ghost, void *user_data)
Build a adapted forest from another forest.
Definition: t8_forest.c:1560
t8_gloidx_t t8_forest_get_first_local_tree_id(t8_forest_t forest)
Return the global id of the first local tree of a forest.
Definition: t8_forest.c:814
int t8_forest_write_vtk_ext(t8_forest_t forest, const char *fileprefix, int write_treeid, int write_mpirank, int write_level, int write_element_id, int write_ghosts, int write_curved, int do_not_use_API, int num_data, t8_vtk_data_field_t *data)
Write the forest in a parallel vtu format.
Definition: t8_forest.c:1444
t8_gloidx_t t8_forest_get_num_global_trees(t8_forest_t forest)
Return the number of global trees of a given forest.
Definition: t8_forest.c:849
int t8_forest_write_vtk(t8_forest_t forest, const char *fileprefix)
Write the forest in a parallel vtu format.
Definition: t8_forest.c:1525
t8_locidx_t t8_forest_get_num_ghosts(t8_forest_t forest)
Return the number of ghost elements of a forest.
Definition: t8_forest.c:743
void t8_forest_set_ghost(t8_forest_t forest, int do_ghost, t8_ghost_type_t ghost_type)
Enable or disable the creation of a layer of ghost elements.
Definition: t8_forest.c:269
t8_locidx_t t8_forest_get_local_num_elements(t8_forest_t forest)
Return the number of process local elements in the forest.
Definition: t8_forest.c:727
t8_cmesh_t t8_forest_get_cmesh(t8_forest_t forest)
Return a cmesh associated to a forest.
Definition: t8_forest.c:908
void t8_forest_comm_global_num_elements(t8_forest_t forest)
Compute the global number of elements in a forest as the sum of the local element counts.
Definition: t8_forest.c:338
void t8_forest_print_profile(t8_forest_t forest)
Print the collected statistics from a forest profile.
Definition: t8_forest.c:1284
void * t8_forest_get_user_data(t8_forest_t forest)
Return the user data pointer associated with a forest.
Definition: t8_forest.c:316
void(* t8_forest_replace_t)(t8_forest_t forest_old, t8_forest_t forest_new, t8_locidx_t which_tree, t8_eclass_scheme_c *ts, int refine, int num_outgoing, t8_locidx_t first_outgoing, int num_incoming, t8_locidx_t first_incoming)
Callback function prototype to replace one set of elements with another.
Definition: t8_forest.h:90
void t8_forest_ghost_print(t8_forest_t forest)
Print the ghost structure of a forest.
Definition: t8_forest_ghost.cxx:1976
void t8_forest_ghost_exchange_data(t8_forest_t forest, sc_array_t *element_data)
Exchange ghost information of user defined element data.
Definition: t8_forest_ghost.cxx:1943
t8_eclass_t t8_forest_element_neighbor_eclass(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, int face)
Return the eclass of the tree in which a face neighbor of a given element lies.
Definition: t8_forest_cxx.cxx:1539
t8_eclass_t t8_forest_get_eclass(t8_forest_t forest, t8_locidx_t ltreeid)
Return the element class of a forest local tree.
Definition: t8_forest.c:1117
int t8_forest_is_equal(t8_forest_t forest_a, t8_forest_t forest_b)
Check whether two committed forests have the same local elements.
Definition: t8_forest_cxx.cxx:140
int(* t8_forest_adapt_t)(t8_forest_t forest, t8_forest_t forest_from, t8_locidx_t which_tree, t8_locidx_t lelement_id, t8_eclass_scheme_c *ts, const int is_family, const int num_elements, t8_element_t *elements[])
Callback function prototype to decide for refining and coarsening.
Definition: t8_forest.h:122
t8_gloidx_t t8_forest_element_face_neighbor(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, t8_eclass_scheme_c *neigh_scheme, int face, int *neigh_face)
Construct the face neighbor of an element, possibly across tree boundaries.
Definition: t8_forest_cxx.cxx:1589
void t8_forest_leaf_face_neighbors(t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *leaf, t8_element_t **pneighbor_leafs[], int face, int *dual_faces[], int *num_neighbors, t8_locidx_t **pelement_indices, t8_eclass_scheme_c **pneigh_scheme, int forest_is_balanced)
Compute the leaf face neighbors of a forest.
Definition: t8_forest_cxx.cxx:1796
sc_MPI_Comm t8_forest_get_mpicomm(t8_forest_t forest)
Return the mpi communicator associated to a forest.
Definition: t8_forest.c:807