Function t8_forest_element_centroid
Defined in File t8_forest_geometrical.h
Function Documentation
-
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 the forest’s cmesh.
The centroid can be seen as the midpoint of an element and thus can for example be used to compute level-set values or the distance between two elements.
- Parameters:
forest – [in] The forest.
ltreeid – [in] The forest local id of the tree in which the element is.
element – [in] The element.
coordinates – [out] On input an allocated array to store 3 doubles, on output the x, y and z coordinates of the centroid.