p4est 2.8.8
p4est is a software library for parallel adaptive mesh refinement.
Loading...
Searching...
No Matches
p8est_geometry.h
Go to the documentation of this file.
1/*
2 This file is part of p4est.
3 p4est is a C library to manage a collection (a forest) of multiple
4 connected adaptive quadtrees or octrees in parallel.
5
6 Copyright (C) 2010 The University of Texas System
7 Additional copyright (C) 2011 individual authors
8 Written by Carsten Burstedde, Lucas C. Wilcox, and Tobin Isaac
9
10 p4est is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 p4est is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with p4est; if not, write to the Free Software Foundation, Inc.,
22 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23*/
24
38#ifndef P8EST_GEOMETRY_H
39#define P8EST_GEOMETRY_H
40
41#include <p8est_lnodes.h>
42
43SC_EXTERN_C_BEGIN;
44
47
60typedef void (*p8est_geometry_X_t) (p8est_geometry_t * geom,
61 p4est_topidx_t which_tree,
62 const double abc[3],
63 double xyz[3]);
64
70
80 (p8est_geometry_t *geom, p4est_topidx_t which_tree,
81 p4est_qcoord_t coords_in[3], double coords_out[3]);
82
103
110
118 conn);
119
137 p4est_topidx_t which_tree,
138 const double abc[3],
139 double xyz[3]);
140
153 double R2, double R1);
154
164typedef enum
165{
166 FIG52B = 0,
167 FIG52C = 1
168}
170
181 conn, double R,
183 config);
184
193 double R2, double R1);
194
204 double R2, double R1,
205 double R0);
206
226 double R0, double R1,
227 double R2);
228
276 (p8est_t * p8est, p8est_lnodes_t * lnodes,
277 const double *refloc, p8est_geometry_t * geom,
278 sc_array_t * coordinates, sc_array_t * element_coordinates);
279
280SC_EXTERN_C_END;
281
282#endif /* !P8EST_GEOMETRY_H */
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition p4est_base.h:81
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition p4est_base.h:93
void p8est_geometry_destroy(p8est_geometry_t *geom)
Can be used to conveniently destroy a geometry structure.
void p8est_geometry_coordinates_lnodes(p8est_t *p8est, p8est_lnodes_t *lnodes, const double *refloc, p8est_geometry_t *geom, sc_array_t *coordinates, sc_array_t *element_coordinates)
Compute node coordinates for a p8est_lnodes structure.
void(* p8est_geometry_destroy_t)(p8est_geometry_t *geom)
Destructor prototype for a user-allocated geometry.
Definition p8est_geometry.h:69
void p8est_geometry_transform_coordinates(p8est_geometry_t *geom, p4est_topidx_t which_tree, p4est_qcoord_t coords_in[3], double coords_out[3])
Transform a quadrant reference coordinate into the geometry.
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.
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 tree-local coordinates to physical space.
Definition p8est_geometry.h:60
p8est_geometry_t * p8est_geometry_new_pillow_sphere(p8est_connectivity_t *conn, double R, pillow_sphere_config_t config)
Create a geometry for mapping the solid sphere using the 1-tree unit connectivity.
p8est_geometry_t * p8est_geometry_new_pillow(p8est_connectivity_t *conn, double R2, double R1)
Create a geometry structure for the spherical shell of 2 trees.
p8est_geometry_t * p8est_geometry_new_torus(p8est_connectivity_t *conn, double R0, double R1, double R2)
Create a geometry structure for the torus.
void p8est_geometry_connectivity_X(p8est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
Geometric coordinate transformation using a connectivity.
p8est_geometry_t * p8est_geometry_new_connectivity(p8est_connectivity_t *conn)
Create a geometry structure based on the vertices in a connectivity.
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.
pillow_sphere_config_t
Characterize different mappings of the solid sphere using a 1-tree connectivity.
Definition p8est_geometry.h:165
Generate Lobatto node numbers for any degree.
This structure holds the 3D inter-tree connectivity information.
Definition p8est_connectivity.h:216
Encapsulates a custom transformation from tree-local coordinates to user defined physical space.
Definition p8est_geometry.h:95
const char * name
User's choice is arbitrary.
Definition p8est_geometry.h:96
p8est_geometry_destroy_t destroy
Destructor called by p8est_geometry_destroy.
Definition p8est_geometry.h:99
p8est_geometry_X_t X
Coordinate transformation.
Definition p8est_geometry.h:98
void * user
User's choice is arbitrary.
Definition p8est_geometry.h:97
Store a parallel numbering of Lobatto points of a given degree > 0.
Definition p8est_lnodes.h:127
The p8est forest datatype.
Definition p8est.h:146