|
programmer's documentation
|
#include "cs_defs.h"#include <stdio.h>#include <string.h>#include <assert.h>#include <math.h>#include <float.h>#include "bft_mem.h"#include "bft_printf.h"#include "cs_math.h"#include "cs_parall.h"#include "cs_geom.h"
Functions | |
| void | cs_geom_closest_point (cs_lnum_t n_points, const cs_real_t point_coords[][3], const cs_real_t query_coords[3], cs_lnum_t *point_id, int *rank_id) |
| find the closest point of a set to a given point in space. More... | |
| double | cs_geom_segment_intersect_face (int orient, cs_lnum_t n_vertices, const cs_lnum_t vertex_ids[], const cs_real_t vtx_coord[][3], const cs_real_t face_cog[3], const cs_real_t sx0[3], const cs_real_t sx1[3], int n_crossings[2], cs_real_t *face_norm) |
| Test if a line segment intersects a face. More... | |
Geometry utility functions.
| void cs_geom_closest_point | ( | cs_lnum_t | n_points, |
| const cs_real_t | point_coords[][3], | ||
| const cs_real_t | query_coords[3], | ||
| cs_lnum_t * | point_id, | ||
| int * | rank_id | ||
| ) |
find the closest point of a set to a given point in space.
If the orient parameter is set to -1 or 1, intersection is only considered when (sx1-sx0).normal.orient > 0. If set to 0, intersection is considered in both cases.
| [in] | n_points | number of points |
| [in] | point_coords | point coordinates |
| [in] | query_coords | coordinates searched for |
| [out] | point_id | id of closest point if on the same rank, -1 otherwise |
| [out] | rank_id | id of rank containing closest point |
| double cs_geom_segment_intersect_face | ( | int | orient, |
| cs_lnum_t | n_vertices, | ||
| const cs_lnum_t | vertex_ids[], | ||
| const cs_real_t | vtx_coord[][3], | ||
| const cs_real_t | face_cog[3], | ||
| const cs_real_t | sx0[3], | ||
| const cs_real_t | sx1[3], | ||
| int | n_crossings[2], | ||
| cs_real_t * | face_norm | ||
| ) |
Test if a line segment intersects a face.
| x---------------------—|-----—x D: end coordinates O: start coordiantes | x G: Face (Center of Gravity) x current | cell center | | Face number
If the orient parameter is set to -1 or 1, intersection is only considered when (sx1-sx0).normal.orient > 0. If set to 0, intersection is considered in both cases.
| [in] | orient | if -1 or 1, multiplies face_normal to check for segment |
| [in] | n_vertices | number of face vertices |
| [in] | vertex_ids | ids of face vertices |
| [in] | vtx_coord | vertex coordinates |
| [in] | face_cog | coordinates of face center |
| [in] | sx0 | segment start coordinates |
| [in] | sx1 | segment end coordinates |
| [out] | n_crossings | number sub_face crossings [0: in; 1: out] |
| [in,out] | face_norm | local face unit normal of the crossed sub triangle (if entering with something different from NULL) |
1.8.13