t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_geometry.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_GEOMETRY_H
29 #define T8_GEOMETRY_H
30 
31 #include <t8.h>
32 #include <t8_refcount.h>
33 
35 typedef enum t8_geometry_type {
53 
58 typedef struct t8_geometry t8_geometry_c;
59 
66 
67 /* The t8_geometry_c type must be know to cmesh.h, thus we
68  * include it after the typedef. */
69 #include <t8_cmesh.h>
70 
71 T8_EXTERN_C_BEGIN ();
72 
81 void
82 t8_geometry_evaluate (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
83  double *out_coords);
84 
92 void
93 t8_geometry_jacobian (t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords,
94  double *jacobian);
95 
103 
111 int
112 t8_geometry_tree_negative_volume (const t8_cmesh_t cmesh, const t8_gloidx_t gtreeid);
113 
114 T8_EXTERN_C_END ();
115 
116 #endif /* !T8_GEOMETRY_H */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
Definition: t8_geometry_handler.hxx:37
The base class for all geometries.
Definition: t8_geometry_base.hxx:48
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
We define the coarse mesh of trees in this file.
int t8_geometry_tree_negative_volume(const t8_cmesh_t cmesh, const t8_gloidx_t gtreeid)
Check if a tree has a negative volume.
Definition: t8_geometry.cxx:68
t8_geometry_type_t t8_geometry_get_type(t8_cmesh_t cmesh, t8_gloidx_t gtreeid)
This function returns the geometry type of a tree.
Definition: t8_geometry.cxx:61
t8_geometry_type
This enumeration contains all possible geometries.
Definition: t8_geometry.h:35
@ 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
@ T8_GEOMETRY_TYPE_LINEAR
The linear geometry uses linear interpolations to interpolate between the tree vertices.
Definition: t8_geometry.h:39
@ T8_GEOMETRY_TYPE_ANALYTIC
The analytic geometry uses a user-defined analytic function to map into the physical domain.
Definition: t8_geometry.h:45
@ T8_GEOMETRY_TYPE_CAD
The opencascade geometry uses CAD shapes to map trees exactly to the underlying CAD model.
Definition: t8_geometry.h:47
@ T8_GEOMETRY_TYPE_LINEAR_AXIS_ALIGNED
The linear, axis aligned geometry uses only 2 vertices, since it is axis aligned.
Definition: t8_geometry.h:41
@ T8_GEOMETRY_TYPE_ZERO
The zero geometry maps all points to zero.
Definition: t8_geometry.h:37
@ T8_GEOMETRY_TYPE_COUNT
This is no geometry type but can be used as the number of geometry types.
Definition: t8_geometry.h:49
@ T8_GEOMETRY_TYPE_LAGRANGE
The Lagrange geometry uses a mapping with Lagrange polynomials to approximate curved elements .
Definition: t8_geometry.h:43
enum t8_geometry_type t8_geometry_type_t
This enumeration contains all possible geometries.
void t8_geometry_evaluate(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *out_coords)
Evaluates the geometry of a tree at a given reference point.
Definition: t8_geometry.cxx:28
void t8_geometry_jacobian(t8_cmesh_t cmesh, t8_gloidx_t gtreeid, const double *ref_coords, const size_t num_coords, double *jacobian)
Evaluates the jacobian of a tree at a given reference point.
Definition: t8_geometry.cxx:53
We inherit the reference counting mechanism from libsc.