t8  1.2.0
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>
33 
34 T8_EXTERN_C_BEGIN ();
35 
46 t8_cmesh_t t8_cmesh_new_from_p4est (p4est_connectivity_t * conn,
47  sc_MPI_Comm comm,
48  int do_partition);
49 
61 t8_cmesh_t t8_cmesh_new_from_p8est (p8est_connectivity_t * conn,
62  sc_MPI_Comm comm,
63  int do_partition);
64 
65 /* TODO: it could possibly be a problem that we do not set the dimension of
66  * the cmesh. This could i.e. be difficult when we combine an empty cmesh with
67  * a non-empty one. */
75 t8_cmesh_t t8_cmesh_new_empty (sc_MPI_Comm comm, int do_partition,
76  int dimension);
77 
85  sc_MPI_Comm comm);
86 
100  sc_MPI_Comm comm,
101  int do_bcast, int do_partition,
102  int periodic);
103 
112 t8_cmesh_t t8_cmesh_new_hypercube_hybrid (sc_MPI_Comm comm,
113  int do_partition,
114  int periodic);
115 
124 t8_cmesh_t t8_cmesh_new_periodic (sc_MPI_Comm comm, int dim);
125 
130 t8_cmesh_t t8_cmesh_new_periodic_tri (sc_MPI_Comm comm);
131 
136 t8_cmesh_t t8_cmesh_new_periodic_hybrid (sc_MPI_Comm comm);
137 
144 
152 t8_cmesh_t t8_cmesh_new_bigmesh (t8_eclass_t eclass, int num_trees,
153  sc_MPI_Comm comm);
154 
159 t8_cmesh_t t8_cmesh_new_line_zigzag (sc_MPI_Comm comm);
160 
167 t8_cmesh_t t8_cmesh_new_prism_cake (sc_MPI_Comm comm,
168  int num_of_prisms);
169 
173 t8_cmesh_t t8_cmesh_new_prism_deformed (sc_MPI_Comm comm);
174 
179 
185 
190 t8_cmesh_t t8_cmesh_new_prism_geometry (sc_MPI_Comm comm);
191 
211  t8_gloidx_t num_y,
212  t8_gloidx_t num_z,
213  int x_periodic,
214  int y_periodic,
215  int z_periodic,
216  sc_MPI_Comm comm);
217 
228 
234 t8_cmesh_t t8_cmesh_new_hybrid_gate (sc_MPI_Comm comm);
235 
242 
248 t8_cmesh_t t8_cmesh_new_full_hybrid (sc_MPI_Comm comm);
249 
257  int num_of_pyra);
258 
265  int num_cubes);
266 
275  const int set_attributes,
276  sc_MPI_Comm comm);
277 
278 T8_EXTERN_C_END ();
279 
280 #endif /* !T8_CMESH_EXAMPLES */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:83
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:105
int32_t t8_locidx_t
A type for processor-local indexing.
Definition: t8.h:94
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.c:1056
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.c:1195
t8_cmesh_t t8_cmesh_new_empty(sc_MPI_Comm comm, int do_partition, int dimension)
Construct a cmesh that has no trees.
Definition: t8_cmesh_examples.c:366
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.c:1089
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.c:153
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.c:908
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.c:160
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.c:850
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.c:879
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.
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.c:1257
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.c:1814
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.c:1532
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.c:613
t8_cmesh_t t8_cmesh_new_pyramid_deformed(sc_MPI_Comm comm)
Construct a single deformed pyramid.
t8_cmesh_t t8_cmesh_new_prism_deformed(sc_MPI_Comm comm)
Construct a single deformed prism.
Definition: t8_cmesh_examples.c:1145
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.c:378
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.c:1657
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 partitoned cmesh of quads whose local trees are given by an num_x by num_y brick connectivit...
Definition: t8_cmesh_examples.c:1374
t8_cmesh_t t8_cmesh_new_row_of_cubes(t8_locidx_t num_trees, const int set_attributes, 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.c:1929
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.c:1035
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.c:1441
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.c:332
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.
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.c:987
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.