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

TODO: document this file. More...

#include <t8_cmesh.h>
#include <t8_cmesh/t8_cmesh_types.h>
#include <t8_cmesh/t8_cmesh_geometry.h>
#include <t8_geometry/t8_geometry.h>
#include <t8_geometry/t8_geometry_base.hxx>
#include <t8_geometry/t8_geometry_handler.hxx>

Functions

void t8_cmesh_register_geometry (t8_cmesh_t cmesh, t8_geometry_c **geometry)
 Register a geometry in the cmesh. More...
 
void t8_cmesh_set_tree_geometry (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const t8_geometry_c *geom)
 Set the geometry for a tree, thus specify which geometry to use for this tree. More...
 
const t8_geometry_ct8_cmesh_get_tree_geometry (t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
 Get the geometry of a tree. More...
 
size_t t8_cmesh_get_tree_geom_hash (t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
 Get the hash of the geometry stored for a tree in a cmesh. More...
 

Detailed Description

TODO: document this file.

Function Documentation

◆ t8_cmesh_get_tree_geom_hash()

size_t t8_cmesh_get_tree_geom_hash ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid 
)

Get the hash of the geometry stored for a tree in a cmesh.

Parameters
[in]cmeshA committed cmesh.
[in]gtreeidA global tree in cmesh.
Returns
The hash of the tree's geometry or if only one geometry exists, its hash.

◆ t8_cmesh_get_tree_geometry()

const t8_geometry_c* t8_cmesh_get_tree_geometry ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid 
)

Get the geometry of a tree.

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree id of the tree for which the geometry should be returned.
Returns
The geometry of the tree.

◆ t8_cmesh_register_geometry()

void t8_cmesh_register_geometry ( t8_cmesh_t  cmesh,
t8_geometry_c **  geometry 
)

Register a geometry in the cmesh.

The cmesh takes ownership of the geometry.

Parameters
[in,out]cmeshThe cmesh.
[in]geometryThe geometry to register.

If no geometry is registered and cmesh is modified from another cmesh then the other cmesh's geometries are used.

Note
If you need to use t8_cmesh_bcast, then all geometries must be registered after the bcast operation, not before.

◆ t8_cmesh_set_tree_geometry()

void t8_cmesh_set_tree_geometry ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const t8_geometry_c geom 
)

Set the geometry for a tree, thus specify which geometry to use for this tree.

Parameters
[in]cmeshA non-committed cmesh.
[in]gtreeidA global tree id in cmesh.
[in]geomThe geometry to use for this tree. See also t8_cmesh_get_tree_geometry