t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Data Structures | Macros | Typedefs
t8_cmesh_types.h File Reference

We define here the datatypes needed for internal cmesh routines. More...

#include <t8.h>
#include <t8_refcount.h>
#include <t8_data/t8_shmem.h>
#include <t8_geometry/t8_geometry.h>
#include "t8_cmesh_stash.h"
#include "t8_element.h"

Go to the source code of this file.

Data Structures

struct  t8_cmesh
 This structure holds the connectivity data of the coarse mesh. More...
 
struct  t8_cghost
 
struct  t8_ctree
 This structure holds the data of a local tree including the information about face neighbors. More...
 
struct  t8_attribute_info
 This structure holds the information associated to an attribute of a tree. More...
 
struct  t8_cmesh_trees
 
struct  t8_part_tree
 
struct  t8_cprofile
 This struct is used to profile cmesh algorithms. More...
 

Macros

#define T8_CMESH_VERTICES_ATTRIBUTE_KEY   0 /* Used to store vertex coordinates. */
 
#define T8_CMESH_GEOMETRY_ATTRIBUTE_KEY   1 /* Used to store the name of a tree's geometry. */
 
#define T8_CMESH_OCC_EDGE_ATTRIBUTE_KEY   2 /* Used to store which edge is linked to which geometry */
 
#define T8_CMESH_OCC_EDGE_PARAMETERS_ATTRIBUTE_KEY   3 /* Used to store edge parameters */
 
#define T8_CMESH_OCC_FACE_ATTRIBUTE_KEY   T8_CMESH_OCC_EDGE_PARAMETERS_ATTRIBUTE_KEY + T8_ECLASS_MAX_EDGES /* Used to store wich face is linked to which surface */
 
#define T8_CMESH_OCC_FACE_PARAMETERS_ATTRIBUTE_KEY   T8_CMESH_OCC_FACE_ATTRIBUTE_KEY + 1 /* Used to store face parameters */
 
#define T8_CMESH_NEXT_POSSIBLE_KEY   T8_CMESH_OCC_FACE_PARAMETERS_ATTRIBUTE_KEY + T8_ECLASS_MAX_FACES /* The next free value for a t8code attribute key */
 
#define T8_CPROFILE_NUM_STATS   11
 The number of entries in a cprofile struct.
 

Typedefs

typedef struct t8_part_treet8_part_tree_t
 
typedef struct t8_cmesh_treest8_cmesh_trees_t
 
typedef struct t8_cprofile t8_cprofile_t
 
typedef struct t8_cmesh t8_cmesh_struct_t
 This structure holds the connectivity data of the coarse mesh. More...
 
typedef struct t8_cghost t8_cghost_struct_t
 
typedef struct t8_ctree t8_ctree_struct_t
 This structure holds the data of a local tree including the information about face neighbors. More...
 
typedef struct t8_attribute_info t8_attribute_info_struct_t
 This structure holds the information associated to an attribute of a tree. More...
 
typedef struct t8_cmesh_trees t8_cmesh_trees_struct_t
 
typedef struct t8_part_tree t8_part_tree_struct_t
 
typedef struct t8_cprofile t8_cprofile_struct_t
 This struct is used to profile cmesh algorithms. More...
 

Detailed Description

We define here the datatypes needed for internal cmesh routines.

Typedef Documentation

◆ t8_attribute_info_struct_t

This structure holds the information associated to an attribute of a tree.

The attributes of each are stored in a key-value storage, where the key consists of the two entries (package_id,key) both being integers. The package_id serves to identify the application layer that added the attribute and the key identifies the attribute whithin that application layer.

All attribute info objects of one tree are stored in an array and adding a tree's att_offset entry to the tree's adress yields this array. The attributes themselfes are stored in an array directly behind the array of the attribute infos.

◆ t8_cmesh_struct_t

typedef struct t8_cmesh t8_cmesh_struct_t

This structure holds the connectivity data of the coarse mesh.

It can either be replicated, then each process stores a copy of the whole mesh, or partitioned. In the latter case, each process only stores a local portion of the mesh plus information about ghost elements.

The coarse mesh is a collection of coarse trees that can be identified along faces. TODO: this description is outdated. rewrite it. The array ctrees stores these coarse trees sorted by their (global) tree_id. If the mesh if partitioned it is partitioned according to an (possible only virtually existing) underlying fine mesh. Therefore the ctrees array can store duplicated trees on different processes, if each of these processes owns elements of the same tree in the fine mesh.

Each tree stores information about its face-neighbours in an array of t8_ctree_fneighbor.

See also
t8_ctree_fneighbor

If partitioned the ghost trees are stored in a hash table that is backed up by an array. The hash value of a ghost tree is its tree_id modulo the number of ghosts on this process.

◆ t8_cprofile_struct_t

This struct is used to profile cmesh algorithms.

The cmesh struct stores a pointer to a profile struct, and if it is nonzero, various runtimes and data measurements are stored here.

See also
t8_cmesh_set_profiling and
t8_cmesh_print_profile

◆ t8_ctree_struct_t

typedef struct t8_ctree t8_ctree_struct_t

This structure holds the data of a local tree including the information about face neighbors.

For those the tree_to_face index is computed as follows. Let F be the maximal number of faces of any eclass of the cmesh's dimension, then ttf % F is the face number and ttf / F is the orientation. (t8_eclass_max_num_faces) The orientation is determined as follows. Let my_face and other_face be the two face numbers of the connecting trees. We chose a main_face from them as follows: Either both trees have the same element class, then the face with the lower face number is the main_face or the trees belong to different classes in which case the face belonging to the tree with the lower class according to the ordering triangle < square, hex < tet < prism < pyramid, is the main_face. Then face corner 0 of the main_face connects to a face corner k in the other face. The face orientation is defined as the number k. If the classes are equal and my_face == other_face, treating either of both faces as the main_face leads to the same result. See https://arxiv.org/pdf/1611.02929.pdf for more details.