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

This header provides the C interface to create an analytical geometry. More...

Go to the source code of this file.

Typedefs

typedef void(* t8_geom_analytic_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords, const void *tree_data, const void *user_data)
 Definition of an analytic geometry function. More...
 
typedef void(* t8_geom_analytic_jacobian_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian, const void *tree_data, const void *user_data)
 Definition for the jacobian of an analytic geometry function. More...
 
typedef void(* t8_geom_load_tree_data_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const void **tree_data)
 Definition for the load tree data function. More...
 
typedef int(* t8_geom_tree_negative_volume_fn) ()
 Definition for the negative volume function.
 

Functions

void t8_geometry_analytic_destroy (t8_geometry_c **geom)
 Destroy a geometry analytic object. More...
 
t8_geometry_ct8_geometry_analytic_new (int dim, const char *name, t8_geom_analytic_fn analytical, t8_geom_analytic_jacobian_fn jacobian, t8_geom_load_tree_data_fn load_tree_data, t8_geom_tree_negative_volume_fn tree_negative_volume, const void *user_data)
 Create a new analytical geometry. More...
 
void t8_geom_load_tree_data_vertices (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const void **user_data)
 Load vertex data from given tree. More...
 

Detailed Description

This header provides the C interface to create an analytical geometry.

Typedef Documentation

◆ t8_geom_analytic_fn

typedef void(* t8_geom_analytic_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords, const void *tree_data, const void *user_data)

Definition of an analytic geometry function.

This function maps reference coordinates to physical coordinates.

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree (of the cmesh) in which the reference point is.
[in]ref_coordsArray of dimension x num_coords many entries, specifying a point in \( [0,1]^\mathrm{dim} \).
[in]num_coords
[out]out_coordsThe mapped coordinates in physical space of ref_coords. The length is num_coords * 3.
[in]tree_dataThe data of the current tree as loaded by a t8_geom_load_tree_data_fn.
[in]user_dataThe user data pointer stored in the geometry.

◆ t8_geom_analytic_jacobian_fn

typedef void(* t8_geom_analytic_jacobian_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian, const void *tree_data, const void *user_data)

Definition for the jacobian of an analytic geometry function.

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree (of the cmesh) in which the reference point is.
[in]ref_coordsArray of dimension x num_coords many entries, specifying points in \( [0,1]^\mathrm{dim} \).
[in]num_coordsAmount of points of /f$ \mathrm{dim} /f$ to map.
[out]jacobianThe jacobian at ref_coords. Array of size \( \mathrm{dim} \cdot 3 \) x num_coords. Indices \( 3 \cdot i\) , \( 3 \cdot i+1 \) , \( 3 \cdot i+2 \) correspond to the \( i \)-th column of the jacobian (Entry \( 3 \cdot i + j \) is \( \frac{\partial f_j}{\partial x_i} \)).
[in]tree_dataThe data of the current tree as loaded by a t8_geom_load_tree_data_fn.
[in]user_dataThe user data pointer stored in the geometry.

◆ t8_geom_load_tree_data_fn

typedef void(* t8_geom_load_tree_data_fn) (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const void **tree_data)

Definition for the load tree data function.

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree (of the cmesh) in which the reference point is.
[in]tree_dataThe data of the trees.

Function Documentation

◆ t8_geom_load_tree_data_vertices()

void t8_geom_load_tree_data_vertices ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const void **  user_data 
)

Load vertex data from given tree.

Parameters
[in]cmeshThe cmesh.
[in]gtreeidThe global tree id (in the cmesh).
[out]vertex_outThe load tree vertices.

◆ t8_geometry_analytic_destroy()

void t8_geometry_analytic_destroy ( t8_geometry_c **  geom)

Destroy a geometry analytic object.

Parameters
[in,out]geomA pointer to a geometry object. Set to NULL on output.

◆ t8_geometry_analytic_new()

t8_geometry_c* t8_geometry_analytic_new ( int  dim,
const char *  name,
t8_geom_analytic_fn  analytical,
t8_geom_analytic_jacobian_fn  jacobian,
t8_geom_load_tree_data_fn  load_tree_data,
t8_geom_tree_negative_volume_fn  tree_negative_volume,
const void *  user_data 
)

Create a new analytical geometry.

Returns
A pointer to an allocated geometry struct.