t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_geometry_helpers.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_HELPERS_H
29 #define T8_GEOMETRY_HELPERS_H
30 
31 #include <t8.h>
32 
33 T8_EXTERN_C_BEGIN ();
34 
42 void
43 t8_geom_compute_linear_geometry (t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords,
44  const size_t num_coords, double *out_coords);
45 
55 void
56 t8_geom_compute_linear_axis_aligned_geometry (t8_eclass_t tree_class, const double *tree_vertices,
57  const double *ref_coords, const size_t num_coords, double *out_coords);
58 
67 void
68 t8_geom_linear_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim,
69  int interpolation_dim, double *evaluated_function);
70 
81 void
82 t8_geom_triangular_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim,
83  int interpolation_dim, double *evaluated_function);
84 
92 void
93 t8_geom_get_face_vertices (t8_eclass_t tree_class, const double *tree_vertices, int face_index, int dim,
94  double *face_vertices);
95 
103 void
104 t8_geom_get_edge_vertices (t8_eclass_t tree_class, const double *tree_vertices, int edge_index, int dim,
105  double *edge_vertices);
106 
118 void
119 t8_geom_get_ref_intersection (int edge_index, const double *ref_coords, double ref_intersection[2]);
120 
131 double
132 t8_geom_get_triangle_scaling_factor (int edge_index, const double *tree_vertices, const double *glob_intersection,
133  const double *glob_ref_point);
134 
135 T8_EXTERN_C_END ();
136 
137 #endif /* !T8_GEOMETRY_HELPERS_H! */
This is the administrative header file for t8code.
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.
void t8_geom_compute_linear_axis_aligned_geometry(t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords)
Compute the linear, axis-aligned geometry of a tree at a given reference coordinate.
Definition: t8_geometry_helpers.c:178
double t8_geom_get_triangle_scaling_factor(int edge_index, const double *tree_vertices, const double *glob_intersection, const double *glob_ref_point)
Calculates the scaling factor for edge displacement along a triangular tree face depending on the pos...
Definition: t8_geometry_helpers.c:352
void t8_geom_get_face_vertices(t8_eclass_t tree_class, const double *tree_vertices, int face_index, int dim, double *face_vertices)
Copies the vertex coordinates of a tree face in zorder into a separate array.
Definition: t8_geometry_helpers.c:220
void t8_geom_get_ref_intersection(int edge_index, const double *ref_coords, double ref_intersection[2])
Calculates a point of intersection in a triangular reference space.
Definition: t8_geometry_helpers.c:246
void t8_geom_linear_interpolation(const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function)
Interpolates linearly between 2, bilinearly between 4 or trilineraly between 8 points.
Definition: t8_geometry_helpers.c:29
void t8_geom_triangular_interpolation(const double *coefficients, const double *corner_values, int corner_value_dim, int interpolation_dim, double *evaluated_function)
Triangular interpolation between 3 points (triangle) or 4 points (tetrahedron) using barycentric coor...
Definition: t8_geometry_helpers.c:57
void t8_geom_compute_linear_geometry(t8_eclass_t tree_class, const double *tree_vertices, const double *ref_coords, const size_t num_coords, double *out_coords)
Compute the linear geometry of a tree at a given reference coordinate.
Definition: t8_geometry_helpers.c:82
void t8_geom_get_edge_vertices(t8_eclass_t tree_class, const double *tree_vertices, int edge_index, int dim, double *edge_vertices)
Copies the vertex coordinates of a tree edge in zorder into a separate array.
Definition: t8_geometry_helpers.c:233