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

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.

Typedefs

typedef enum t8_geometry_type t8_geometry_type_t
 This enumeration contains all possible geometries.
 
typedef struct t8_geometry t8_geometry_c
 This typedef holds virtual functions for a particular geometry. More...
 
typedef struct t8_geometry_handler t8_geometry_handler_c
 This typedef holds virtual functions for the geometry handler. More...
 

Enumerations

enum  t8_geometry_type {
  T8_GEOMETRY_TYPE_ZERO = 0 ,
  T8_GEOMETRY_TYPE_LINEAR ,
  T8_GEOMETRY_TYPE_LINEAR_AXIS_ALIGNED ,
  T8_GEOMETRY_TYPE_LAGRANGE ,
  T8_GEOMETRY_TYPE_ANALYTIC ,
  T8_GEOMETRY_TYPE_CAD ,
  T8_GEOMETRY_TYPE_COUNT ,
  T8_GEOMETRY_TYPE_UNDEFINED
}
 This enumeration contains all possible geometries. More...
 

Functions

void t8_geometry_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords)
 Evaluates the geometry of a tree at a given reference point. More...
 
void t8_geometry_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian)
 Evaluates the jacobian of a tree at a given reference point. More...
 
t8_geometry_type_t t8_geometry_get_type (t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
 This function returns the geometry type of a tree. More...
 
int t8_geometry_tree_negative_volume (const t8_cmesh_t cmesh, const t8_gloidx_t gtreeid)
 Check if a tree has a negative volume. More...
 

Detailed Description

Typedef for the t8_geometry class in order to be usable as a pointer from .c files.

Typedef Documentation

◆ t8_geometry_c

typedef struct t8_geometry 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_geometry_handler_c

This typedef holds virtual functions for the geometry handler.

We need it so that we can use t8_geometry_handler_c pointers in .c files without them seeing the actual C++ code (and then not compiling) TODO: Delete this when the cmesh is a proper cpp class.

Enumeration Type Documentation

◆ t8_geometry_type

This enumeration contains all possible geometries.

Enumerator
T8_GEOMETRY_TYPE_ZERO 

The zero geometry maps all points to zero.

T8_GEOMETRY_TYPE_LINEAR 

The linear geometry uses linear interpolations to interpolate between the tree vertices.

T8_GEOMETRY_TYPE_LINEAR_AXIS_ALIGNED 

The linear, axis aligned geometry uses only 2 vertices, since it is axis aligned.

T8_GEOMETRY_TYPE_LAGRANGE 

The Lagrange geometry uses a mapping with Lagrange polynomials to approximate curved elements .

T8_GEOMETRY_TYPE_ANALYTIC 

The analytic geometry uses a user-defined analytic function to map into the physical domain.

T8_GEOMETRY_TYPE_CAD 

The opencascade geometry uses CAD shapes to map trees exactly to the underlying CAD model.

T8_GEOMETRY_TYPE_COUNT 

This is no geometry type but can be used as the number of geometry types.

T8_GEOMETRY_TYPE_UNDEFINED 

This is no geometry type but is used for every geometry, where no type is defined.

Function Documentation

◆ t8_geometry_evaluate()

void t8_geometry_evaluate ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  out_coords 
)

Evaluates the geometry of a tree at a given reference point.

Parameters
[in]cmeshThe cmesh
[in]gtreeidThe global id of the tree
[in]ref_coordsThe reference coordinates at which to evaluate the geometry
[in]num_coordsThe number of reference coordinates
[out]out_coordsThe evaluated coordinates

◆ t8_geometry_get_type()

t8_geometry_type_t t8_geometry_get_type ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid 
)

This function returns the geometry type of a tree.

Parameters
[in]cmeshThe cmesh
[in]gtreeidThe global id of the tree
Returns
The geometry type of the tree with id gtreeid

◆ t8_geometry_jacobian()

void t8_geometry_jacobian ( t8_cmesh_t  cmesh,
t8_gloidx_t  gtreeid,
const double *  ref_coords,
const size_t  num_coords,
double *  jacobian 
)

Evaluates the jacobian of a tree at a given reference point.

Parameters
[in]cmeshThe cmesh
[in]gtreeidThe global id of the tree
[in]ref_coordsThe reference coordinates at which to evaluate the jacobian
[in]num_coordsThe number of reference coordinates
[out]jacobianThe jacobian at the reference coordinates

◆ t8_geometry_tree_negative_volume()

int t8_geometry_tree_negative_volume ( const t8_cmesh_t  cmesh,
const t8_gloidx_t  gtreeid 
)

Check if a tree has a negative volume.

Parameters
[in]cmeshThe cmesh to check
[in]gtreeidThe global id of the tree
Returns
True if the tree with id gtreeid has a negative volume. False otherwise.