t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Functions
t8_cmesh_helpers.h File Reference

Collection of helper routines for building cmeshes. More...

#include <t8.h>
#include <t8_cmesh.h>
#include <t8_eclass.h>

Go to the source code of this file.

Functions

void t8_cmesh_set_join_by_vertices (t8_cmesh_t cmesh, const int ntrees, const t8_eclass_t *eclasses, const double *vertices, int **connectivity, const int do_both_directions)
 Sets the face connectivity information of an un-committed \cmesh based on a list of tree vertices. More...
 

Detailed Description

Collection of helper routines for building cmeshes.

Function Documentation

◆ t8_cmesh_set_join_by_vertices()

void t8_cmesh_set_join_by_vertices ( t8_cmesh_t  cmesh,
const int  ntrees,
const t8_eclass_t eclasses,
const double *  vertices,
int **  connectivity,
const int  do_both_directions 
)

Sets the face connectivity information of an un-committed \cmesh based on a list of tree vertices.

Parameters
[in,out]cmeshPointer to a t8code cmesh object. If set to NULL this argument is ignored.
[in]ntreesNumber of coarse mesh elements resp. trees.
[in]verticesList of per element vertices with dimensions [ntrees,T8_ECLASS_MAX_CORNERS,T8_ECLASS_MAX_DIM].
[in]eclassesList of element classes of length [ntrees].
[in,out]connectivityIf connectivity is not NULL the variable is filled with a pointer to an allocated face connectivity array. The ownership of this array goes to the caller. This argument is mainly used for debugging and testing purposes. The dimension of connectivity are [ntrees,T8_ECLASS_MAX_FACES,3]. For each element and each face the following is stored: neighbor_tree_id, neighbor_dual_face_id, orientation
[in]do_both_directionsCompute the connectivity from both neighboring sides. Takes much longer to compute.
Warning
This routine might be too expensive for very large meshes. In this case, consider to use a fully featured mesh generator.
Note
This routine does not detect periodic boundaries.