YAC 3.20.0
Yet Another Coupler
Loading...
Searching...
No Matches
sphere_part.h File Reference

algorithm for searching cells and points on a grid More...

#include "yac_types.h"
#include "geometry.h"
Include dependency graph for sphere_part.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct bounding_circle const *const const_bounding_circle_pointer
 

Functions

struct point_sphere_part_searchyac_point_sphere_part_search_new (size_t num_points, yac_const_coordinate_pointer coordinates_xyz, yac_int const *ids)
 
struct point_sphere_part_searchyac_point_sphere_part_search_mask_new (size_t num_points, yac_const_coordinate_pointer coordinates_xyz, yac_int const *ids, int const *mask)
 
void yac_delete_point_sphere_part_search (struct point_sphere_part_search *search)
 
void yac_point_sphere_part_search_NN (struct point_sphere_part_search *search, size_t num_points, double(*coordinates_xyz)[3], double *cos_angles, double(**result_coordinates_xyz)[3], size_t *result_coordinates_xyz_array_size, size_t **local_point_ids, size_t *local_point_ids_array_size, size_t *num_local_point_ids)
 
void yac_point_sphere_part_search_NNN (struct point_sphere_part_search *search, size_t num_points, double(*coordinates_xyz)[3], size_t n, double **cos_angles, size_t *cos_angles_array_size, double(**result_coordinates_xyz)[3], size_t *result_coordinates_xyz_array_size, size_t **local_point_ids, size_t *local_point_ids_array_size, size_t *num_local_point_ids)
 
void yac_point_sphere_part_search_NNN_bnd_circle (struct point_sphere_part_search *search, size_t num_bnd_circles, struct bounding_circle *bnd_circles, size_t n, size_t **local_point_ids, size_t *local_point_ids_array_size, size_t *num_local_point_ids)
 
void yac_point_sphere_part_search_NNN_ubound (struct point_sphere_part_search *search, size_t num_points, yac_coordinate_pointer coordinates_xyz, size_t n, struct sin_cos_angle *angles)
 
void yac_point_sphere_part_search_bnd_circle (struct point_sphere_part_search *search, size_t num_bnd_circles, const_bounding_circle_pointer bnd_circles, size_t **local_point_ids, size_t *local_point_ids_array_size, size_t *num_local_point_ids)
 
struct bnd_sphere_part_searchyac_bnd_sphere_part_search_new (struct bounding_circle *circles, size_t num_circles)
 
void yac_bnd_sphere_part_search_delete (struct bnd_sphere_part_search *search)
 
void yac_bnd_sphere_part_search_do_point_search (struct bnd_sphere_part_search *search, yac_coordinate_pointer coordinates_xyz, size_t count, size_t **cells, size_t *num_cells_per_coordinate)
 
void yac_bnd_sphere_part_search_do_bnd_circle_search (struct bnd_sphere_part_search *search, struct bounding_circle *bnd_circles, size_t count, size_t **cells, size_t *num_cells_per_bnd_circle)
 

Detailed Description

algorithm for searching cells and points on a grid

yac_point_sphere_part_search_new generates a tree structure, which makes it easy to look for points. A documentation of the respective algorithm can be found at Sphere Partitioning Algorithm.

Definition in file sphere_part.h.

Typedef Documentation

◆ const_bounding_circle_pointer

typedef struct bounding_circle const* const const_bounding_circle_pointer

Definition at line 75 of file sphere_part.h.

Function Documentation

◆ yac_bnd_sphere_part_search_delete()

void yac_bnd_sphere_part_search_delete ( struct bnd_sphere_part_search * search)

Definition at line 2487 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_bnd_sphere_part_search_do_bnd_circle_search()

void yac_bnd_sphere_part_search_do_bnd_circle_search ( struct bnd_sphere_part_search * search,
struct bounding_circle * bnd_circles,
size_t count,
size_t ** cells,
size_t * num_cells_per_bnd_circle )

Definition at line 2403 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_bnd_sphere_part_search_do_point_search()

void yac_bnd_sphere_part_search_do_point_search ( struct bnd_sphere_part_search * search,
yac_coordinate_pointer coordinates_xyz,
size_t count,
size_t ** cells,
size_t * num_cells_per_coordinate )

Definition at line 2357 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_bnd_sphere_part_search_new()

struct bnd_sphere_part_search * yac_bnd_sphere_part_search_new ( struct bounding_circle * circles,
size_t num_circles )

Definition at line 772 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_delete_point_sphere_part_search()

void yac_delete_point_sphere_part_search ( struct point_sphere_part_search * search)

Definition at line 2477 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_bnd_circle()

void yac_point_sphere_part_search_bnd_circle ( struct point_sphere_part_search * search,
size_t num_bnd_circles,
const_bounding_circle_pointer bnd_circles,
size_t ** local_point_ids,
size_t * local_point_ids_array_size,
size_t * num_local_point_ids )

This routine searches for all points within the provided bounding circles.

Parameters
[in]searchpoint sphere part search data structure
[in]num_bnd_circlesnumber of bounding circles
[in]bnd_circlesarray of bounding circles
[out]local_point_idslocal ids of points found within bounding circles
[out]local_point_ids_array_sizeallocated size of local_point_ids
[out]num_local_point_idsnumber of local points found per bounding circle
Remarks
The use is resposible to ensure that num_local_point_ids has at least a size of num_bnd_circles.

Definition at line 2220 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_mask_new()

struct point_sphere_part_search * yac_point_sphere_part_search_mask_new ( size_t num_points,
yac_const_coordinate_pointer coordinates_xyz,
yac_int const * ids,
int const * mask )

Definition at line 918 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_new()

struct point_sphere_part_search * yac_point_sphere_part_search_new ( size_t num_points,
yac_const_coordinate_pointer coordinates_xyz,
yac_int const * ids )

Definition at line 888 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_NN()

void yac_point_sphere_part_search_NN ( struct point_sphere_part_search * search,
size_t num_points,
double(*) coordinates_xyz[3],
double * cos_angles,
double(**) result_coordinates_xyz[3],
size_t * result_coordinates_xyz_array_size,
size_t ** local_point_ids,
size_t * local_point_ids_array_size,
size_t * num_local_point_ids )

This routine does a nearest neighbour search between the points provided to this routine and the matching yac_point_sphere_part_search_new call.

Definition at line 1366 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_NNN()

void yac_point_sphere_part_search_NNN ( struct point_sphere_part_search * search,
size_t num_points,
double(*) coordinates_xyz[3],
size_t n,
double ** cos_angles,
size_t * cos_angles_array_size,
double(**) result_coordinates_xyz[3],
size_t * result_coordinates_xyz_array_size,
size_t ** local_point_ids,
size_t * local_point_ids_array_size,
size_t * num_local_point_ids )

This routine does a n nearest neighbour search between the points provided to this routine and the matching yac_point_sphere_part_search_new call.

Definition at line 1717 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_NNN_bnd_circle()

void yac_point_sphere_part_search_NNN_bnd_circle ( struct point_sphere_part_search * search,
size_t num_bnd_circles,
struct bounding_circle * bnd_circles,
size_t n,
size_t ** local_point_ids,
size_t * local_point_ids_array_size,
size_t * num_local_point_ids )

This routine does a n nearest neighbour search between the points provided to this routine and the matching yac_point_sphere_part_search_new call. The search for each provided point is limited for each point, by the bounding circle.

Definition at line 1897 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_point_sphere_part_search_NNN_ubound()

void yac_point_sphere_part_search_NNN_ubound ( struct point_sphere_part_search * search,
size_t num_points,
yac_coordinate_pointer coordinates_xyz,
size_t n,
struct sin_cos_angle * angles )

This routine does a n nearest neighbour search and returns the angle for the furthest point.

Definition at line 2028 of file sphere_part.c.

Here is the call graph for this function:
Here is the caller graph for this function: