t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_geometry_examples.hxx
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) 2023 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 
27 #ifndef T8_GEOMETRY_EXAMPLES_HXX
28 #define T8_GEOMETRY_EXAMPLES_HXX
29 
30 #include <t8.h>
32 
36 {
37  public:
38  /* Basic constructor that sets the dimension and the name. */
39  t8_geometry_quadrangulated_disk (): t8_geometry_with_vertices (2, "t8_quadrangulated_disk_")
40  {
41  }
42 
65  void
66  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
67  double *out_coords) const;
68 
69  /* Jacobian, not implemented. */
70  void
71  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
72  double *jacobian) const
73  {
74  SC_ABORT_NOT_REACHED ();
75  }
76 
81  inline t8_geometry_type_t
83  {
85  };
86 
87  /* Load tree data is inherited from t8_geometry_with_vertices. */
88 };
89 
93 {
94  public:
95  /* Basic constructor that sets the dimension and the name. */
96  t8_geometry_triangulated_spherical_surface (): t8_geometry_with_vertices (2, "t8_triangulated_spherical_surface_")
97  {
98  }
99 
100  /* The destrucor. */
102  {
103  }
104 
117  void
118  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
119  double *out_coords) const;
120 
121  /* Jacobian, not implemented. */
122  void
123  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
124  double *jacobian) const
125  {
126  SC_ABORT_NOT_REACHED ();
127  }
128 
129  /* Load tree data is inherited from t8_geometry_with_vertices. */
130 };
131 
135 {
136  public:
137  /* Basic constructor that sets the dimension and the name. */
138  t8_geometry_quadrangulated_spherical_surface (): t8_geometry_with_vertices (2, "t8_quadrangulated_spherical_surface_")
139  {
140  }
141 
142  /* The destrucor. */
144  {
145  }
146 
158  void
159  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
160  double *out_coords) const;
161 
162  /* Jacobian, not implemented. */
163  void
164  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
165  double *jacobian) const
166  {
167  SC_ABORT_NOT_REACHED ();
168  }
169 
170  /* Load tree data is inherited from t8_geometry_with_vertices. */
171 };
172 
176 {
177  public:
178  /* Basic constructor that sets the dimension and the name. */
179  t8_geometry_cubed_spherical_shell (): t8_geometry_with_vertices (3, "t8_cubed_spherical_shell_")
180  {
181  }
182 
183  /* The destrucor. */
185  {
186  }
187 
199  void
200  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
201  double *out_coords) const;
202 
203  /* Jacobian, not implemented. */
204  void
205  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
206  double *jacobian) const
207  {
208  SC_ABORT_NOT_REACHED ();
209  }
210 
211  /* Load tree data is inherited from t8_geometry_with_vertices. */
212 };
213 
217 {
218  public:
219  /* Basic constructor that sets the dimension and the name. */
220  t8_geometry_prismed_spherical_shell (): t8_geometry_with_vertices (3, "t8_prismed_spherical_shell")
221  {
222  }
223 
224  /* The destrucor. */
226  {
227  }
228 
240  void
241  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
242  double *out_coords) const;
243 
244  /* Jacobian, not implemented. */
245  void
246  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
247  double *jacobian) const
248  {
249  SC_ABORT_NOT_REACHED ();
250  }
251 
252  /* Load tree data is inherited from t8_geometry_with_vertices. */
253 };
254 
258 {
259  public:
260  /* Basic constructor that sets the dimension and the name. */
261  t8_geometry_cubed_sphere (): t8_geometry_with_vertices (3, "t8_geometry_cubed_sphere")
262  {
263  }
264 
265  /* The destrucor. */
266  virtual ~t8_geometry_cubed_sphere ()
267  {
268  }
269 
281  void
282  t8_geom_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
283  double *out_coords) const;
284 
285  /* Jacobian, not implemented. */
286  void
287  t8_geom_evaluate_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
288  double *jacobian) const
289  {
290  SC_ABORT_NOT_REACHED ();
291  }
292 
293  /* Load tree data is inherited from t8_geometry_with_vertices. */
294 };
295 
296 #endif /* T8_GEOMETRY_EXAMPLES_HXX */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
This geometry maps specifically arranged hexahedrons to a sphere.
Definition: t8_geometry_examples.hxx:258
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:287
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Maps specifically arranged hexahedrons to a sphere.
Definition: t8_geometry_examples.cxx:333
This geometry maps six hexaeders arranged as a cube to a spherical shell.
Definition: t8_geometry_examples.hxx:176
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Map the faces of a cube to a spherical surface.
Definition: t8_geometry_examples.cxx:326
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:205
This geometry maps prisms arranged as octahedron (or similar) to a spherical shell.
Definition: t8_geometry_examples.hxx:217
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Map prism arranged as octahedron (or similar) to a spherical shell.
Definition: t8_geometry_examples.cxx:246
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:246
This geometry maps five quads to a disk.
Definition: t8_geometry_examples.hxx:36
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Map five quads to a disk.
Definition: t8_geometry_examples.cxx:28
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:71
t8_geometry_type_t t8_geom_get_type() const
Get the type of this geometry.
Definition: t8_geometry_examples.hxx:82
This geometry maps the faces of a cube to a spherical surface.
Definition: t8_geometry_examples.hxx:135
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:164
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Map the faces of a cube to a spherical surface.
Definition: t8_geometry_examples.cxx:311
This geometry maps the faces of an octahedron/icosahedron to a spherical surface.
Definition: t8_geometry_examples.hxx:93
void t8_geom_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords) const
Map the faces of an octahedron/icosahedron to a spherical surface.
Definition: t8_geometry_examples.cxx:231
void t8_geom_evaluate_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian) const
Compute the jacobian of the t8_geom_evaluate map at a point in the reference space .
Definition: t8_geometry_examples.hxx:123
Definition: t8_geometry_with_vertices.hxx:40
This is the administrative header file for t8code.
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
@ T8_GEOMETRY_TYPE_UNDEFINED
This is no geometry type but is used for every geometry, where no type is defined.
Definition: t8_geometry.h:51
enum t8_geometry_type t8_geometry_type_t
This enumeration contains all possible geometries.
Implements the inherited struct t8_geometry_with_vertices, which can be used for geometries that use ...