p4est  2.8.7
p4est is a software library for parallel adaptive mesh refinement.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
p4est_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 
41 #ifndef P4EST_GEOMETRY_H
42 #define P4EST_GEOMETRY_H
43 
44 #include <p4est_lnodes.h>
45 
46 SC_EXTERN_C_BEGIN;
47 
49 typedef struct p4est_geometry p4est_geometry_t;
50 
63 typedef void (*p4est_geometry_X_t) (p4est_geometry_t * geom,
64  p4est_topidx_t which_tree,
65  const double abc[3],
66  double xyz[3]);
67 
72 typedef void (*p4est_geometry_destroy_t) (p4est_geometry_t * geom);
73 
83  (p4est_geometry_t *geom, p4est_topidx_t which_tree,
84  p4est_qcoord_t coords_in[2], double coords_out[3]);
85 
98 {
99  const char *name;
100  void *user;
105 };
106 
112 
120  conn);
121 
140  p4est_topidx_t which_tree,
141  const double abc[3],
142  double xyz[3]);
143 
150  conn, double R);
151 
160  double R2, double R1);
161 
173  double R0, double R1);
174 
186  double R);
187 
194  double R);
195 
205 typedef enum
206 {
207  FIG32A = 0,
208  FIG32B = 1,
209  FIG32C = 2,
210  FIG32D = 3,
211 }
213 
224  conn, double R,
226  config);
227 
274  (p4est_t * p4est, p4est_lnodes_t * lnodes,
275  const double *refloc, p4est_geometry_t * geom,
276  sc_array_t * coordinates, sc_array_t * element_coordinates);
277 
278 SC_EXTERN_C_END;
279 
280 #endif /* !P4EST_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 p4est_geometry_coordinates_lnodes(p4est_t *p4est, p4est_lnodes_t *lnodes, const double *refloc, p4est_geometry_t *geom, sc_array_t *coordinates, sc_array_t *element_coordinates)
Compute node coordinates for a p4est_lnodes structure.
pillow_disk_config_t
Characterize different mappings of the disk using a 1-tree connectivity.
Definition: p4est_geometry.h:206
p4est_geometry_t * p4est_geometry_new_shell2d(p4est_connectivity_t *conn, double R2, double R1)
Create a geometry for mapping the annulus.
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 tree-local coordinates to physical space.
Definition: p4est_geometry.h:63
void p4est_geometry_connectivity_X(p4est_geometry_t *geom, p4est_topidx_t which_tree, const double abc[3], double xyz[3])
Geometric coordinate transformation for geometry created with p4est_geometry_new_connectivity.
p4est_geometry_t * p4est_geometry_new_sphere2d(p4est_connectivity_t *conn, double R)
Create sphere geometry associated to cubed connectivity.
p4est_geometry_t * p4est_geometry_new_disk2d(p4est_connectivity_t *conn, double R0, double R1)
Create disk2d geometry associated to disk2d connectivity.
p4est_geometry_t * p4est_geometry_new_pillow(p4est_connectivity_t *conn, double R)
Create a geometry for mapping the sphere using 2d connectivity pillow.
void p4est_geometry_transform_coordinates(p4est_geometry_t *geom, p4est_topidx_t which_tree, p4est_qcoord_t coords_in[2], double coords_out[3])
Transform a quadrant reference coordinate into the geometry.
p4est_geometry_t * p4est_geometry_new_pillow_disk(p4est_connectivity_t *conn, double R, pillow_disk_config_t config)
Create a geometry for mapping the disk using 2d connectivity unit.
void(* p4est_geometry_destroy_t)(p4est_geometry_t *geom)
Destructor prototype for a user-allocated p4est_geometry_t.
Definition: p4est_geometry.h:72
void p4est_geometry_destroy(p4est_geometry_t *geom)
Can be used to conveniently destroy a geometry structure.
p4est_geometry_t * p4est_geometry_new_icosahedron(p4est_connectivity_t *conn, double R)
Create a geometry for mapping the sphere using 2d connectivity icosahedron.
p4est_geometry_t * p4est_geometry_new_connectivity(p4est_connectivity_t *conn)
Create a geometry structure based on the vertices in a connectivity.
Generate Lobatto node numbers for any degree.
This structure holds the 2D inter-tree connectivity information.
Definition: p4est_connectivity.h:190
Encapsulates a custom transformation from tree-local coordinates to user defined physical space.
Definition: p4est_geometry.h:98
p4est_geometry_destroy_t destroy
Destructor called by p4est_geometry_destroy.
Definition: p4est_geometry.h:102
p4est_geometry_X_t X
Coordinate transformation.
Definition: p4est_geometry.h:101
const char * name
User's choice is arbitrary.
Definition: p4est_geometry.h:99
void * user
User's choice is arbitrary.
Definition: p4est_geometry.h:100
Store a parallel numbering of Lobatto points of a given degree > 0.
Definition: p4est_lnodes.h:145
The p4est forest datatype.
Definition: p4est.h:150