p4est  1.0
Data Structures | Enumerations | Functions
src/p8est_geometry.c File Reference

We provide some geometry transformations for the builtin connectivities. More...

#include <p8est_geometry.h>
Include dependency graph for p8est_geometry.c:

Data Structures

struct  p8est_geometry_builtin_shell_t
struct  p8est_geometry_builtin_sphere_t
struct  p8est_geometry_builtin_t

Enumerations

enum  p8est_geometry_builtin_type_t { P8EST_GEOMETRY_BUILTIN_MAGIC = 0x65F2F8DF, P8EST_GEOMETRY_BUILTIN_SHELL, P8EST_GEOMETRY_BUILTIN_SPHERE }

Functions

static void p8est_geometry_identity_X (p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
p8est_geometry_t * p8est_geometry_new_identity (void)
 Create a geometry structure for the identity transformation.
static void p8est_geometry_shell_X (p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
p8est_geometry_t * p8est_geometry_new_shell (double R2, double R1)
 Create a geometry structure for the spherical shell of 24 trees.
static void p8est_geometry_sphere_X (p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
p8est_geometry_t * p8est_geometry_new_sphere (double R2, double R1, double R0)
 Create a geometry structure for the solid sphere of 13 trees.

Detailed Description

We provide some geometry transformations for the builtin connectivities.

They are not meant as blueprints for future user code. Please implement p8est_geometry_t as you see fit.


Function Documentation

p8est_geometry_t* p8est_geometry_new_identity ( void  )

Create a geometry structure for the identity transformation.

This function is just for demonstration since a NULL geometry works too.

Returns:
Geometry structure which must be freed with P4EST_FREE.
p8est_geometry_t* p8est_geometry_new_shell ( double  R2,
double  R1 
)

Create a geometry structure for the spherical shell of 24 trees.

This is suitable for forests obtained with p8est_connectivity_new_shell.

Parameters:
[in]R2The outer radius of the shell.
[in]R1The inner radius of the shell.
Returns:
Geometry structure which must be freed with P4EST_FREE.
p8est_geometry_t* p8est_geometry_new_sphere ( double  R2,
double  R1,
double  R0 
)

Create a geometry structure for the solid sphere of 13 trees.

This is suitable for forests obtained with p8est_connectivity_new_sphere.

Parameters:
[in]R2The outer radius of the sphere.
[in]R1The outer radius of the inner shell.
[in]R0The inner radius of the inner shell.
Returns:
Geometry structure which must be freed with P4EST_FREE.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines