p4est 2.8.5.190-3fcf-dirty
p4est is a software library for parallel adaptive mesh refinement.
Data Structures | Typedefs | Functions
p8est_geometry.h File Reference

transforms from vertex frame to physical space. More...

#include <p8est_connectivity.h>
Include dependency graph for p8est_geometry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  p8est_geometry
 This structure can be created by the user, p4est will never change its contents. More...
 

Typedefs

typedef struct p8est_geometry p8est_geometry_t
 This object encapsulates a custom geometry transformation.
 
typedef void(* p8est_geometry_X_t) (p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
 Forward transformation from the reference unit square to physical space. More...
 
typedef void(* p8est_geometry_destroy_t) (p8est_geometry_t *geom)
 Destructor prototype for a user-allocated p8est_geometry_t. More...
 

Functions

void p8est_geometry_destroy (p8est_geometry_t *geom)
 Can be used to conveniently destroy a geometry structure. More...
 
p8est_geometry_tp8est_geometry_new_connectivity (p8est_connectivity_t *conn)
 Create a geometry structure based on the vertices in a connectivity. More...
 
p8est_geometry_tp8est_geometry_new_shell (p8est_connectivity_t *conn, double R2, double R1)
 Create a geometry structure for the spherical shell of 24 trees. More...
 
p8est_geometry_tp8est_geometry_new_sphere (p8est_connectivity_t *conn, double R2, double R1, double R0)
 Create a geometry structure for the solid sphere of 13 trees. More...
 
p8est_geometry_tp8est_geometry_new_torus (p8est_connectivity_t *conn, double R0, double R1, double R2)
 Create a geometry structure for the torus. More...
 

Detailed Description

transforms from vertex frame to physical space.

Typedef Documentation

◆ p8est_geometry_destroy_t

typedef void(* p8est_geometry_destroy_t) (p8est_geometry_t *geom)

Destructor prototype for a user-allocated p8est_geometry_t.

It is invoked by p8est_geometry_destroy. If the user chooses to reserve the structure statically, simply don't call p4est_geometry_destroy.

◆ p8est_geometry_X_t

typedef void(* p8est_geometry_X_t) (p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])

Forward transformation from the reference unit square to physical space.

The physical space "xyz" is user-defined, currently used for VTK output.

Function Documentation

◆ p8est_geometry_destroy()

void p8est_geometry_destroy ( p8est_geometry_t geom)

Can be used to conveniently destroy a geometry structure.

The user is free not to call this function at all if they handle the memory of the p8est_geometry_t in their own way.

◆ p8est_geometry_new_connectivity()

p8est_geometry_t * p8est_geometry_new_connectivity ( p8est_connectivity_t conn)

Create a geometry structure based on the vertices in a connectivity.

The transformation is constructed using trilinear interpolation.

Parameters
[in]connA p8est_connectivity_t with valid vertices. We do NOT take ownership and expect this structure to stay alive.
Returns
Geometry structure; use with p4est_geometry_destroy.

◆ p8est_geometry_new_shell()

p8est_geometry_t * p8est_geometry_new_shell ( p8est_connectivity_t conn,
double  R2,
double  R1 
)

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

Parameters
[in]connResult of p8est_connectivity_new_shell or equivalent. We do NOT take ownership and expect it to stay alive.
[in]R2The outer radius of the shell.
[in]R1The inner radius of the shell.
Returns
Geometry structure; use with p4est_geometry_destroy.

◆ p8est_geometry_new_sphere()

p8est_geometry_t * p8est_geometry_new_sphere ( p8est_connectivity_t conn,
double  R2,
double  R1,
double  R0 
)

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

Parameters
[in]connResult of p8est_connectivity_new_sphere or equivalent. We do NOT take ownership and expect it to stay alive.
[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; use with p4est_geometry_destroy.

◆ p8est_geometry_new_torus()

p8est_geometry_t * p8est_geometry_new_torus ( p8est_connectivity_t conn,
double  R0,
double  R1,
double  R2 
)

Create a geometry structure for the torus.

This geometry maps a revolution torus, obtained using p8est_connectivity_new_torus

The torus is divided into into segments around the revolution axis, each segments is made of 5 trees; so here we provided the geometric transformation in a piecewise manner for each tree of the connectivity.

Parameters
[in]connResult of p8est_connectivity_new_torus or equivalent. We do NOT take ownership and expect it to stay alive.
[in]R0The inner radius of the 2d disk slice.
[in]R1The outer radius of the 2d disk slice.
[in]R2The outer radius of the torus.
Returns
Geometry structure; use with p4est_geometry_destroy.