Function t8_element_array_init_data

Function Documentation

void t8_element_array_init_data(t8_element_array_t *view, const t8_element_t *base, const t8_scheme_c *scheme, const t8_eclass_t tree_class, const size_t elem_count)

Initializes an already allocated (or static) view from given plain C data (array of t8_element_t).

The array view returned does not require t8_element_array_reset (doesn’t hurt though).

Parameters:
  • view[inout] Array structure to be initialized.

  • base[in] The data must not be moved while view is alive. Must be an array of t8_element_t corresponding to scheme.

  • scheme[in] The scheme of the elements stored in base.

  • tree_class[in] The tree class of the elements stored in base.

  • elem_count[in] The length of the view in element units. The view cannot be resized to exceed this length. It is not necessary to call t8_element_array_reset later.