t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_cmesh_examples.h
Go to the documentation of this file.
1 /*
2  This file is part of t8code.
3  t8code is a C library to manage a collection (a forest) of multiple
4  connected adaptive space-trees of general element classes in parallel.
5 
6  Copyright (C) 2015 the developers
7 
8  t8code is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  t8code is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with t8code; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
28 #ifndef T8_CMESH_EXAMPLES
29 #define T8_CMESH_EXAMPLES
30 #include <t8_cmesh.h>
31 #include <p4est_connectivity.h>
32 #include <p8est_connectivity.h>
34 
35 T8_EXTERN_C_BEGIN ();
36 
48 t8_cmesh_new_from_p4est (p4est_connectivity_t *conn, sc_MPI_Comm comm, int do_partition);
49 
62 t8_cmesh_new_from_p8est (p8est_connectivity_t *conn, sc_MPI_Comm comm, int do_partition);
63 
72 t8_cmesh_new_empty (sc_MPI_Comm comm, const int do_partition, const int dimension);
73 
81 t8_cmesh_new_from_class (t8_eclass_t eclass, sc_MPI_Comm comm);
82 
96 t8_cmesh_new_hypercube (t8_eclass_t eclass, sc_MPI_Comm comm, int do_bcast, int do_partition, int periodic);
97 
133 t8_cmesh_new_hypercube_pad (const t8_eclass_t eclass, sc_MPI_Comm comm, const double *boundary, t8_locidx_t polygons_x,
134  t8_locidx_t polygons_y, t8_locidx_t polygons_z, const int use_axis_aligned);
135 
144 t8_cmesh_new_hypercube_hybrid (sc_MPI_Comm comm, int do_partition, int periodic);
145 
155 t8_cmesh_new_periodic (sc_MPI_Comm comm, int dim);
156 
162 t8_cmesh_new_periodic_tri (sc_MPI_Comm comm);
163 
169 t8_cmesh_new_periodic_hybrid (sc_MPI_Comm comm);
170 
177 t8_cmesh_new_periodic_line_more_trees (sc_MPI_Comm comm);
178 
187 t8_cmesh_new_bigmesh (t8_eclass_t eclass, int num_trees, sc_MPI_Comm comm);
188 
194 t8_cmesh_new_line_zigzag (sc_MPI_Comm comm);
195 
203 t8_cmesh_new_prism_cake (sc_MPI_Comm comm, int num_of_prisms);
204 
209 t8_cmesh_new_prism_deformed (sc_MPI_Comm comm);
210 
215 t8_cmesh_new_pyramid_deformed (sc_MPI_Comm comm);
216 
222 t8_cmesh_new_prism_cake_funny_oriented (sc_MPI_Comm comm);
223 
229 t8_cmesh_new_prism_geometry (sc_MPI_Comm comm);
230 
250 t8_cmesh_new_disjoint_bricks (t8_gloidx_t num_x, t8_gloidx_t num_y, t8_gloidx_t num_z, int x_periodic, int y_periodic,
251  int z_periodic, sc_MPI_Comm comm);
252 
263 t8_cmesh_new_tet_orientation_test (sc_MPI_Comm comm);
264 
271 t8_cmesh_new_hybrid_gate (sc_MPI_Comm comm);
272 
279 t8_cmesh_new_hybrid_gate_deformed (sc_MPI_Comm comm);
280 
287 t8_cmesh_new_full_hybrid (sc_MPI_Comm comm);
288 
296 t8_cmesh_new_pyramid_cake (sc_MPI_Comm comm, int num_of_pyra);
297 
304 t8_cmesh_new_long_brick_pyramid (sc_MPI_Comm comm, int num_cubes);
305 
314 t8_cmesh_new_row_of_cubes (t8_locidx_t num_trees, const int set_attributes, const int do_partition, sc_MPI_Comm comm);
315 
322 t8_cmesh_new_quadrangulated_disk (const double radius, sc_MPI_Comm comm);
323 
330 t8_cmesh_new_triangulated_spherical_surface_octahedron (const double radius, sc_MPI_Comm comm);
331 
338 t8_cmesh_new_triangulated_spherical_surface_icosahedron (const double radius, sc_MPI_Comm comm);
339 
346 t8_cmesh_new_quadrangulated_spherical_surface (const double radius, sc_MPI_Comm comm);
347 
357 t8_cmesh_new_prismed_spherical_shell_octahedron (const double inner_radius, const double shell_thickness,
358  const int num_levels, const int num_layers, sc_MPI_Comm comm);
359 
369 t8_cmesh_new_prismed_spherical_shell_icosahedron (const double inner_radius, const double shell_thickness,
370  const int num_levels, const int num_layers, sc_MPI_Comm comm);
371 
382 t8_cmesh_new_cubed_spherical_shell (const double inner_radius, const double shell_thickness, const int num_levels,
383  const int num_layers, sc_MPI_Comm comm);
384 
391 t8_cmesh_new_cubed_sphere (const double radius, sc_MPI_Comm comm);
392 
393 T8_EXTERN_C_END ();
394 
395 #endif /* !T8_CMESH_EXAMPLES */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
int32_t t8_locidx_t
A type for processor-local indexing.
Definition: t8.h:89
We define the coarse mesh of trees in this file.
t8_cmesh_t t8_cmesh_new_line_zigzag(sc_MPI_Comm comm)
Construct a forest of three connected askew lines.
Definition: t8_cmesh_examples.cxx:1654
t8_cmesh_t t8_cmesh_new_prism_cake_funny_oriented(sc_MPI_Comm comm)
Construct a forest of six connected noncannoical oriented prisms.
Definition: t8_cmesh_examples.cxx:1796
t8_cmesh_t t8_cmesh_new_prism_cake(sc_MPI_Comm comm, int num_of_prisms)
Construct a forest of num_of_prisms connected prism, all with one edge in 0, except for num_of_prisms...
Definition: t8_cmesh_examples.cxx:1691
t8_cmesh_t t8_cmesh_new_from_p4est(p4est_connectivity_t *conn, sc_MPI_Comm comm, int do_partition)
Constructs a cmesh from a given p4est_connectivity structure.
Definition: t8_cmesh_examples.cxx:195
t8_cmesh_t t8_cmesh_new_periodic_hybrid(sc_MPI_Comm comm)
Construct a unit square of two quads and four triangles that is periodic in x and y.
Definition: t8_cmesh_examples.cxx:1501
t8_cmesh_t t8_cmesh_new_triangulated_spherical_surface_octahedron(const double radius, sc_MPI_Comm comm)
Construct a triangulated spherical surface of given radius: octahedron version.
Definition: t8_cmesh_examples.cxx:2799
t8_cmesh_t t8_cmesh_new_empty(sc_MPI_Comm comm, const int do_partition, const int dimension)
Construct a cmesh that has no trees.
Definition: t8_cmesh_examples.cxx:437
t8_cmesh_t t8_cmesh_new_from_p8est(p8est_connectivity_t *conn, sc_MPI_Comm comm, int do_partition)
Constructs a cmesh from a given p8est_connectivity structure.
Definition: t8_cmesh_examples.cxx:201
t8_cmesh_t t8_cmesh_new_periodic_line_more_trees(sc_MPI_Comm comm)
Construct a unit interval coarse mesh that consists of 3 trees and is periodic.
Definition: t8_cmesh_examples.cxx:1440
t8_cmesh_t t8_cmesh_new_prismed_spherical_shell_icosahedron(const double inner_radius, const double shell_thickness, const int num_levels, const int num_layers, sc_MPI_Comm comm)
Construct a spherical shell discretized by prisms of given inner radius and thickness: icosahedron ve...
Definition: t8_cmesh_examples.cxx:3187
t8_cmesh_t t8_cmesh_new_periodic_tri(sc_MPI_Comm comm)
Construct a unit square of two triangles that is periodic in x and y.
Definition: t8_cmesh_examples.cxx:1470
t8_cmesh_t t8_cmesh_new_long_brick_pyramid(sc_MPI_Comm comm, int num_cubes)
Construct a bigger mesh, consisting of many cubes made by pyramids.
Definition: t8_cmesh_examples.cxx:2566
t8_cmesh_t t8_cmesh_new_prism_geometry(sc_MPI_Comm comm)
Construct a forest of six connected noncannoical oriented prisms.
Definition: t8_cmesh_examples.cxx:1858
t8_cmesh_t t8_cmesh_new_full_hybrid(sc_MPI_Comm comm)
Construct a full hybrig cmesh, with 1 hex, 1 pyra, 1 prism and 1 tet This cmesh is used for testing a...
Definition: t8_cmesh_examples.cxx:2406
t8_cmesh_t t8_cmesh_new_row_of_cubes(t8_locidx_t num_trees, const int set_attributes, const int do_partition, sc_MPI_Comm comm)
Construct num_trees many cubes each of length 1 connected along the x-axis without any additional att...
Definition: t8_cmesh_examples.cxx:2648
t8_cmesh_t t8_cmesh_new_hybrid_gate(sc_MPI_Comm comm)
Construct a hybrid cmesh with 2 tets, 2 prism, 1 hex.
Definition: t8_cmesh_examples.cxx:2126
t8_cmesh_t t8_cmesh_new_hypercube(t8_eclass_t eclass, sc_MPI_Comm comm, int do_bcast, int do_partition, int periodic)
Construct a hypercube forest from one primitive tree class.
Definition: t8_cmesh_examples.cxx:659
t8_cmesh_t t8_cmesh_new_cubed_sphere(const double radius, sc_MPI_Comm comm)
Construct a cubed sphere of given radius.
Definition: t8_cmesh_examples.cxx:3214
t8_cmesh_t t8_cmesh_new_pyramid_deformed(sc_MPI_Comm comm)
Construct a single deformed pyramid.
Definition: t8_cmesh_examples.cxx:333
t8_cmesh_t t8_cmesh_new_prism_deformed(sc_MPI_Comm comm)
Construct a single deformed prism.
Definition: t8_cmesh_examples.cxx:1744
t8_cmesh_t t8_cmesh_new_hypercube_hybrid(sc_MPI_Comm comm, int do_partition, int periodic)
Hybercube with 6 Tets, 6 Prism, 4 Hex.
Definition: t8_cmesh_examples.cxx:449
t8_cmesh_t t8_cmesh_new_quadrangulated_disk(const double radius, sc_MPI_Comm comm)
Construct a quadrangulated disk of given radius.
Definition: t8_cmesh_examples.cxx:2706
t8_cmesh_t t8_cmesh_new_cubed_spherical_shell(const double inner_radius, const double shell_thickness, const int num_levels, const int num_layers, sc_MPI_Comm comm)
Construct a cubed spherical shell of given inner radius and thickness.
Definition: t8_cmesh_examples.cxx:3205
t8_cmesh_t t8_cmesh_new_triangulated_spherical_surface_icosahedron(const double radius, sc_MPI_Comm comm)
Construct a triangulated spherical surface of given radius: icosahedron version.
Definition: t8_cmesh_examples.cxx:2865
t8_cmesh_t t8_cmesh_new_hybrid_gate_deformed(sc_MPI_Comm comm)
Construct a hybrid cmesh with 2 tets, 2 prism, 1 hex and all are deformed.
Definition: t8_cmesh_examples.cxx:2250
t8_cmesh_t t8_cmesh_new_disjoint_bricks(t8_gloidx_t num_x, t8_gloidx_t num_y, t8_gloidx_t num_z, int x_periodic, int y_periodic, int z_periodic, sc_MPI_Comm comm)
Create a partitioned cmesh of quads whose local trees are given by an num_x by num_y brick connectivi...
Definition: t8_cmesh_examples.cxx:1974
t8_cmesh_t t8_cmesh_new_bigmesh(t8_eclass_t eclass, int num_trees, sc_MPI_Comm comm)
Construct a mesh consisting of a given number of same type trees.
Definition: t8_cmesh_examples.cxx:1632
t8_cmesh_t t8_cmesh_new_tet_orientation_test(sc_MPI_Comm comm)
Construct a tetrahedral cmesh that has all possible face to face connections and orientations.
Definition: t8_cmesh_examples.cxx:2038
t8_cmesh_t t8_cmesh_new_from_class(t8_eclass_t eclass, sc_MPI_Comm comm)
Constructs a cmesh that consists only of one tree of a given element class.
Definition: t8_cmesh_examples.cxx:403
t8_cmesh_t t8_cmesh_new_quadrangulated_spherical_surface(const double radius, sc_MPI_Comm comm)
Construct a quadrangulated spherical surface of given radius.
Definition: t8_cmesh_examples.cxx:3001
t8_cmesh_t t8_cmesh_new_prismed_spherical_shell_octahedron(const double inner_radius, const double shell_thickness, const int num_levels, const int num_layers, sc_MPI_Comm comm)
Construct a spherical shell discretized by prisms of given inner radius and thickness: octahedron ver...
Definition: t8_cmesh_examples.cxx:3196
t8_cmesh_t t8_cmesh_new_pyramid_cake(sc_MPI_Comm comm, int num_of_pyra)
Construct a mesh out of num_of_pyra many pyramids.
Definition: t8_cmesh_examples.cxx:2519
t8_cmesh_t t8_cmesh_new_periodic(sc_MPI_Comm comm, int dim)
Construct a unit interval/square/cube coarse mesh that is periodic in each direction.
Definition: t8_cmesh_examples.cxx:1582
Internal functions that we need for the cmesh geometry.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.