27 #ifndef T8_CMESH_STASH_H
28 #define T8_CMESH_STASH_H
118 int face2,
int orientation);
154 int package_id,
int key,
155 size_t size,
void *attr,
225 sc_MPI_Comm comm,
size_t elem_counts[3]);
The attribute information that is stored before a cmesh is committed.
Definition: t8_cmesh_stash.h:63
int key
The key used by the package to identify this attribute.
Definition: t8_cmesh_stash.h:69
t8_gloidx_t id
The global tree id.
Definition: t8_cmesh_stash.h:64
int package_id
The id of the package that set this attribute.
Definition: t8_cmesh_stash.h:68
int is_owned
True if the data was copied, false if the data is still owned by user.
Definition: t8_cmesh_stash.h:67
void * attr_data
Array of size bytes storing the attributes data.
Definition: t8_cmesh_stash.h:66
size_t attr_size
The size (in bytes) of this attribute.
Definition: t8_cmesh_stash.h:65
The eclass information that is stored before a cmesh is committed.
Definition: t8_cmesh_stash.h:42
t8_gloidx_t id
The global tree id.
Definition: t8_cmesh_stash.h:43
t8_eclass_t eclass
The eclass of that tree.
Definition: t8_cmesh_stash.h:44
The face-connection information that is stored before a cmesh is committed.
Definition: t8_cmesh_stash.h:50
t8_gloidx_t id1
The global tree id of the first tree in the connection.
Definition: t8_cmesh_stash.h:51
int face2
The face number of the second face.
Definition: t8_cmesh_stash.h:54
t8_gloidx_t id2
The global tree id of the second tree.
Definition: t8_cmesh_stash.h:52
int orientation
The orientation of the face connection.
Definition: t8_cmesh_stash.h:55
int face1
The face number of the first of the connected faces.
Definition: t8_cmesh_stash.h:53
The stash data structure is used to store information about the cmesh before it is commited.
Definition: t8_cmesh_stash.h:81
sc_array_t attributes
Stores the attributes.
Definition: t8_cmesh_stash.h:84
sc_array_t joinfaces
Stores the face-connections.
Definition: t8_cmesh_stash.h:83
sc_array_t classes
Stores the eclasses of the trees.
Definition: t8_cmesh_stash.h:82
This is the administrative header file for t8code.
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:105
void t8_stash_class_sort(t8_stash_t stash)
Sort the entries in the class array by the order given in the enum definition of t8_eclass.
Definition: t8_cmesh_stash.c:94
int t8_stash_is_equal(t8_stash_t stash_a, t8_stash_t stash_b)
Check two stashes for equal content and return true if so.
Definition: t8_cmesh_stash.c:338
t8_stash_t t8_stash_bcast(t8_stash_t stash, int root, sc_MPI_Comm comm, size_t elem_counts[3])
Broadcast a stash on the root process to all processes in a communicator.
Definition: t8_cmesh_stash.c:299
void t8_stash_add_class(t8_stash_t stash, t8_gloidx_t id, t8_eclass_t eclass)
Set the eclass of a tree.
Definition: t8_cmesh_stash.c:69
struct t8_stash_class t8_stash_class_struct_t
The eclass information that is stored before a cmesh is committed.
void t8_stash_destroy(t8_stash_t *pstash)
Free all memory associated in a stash structure.
Definition: t8_cmesh_stash.c:44
struct t8_stash_joinface t8_stash_joinface_struct_t
The face-connection information that is stored before a cmesh is committed.
void t8_stash_add_attribute(t8_stash_t stash, t8_gloidx_t id, int package_id, int key, size_t size, void *attr, int copy)
Add an attribute to a tree.
Definition: t8_cmesh_stash.c:160
int t8_stash_get_attribute_id(t8_stash_t stash, size_t index)
Return the package_id of a given attribute.
Definition: t8_cmesh_stash.c:207
size_t t8_stash_get_attribute_size(t8_stash_t stash, size_t index)
Return the size (in bytes) of an attribute in the stash.
Definition: t8_cmesh_stash.c:179
void t8_stash_init(t8_stash_t *pstash)
Initialize a stash data structure.
Definition: t8_cmesh_stash.c:32
void t8_stash_add_facejoin(t8_stash_t stash, t8_gloidx_t gid1, t8_gloidx_t gid2, int face1, int face2, int orientation)
Add a face connection to a stash.
Definition: t8_cmesh_stash.c:120
struct t8_stash_attribute t8_stash_attribute_struct_t
The attribute information that is stored before a cmesh is committed.
ssize_t t8_stash_class_bsearch(t8_stash_t stash, t8_gloidx_t tree_id)
Search for an entry with a given tree index in the class-stash.
Definition: t8_cmesh_stash.c:113
t8_gloidx_t t8_stash_get_attribute_tree_id(t8_stash_t stash, size_t index)
Return the id of the tree a given attribute belongs to.
Definition: t8_cmesh_stash.c:193
void t8_stash_joinface_sort(t8_stash_t stash)
Sort then entries in the facejoin array in order of the first treeid.
Definition: t8_cmesh_stash.c:152
int t8_stash_get_attribute_key(t8_stash_t stash, size_t index)
Return the key of a given attribute.
Definition: t8_cmesh_stash.c:200
int t8_stash_attribute_is_owned(t8_stash_t stash, size_t index)
Return true if an attribute in the stash is owned by the stash, that is, it was copied in the call to...
Definition: t8_cmesh_stash.c:214
void t8_stash_attribute_sort(t8_stash_t stash)
Sort the attributes array of a stash in the order (treeid, packageid, key) *.
Definition: t8_cmesh_stash.c:243
void * t8_stash_get_attribute(t8_stash_t stash, size_t index)
Return the pointer to an attribute in the stash.
Definition: t8_cmesh_stash.c:186
struct t8_stash t8_stash_struct_t
The stash data structure is used to store information about the cmesh before it is commited.
We define all possible element classes that occur in hybrid meshes.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.