31 #ifndef T8_ELEMENT_C_INTERFACE_H
32 #define T8_ELEMENT_C_INTERFACE_H
203 int face,
int corner);
220 int corner,
int face);
357 int face,
int face_child);
413 int sign,
int is_smaller_face);
469 *first_desc,
int level);
681 #ifdef T8_ENABLE_DEBUG
This struct holds virtual functions for a particular element class.
Definition: t8_element_cxx.hxx:47
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:105
uint64_t t8_linearidx_t
A type for storing SFC indices.
Definition: t8.h:114
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
size_t t8_element_size(const t8_eclass_scheme_c *ts)
Return the size of any element of a given class.
Definition: t8_element_c_interface.cxx:34
void t8_element_new(const t8_eclass_scheme_c *ts, int length, t8_element_t **elems)
Allocate memory for an array of elements of a given class and initialize them.
Definition: t8_element_c_interface.cxx:475
int t8_element_get_corner_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int corner, int face)
Compute the face numbers of the faces sharing an element's corner.
Definition: t8_element_c_interface.cxx:173
int t8_element_refines_irregular(const t8_eclass_scheme_c *ts)
Returns true, if there is one element in the tree, that does not refine into 2^dim children.
Definition: t8_element_c_interface.cxx:42
t8_linearidx_t t8_element_get_linear_id(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int level)
Compute the linear id of a given element in a hypothetical uniform refinement of a given level.
Definition: t8_element_c_interface.cxx:373
void t8_element_nca(const t8_eclass_scheme_c *ts, const t8_element_t *elem1, const t8_element_t *elem2, t8_element_t *nca)
Compute the nearest common ancestor of two elements.
Definition: t8_element_c_interface.cxx:225
int t8_element_is_family(const t8_eclass_scheme_c *ts, t8_element_t **fam)
Query whether a given set of elements is a family or not.
Definition: t8_element_c_interface.cxx:217
void t8_element_parent(const t8_eclass_scheme_c *ts, const t8_element_t *elem, t8_element_t *parent)
Compute the parent of a given element elem and store it in parent.
Definition: t8_element_c_interface.cxx:92
int t8_element_num_siblings(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the number of siblings of an element.
Definition: t8_element_c_interface.cxx:101
void t8_element_vertex_reference_coords(const t8_eclass_scheme_c *ts, const t8_element_t *t, const int vertex, double coords[])
Compute the coordinates of a given element vertex inside a reference tree that is embedded into [0,...
Definition: t8_element_c_interface.cxx:419
int t8_element_extrude_face(const t8_eclass_scheme_c *ts, const t8_element_t *face, const t8_eclass_scheme_c *face_scheme, t8_element_t *elem, int root_face)
Given a boundary face inside a root tree's face construct the element inside the root tree that has t...
Definition: t8_element_c_interface.cxx:294
void t8_element_sibling(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int sibid, t8_element_t *sibling)
Compute a specific sibling of a given element elem and store it in sibling.
Definition: t8_element_c_interface.cxx:110
t8_element_shape_t t8_element_shape(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Return the shape of an allocated element according its type.
Definition: t8_element_c_interface.cxx:365
int t8_element_compare(const t8_eclass_scheme_c *ts, const t8_element_t *elem1, const t8_element_t *elem2)
Compare two elements.
Definition: t8_element_c_interface.cxx:83
t8_gloidx_t t8_element_count_leafs_from_root(const t8_eclass_scheme_c *ts, int level)
Count how many leaf descendants of a given uniform level the root element will produce.
Definition: t8_element_c_interface.cxx:438
void t8_element_children(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int length, t8_element_t *c[])
Construct all children of a given element.
Definition: t8_element_c_interface.cxx:191
void t8_element_copy(const t8_eclass_scheme_c *ts, const t8_element_t *source, t8_element_t *dest)
Copy all entries of source to dest.
Definition: t8_element_c_interface.cxx:74
t8_eclass_t t8_element_child_eclass(const t8_eclass_scheme_c *ts, int childid)
Return the type of each child in the ordering of the implementation.
Definition: t8_element_c_interface.cxx:58
int t8_element_face_neighbor_inside(const t8_eclass_scheme_c *ts, const t8_element_t *elem, t8_element_t *neigh, int face, int *neigh_face)
Construct the face neighbor of a given element if this face neighbor is inside the root tree.
Definition: t8_element_c_interface.cxx:354
int t8_element_level(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Return the level of a particular element.
Definition: t8_element_c_interface.cxx:66
void t8_element_last_descendant(const t8_eclass_scheme_c *ts, const t8_element_t *elem, t8_element_t *desc, int level)
Compute the last descendant of a given element.
Definition: t8_element_c_interface.cxx:392
int t8_element_max_num_faces(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the maximum number of faces of a given element and all of its descendants.
Definition: t8_element_c_interface.cxx:137
int t8_element_child_id(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the child id of an element.
Definition: t8_element_c_interface.cxx:200
void t8_element_successor(const t8_eclass_scheme_c *ts, const t8_element_t *elem1, t8_element_t *elem2, int level)
Construct the successor in a uniform refinement of a given element.
Definition: t8_element_c_interface.cxx:402
void t8_element_set_linear_id(const t8_eclass_scheme_c *ts, t8_element_t *elem, int level, t8_linearidx_t id)
Initialize the entries of an allocated element according to a given linear id in a uniform refinement...
Definition: t8_element_c_interface.cxx:336
int t8_element_num_face_children(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face)
Compute the number of children of an element's face when the element is refined.
Definition: t8_element_c_interface.cxx:155
t8_gloidx_t t8_element_count_leafs(const t8_eclass_scheme_c *ts, const t8_element_t *t, int level)
Return a pointer to a t8_element in an array indexed by a size_t.
Definition: t8_element_c_interface.cxx:429
int t8_element_root_len(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the root lenght of a given element, that is the length of its level 0 ancestor.
Definition: t8_element_c_interface.cxx:411
int t8_element_maxlevel(const t8_eclass_scheme_c *ts)
Return the maximum allowed level for any element of a given class.
Definition: t8_element_c_interface.cxx:50
int t8_element_ancestor_id(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int level)
Compute the ancestor id of an element, that is the child id at a given level.
Definition: t8_element_c_interface.cxx:208
void t8_element_boundary_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, t8_element_t *boundary, const t8_eclass_scheme_c *boundary_scheme)
Construct the boundary element at a specific face.
Definition: t8_element_c_interface.cxx:305
void t8_element_transform_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem1, t8_element_t *elem2, int orientation, int sign, int is_smaller_face)
Suppose we have two trees that share a common face f.
Definition: t8_element_c_interface.cxx:283
int t8_element_num_children(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the number of children of an element when it is refined.
Definition: t8_element_c_interface.cxx:146
int t8_element_num_faces(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the number of faces of an element.
Definition: t8_element_c_interface.cxx:129
void t8_element_first_descendant(const t8_eclass_scheme_c *ts, const t8_element_t *elem, t8_element_t *desc, int level)
Compute the first descendant of a given element.
Definition: t8_element_c_interface.cxx:382
void t8_element_general_function(const t8_eclass_scheme_c *ts, const t8_element_t *elem, const void *indata, void *outdata)
This function has no defined effect but each implementation is free to provide its own meaning of it.
Definition: t8_element_c_interface.cxx:446
int t8_element_is_root_boundary(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face)
Construct all codimension-one boundary elements of a given element.
Definition: t8_element_c_interface.cxx:345
t8_element_shape_t t8_element_face_shape(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face)
Compute the shape of the face of an element.
Definition: t8_element_c_interface.cxx:234
int t8_element_face_child_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, int face_child)
Given a face of an element and a child number of a child of that face, return the face number of the ...
Definition: t8_element_c_interface.cxx:255
void t8_element_first_descendant_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, t8_element_t *first_desc, int level)
Construct the first descendant of an element at a given level that touches a given face.
Definition: t8_element_c_interface.cxx:316
void t8_element_children_at_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, t8_element_t *children[], int num_children, int *child_indices)
Given an element and a face of the element, compute all children of the element that touch the face.
Definition: t8_element_c_interface.cxx:243
int t8_element_get_face_corner(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, int corner)
Return the corner number of an element's face corner.
Definition: t8_element_c_interface.cxx:164
void t8_element_last_descendant_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face, t8_element_t *last_desc, int level)
Construct the last descendant of an element at a given level that touches a given face.
Definition: t8_element_c_interface.cxx:326
void t8_element_child(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int childid, t8_element_t *child)
Construct the child element of a given number.
Definition: t8_element_c_interface.cxx:182
int t8_element_num_corners(const t8_eclass_scheme_c *ts, const t8_element_t *elem)
Compute the number of corners of an element.
Definition: t8_element_c_interface.cxx:120
int t8_element_tree_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face)
Given an element and a face of this element.
Definition: t8_element_c_interface.cxx:274
void t8_element_destroy(const t8_eclass_scheme_c *ts, int length, t8_element_t **elems)
Deallocate an array of elements.
Definition: t8_element_c_interface.cxx:484
int t8_element_face_parent_face(const t8_eclass_scheme_c *ts, const t8_element_t *elem, int face)
Given a face of an element return the face number of the parent of the element that matches the eleme...
Definition: t8_element_c_interface.cxx:265
t8_eclass_t t8_element_shape_t
Type definition for the geometric shape of an element.
Definition: t8_element_shape.h:38