Typedef for the t8_geometry class in order to be usable as a pointer from .c files.
More...
#include <t8.h>
#include <t8_refcount.h>
#include <t8_cmesh.h>
Go to the source code of this file.
|
void | t8_geom_handler_init (t8_geometry_handler_t **pgeom_handler) |
| Initialize a geometry handler. More...
|
|
void | t8_geom_handler_ref (t8_geometry_handler_t *geom_handler) |
| Increase the reference counter of a geometry handler. More...
|
|
void | t8_geom_handler_unref (t8_geometry_handler_t **pgeom_handler) |
| Decrease the reference count of a geometry handler, if the refcount reaches 0, the handler will get destroyed. More...
|
|
void | t8_geom_handler_destroy (t8_geometry_handler_t **pgeom_handler) |
| Destroy a geometry handler and free its memory. More...
|
|
void | t8_geom_handler_register_geometry (t8_geometry_handler_t *geom_handler, const t8_geometry_c *geometry) |
| Add a geometry to the geometry handler. More...
|
|
void | t8_geom_handler_commit (t8_geometry_handler_t *geom_handler) |
| Commit a geometry handler. More...
|
|
int | t8_geom_handler_is_committed (const t8_geometry_handler_t *geom_handler) |
|
size_t | t8_geom_handler_get_num_geometries (const t8_geometry_handler_t *geom_handler) |
| Return the number of registered geometries. More...
|
|
const t8_geometry_c * | t8_geom_handler_get_unique_geometry (const t8_geometry_handler_t *geom_handler) |
| If a geometry handler only has one registered geometry, get a pointer to this geometry. More...
|
|
t8_geometry_c * | t8_geom_handler_find_geometry (const t8_geometry_handler_t *geom_handler, const char *name) |
| Given a geometry's name find that geometry in the geometry handler and return it. More...
|
|
void | t8_geometry_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, double *out_coords) |
|
void | t8_geometry_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, double *jacobian) |
|
Typedef for the t8_geometry class in order to be usable as a pointer from .c files.
◆ t8_geometry_c
This typedef holds virtual functions for a particular geometry.
We need it so that we can use t8_geometry_c pointers in .c files without them seeing the actual C++ code (and then not compiling)
◆ t8_geom_handler_commit()
Commit a geometry handler.
This specifies that no geometries will be added to it and makes it ready to be used.
- Parameters
-
[in,out] | geom_handler | An initialized but not committed geometry handler. |
◆ t8_geom_handler_destroy()
Destroy a geometry handler and free its memory.
This is only valid if its reference count is 1. If you are unsure, call t8_geom_handler_unref instead.
- Parameters
-
[in,out] | pgeom_handler | Pointer to an initialized geometry handler. Will point to NULL afterwards. |
◆ t8_geom_handler_find_geometry()
Given a geometry's name find that geometry in the geometry handler and return it.
- Parameters
-
[in] | geom_handler | A committed geometry handler. |
[in] | name | The name of a geometry. |
- Returns
- A pointer to the geomery or NULL if it was not found.
◆ t8_geom_handler_get_num_geometries()
Return the number of registered geometries.
- Parameters
-
[in] | geom_handler | A geometry handler (must be initialized and may or may not be committed). |
- Returns
- The number of registered geometries in geom_handler.
◆ t8_geom_handler_get_unique_geometry()
If a geometry handler only has one registered geometry, get a pointer to this geometry.
- Parameters
-
[in] | geom_handler | Must be committed and have exactly one geometry registered. |
- Returns
- The only registered geometry of geom_handler.
- Note
- Most cmeshes will have only one geometry and this function is an optimization for that special case. It is used for example in t8_cmesh_get_tree_geometry.
◆ t8_geom_handler_init()
Initialize a geometry handler.
This will allocate memory.
- Parameters
-
[in,out] | pgeom_handler | On input a pointer to unallocated memory. On output this will point to an initialized geometry handler. |
◆ t8_geom_handler_ref()
Increase the reference counter of a geometry handler.
- Parameters
-
[in] | geom_handler | An initialized geometry handler. |
◆ t8_geom_handler_register_geometry()
Add a geometry to the geometry handler.
- Parameters
-
[in,out] | geom_handler | An initialized but not committed geometry handler. |
[in] | geometry | The geometry to add. |
◆ t8_geom_handler_unref()
Decrease the reference count of a geometry handler, if the refcount reaches 0, the handler will get destroyed.
- Parameters
-
[in,out] | pgeom_handler | Pointer to an initialized geometry handler. If the refcount reaches 0, will point to NULL afterwards. |