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

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

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

Go to the source code of this file.

Data Structures

struct  p4est_geometry
 This structure can be filled or allocated by the user. More...
 

Typedefs

typedef struct p4est_geometry p4est_geometry_t
 This object encapsulates a custom geometry transformation.
 
typedef void(* p4est_geometry_X_t) (p4est_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(* p4est_geometry_destroy_t) (p4est_geometry_t *geom)
 Destructor prototype for a user-allocated p4est_geometry_t. More...
 

Functions

void p4est_geometry_destroy (p4est_geometry_t *geom)
 Can be used to conveniently destroy a geometry structure. More...
 
p4est_geometry_tp4est_geometry_new_connectivity (p4est_connectivity_t *conn)
 Create a geometry structure based on the vertices in a connectivity. More...
 
p4est_geometry_tp4est_geometry_new_icosahedron (p4est_connectivity_t *conn, double R)
 Create a geometry for mapping the 3d sphere using 2d connectivity icosahedron.
 
p4est_geometry_tp4est_geometry_new_shell2d (p4est_connectivity_t *conn, double R2, double R1)
 Create a geometry for mapping 2d shell. More...
 
p4est_geometry_tp4est_geometry_new_disk2d (p4est_connectivity_t *conn, double R0, double R1)
 disk2d geometry associated to disk2d connectivity. More...
 

Detailed Description

transforms from vertex frame to physical space.

Typedef Documentation

◆ p4est_geometry_destroy_t

typedef void(* p4est_geometry_destroy_t) (p4est_geometry_t *geom)

Destructor prototype for a user-allocated p4est_geometry_t.

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

◆ p4est_geometry_X_t

typedef void(* p4est_geometry_X_t) (p4est_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.

Note that the two-dimensional connectivities have 3D vertex coordinates that can be used in the transformation if so desired. The physical space "xyz" is user-defined, currently used for VTK output.

Function Documentation

◆ p4est_geometry_destroy()

void p4est_geometry_destroy ( p4est_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 p4est_geometry_t in their own way.

Examples
simple/simple2.c.

◆ p4est_geometry_new_connectivity()

p4est_geometry_t * p4est_geometry_new_connectivity ( p4est_connectivity_t conn)

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

The transformation is constructed using bilinear interpolation.

Parameters
[in]connA p4est_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.

◆ p4est_geometry_new_disk2d()

p4est_geometry_t * p4est_geometry_new_disk2d ( p4est_connectivity_t conn,
double  R0,
double  R1 
)

disk2d geometry associated to disk2d connectivity.

Parameters
[in]connThe result of p4est_connectivity_new_disk2d.
[in]R0radius of the inner circle.
[in]R1radius of the outer circle (external border).

This geometry is meant to be used with the disk2d connectivity, which is a 5-tree connectivity to map the spherical disk.

Examples
simple/simple2.c.

◆ p4est_geometry_new_shell2d()

p4est_geometry_t * p4est_geometry_new_shell2d ( p4est_connectivity_t conn,
double  R2,
double  R1 
)

Create a geometry for mapping 2d shell.

This a direct adaptation of geometric shell in 3d.

Examples
simple/simple2.c.