Function t8_cmesh_new_hypercube_pad

Function Documentation

t8_cmesh_t t8_cmesh_new_hypercube_pad(const t8_eclass_t eclass, sc_MPI_Comm comm, const double *boundary, t8_locidx_t polygons_x, t8_locidx_t polygons_y, t8_locidx_t polygons_z, const int use_axis_aligned)

Construct a hypercube cmesh from one primitive tree class.

c—f—h—d The hypercube defined by the boundary coordinates | | | | is first split into 3 sub-hypercubes. The sub-hypercubes | | | | are ordered from left to right (and top to bottom). a—e—g—b Coordinates e,f,g,h are (1,0,0),(1,2,0),(2,0,0),(2,2,0).

See also

t8_cmesh_new_hypercube. Example: let eclass = T8_ECLASS_TRIANGLE boundary coordinates = a(0,0,0), b(3,0,0), c(0,2,0), d(3,2,0) polygons_x, _y, _z = 3, 1, 0

c—f—h—d Each sub-hypercube is the split into 2 triangle roots. |1/|3/|5/| The ordering is the same as in

See

example/cmesh/t8_cmesh_hypercube_pad.cxx for a working example.

See also

t8_cmesh_new_hypercube. |/0|/2|/4| Thus, we get 6 trees, which are ordered as shown in the picture. a—e—g—b

Note

boundary must point to an array with 3*8 (3D), 3*4 (2D), 3*2 (1D), or 3 (0D) entries.

Note

Every sub-hypercube contains different number of trees depending on eclass. If eclass == T8_ECLASS_VERTEX, _LINE, _QUAD or _HEX every sub-hypercube contains one tree, if _TRIANGLE or _PRISM two trees and if _TET six trees. This is done in the same way as in

Parameters:
  • eclass[in] This element class determines the dimension of the cube.

  • comm[in] The mpi communicator to be used.

  • boundary[in] The vertices, that define the hypercube boundary.

  • polygons_x[in] The number of polygons along the x-axis.

  • polygons_y[in] The number of polygons along the y-axis. Only required if eclass is 2D or 3D.

  • polygons_z[in] The number of polygons along the z-axis. Only required if eclass is 3D.

  • use_axis_aligned[in] Use the axis-aligned geometry. If used, only two points per tree are stored.

Returns:

A committed t8_cmesh structure with polygons_x * polygons_z * polygons_y many sub-hypercubes of class eclass.