Program Listing for File t8_geometry_helpers.h
↰ Return to documentation for file (src/t8_geometry/t8_geometry_helpers.h)
/*
This file is part of t8code.
t8code is a C library to manage a collection (a forest) of multiple
connected adaptive space-trees of general element classes in parallel.
Copyright (C) 2015 the developers
t8code is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
t8code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with t8code; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef T8_GEOMETRY_HELPERS_H
#define T8_GEOMETRY_HELPERS_H
#include <t8.h>
T8_EXTERN_C_BEGIN ();
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);
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);
void
t8_geom_linear_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim,
int interpolation_dim, double *evaluated_function);
void
t8_geom_triangular_interpolation (const double *coefficients, const double *corner_values, int corner_value_dim,
int interpolation_dim, double *evaluated_function);
void
t8_geom_get_face_vertices (t8_eclass_t tree_class, const double *tree_vertices, int face_index, int dim,
double *face_vertices);
void
t8_geom_get_edge_vertices (t8_eclass_t tree_class, const double *tree_vertices, int edge_index, int dim,
double *edge_vertices);
void
t8_geom_get_ref_intersection (int edge_index, const double *ref_coords, double ref_intersection[2]);
double
t8_geom_get_triangle_scaling_factor (int edge_index, const double *tree_vertices, const double *glob_intersection,
const double *glob_ref_point);
double
t8_geom_get_scaling_factor_of_edge_on_face_tet (int edge_index, int face_index, const double *ref_coords);
void
t8_geom_get_tet_face_intersection (const int face_index, const double *ref_coords, double face_intersection[3]);
double
t8_geom_get_scaling_factor_of_edge_on_face_prism (int edge_index, int face_index, const double *ref_coords);
double
t8_geom_get_scaling_factor_face_through_volume_prism (const int face, const double *ref_coords);
int
t8_vertex_point_inside (const double vertex_coords[3], const double point[3], const double tolerance);
int
t8_line_point_inside (const double *p_0, const double *vec, const double *point, const double tolerance);
int
t8_triangle_point_inside (const double p_0[3], const double v[3], const double w[3], const double point[3],
const double tolerance);
int
t8_plane_point_inside (const double point_on_face[3], const double face_normal[3], const double point[3]);
T8_EXTERN_C_END ();
#endif /* !T8_GEOMETRY_HELPERS_H */