YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Functions
bnd_circle.c File Reference

Set of functions to calculate a bounding circle around a certain set of points. More...

#include "config.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include "geometry.h"
#include "utils_core.h"
#include "basic_grid.h"
#include "ensure_array_size.h"
Include dependency graph for bnd_circle.c:

Go to the source code of this file.

Functions

void yac_get_cell_circumscribe_circle_reg_quad (double a[3], double b[3], double c[3], struct bounding_circle *bnd_circle)
 
void yac_get_cell_bounding_circle_reg_quad (double a[3], double b[3], double c[3], struct bounding_circle *bnd_circle)
 
void yac_get_cell_circumscribe_circle_unstruct_triangle (double a[3], double b[3], double c[3], struct bounding_circle *bnd_circle)
 
static double get_sin_vector_angle (double a[3], double b[3])
 
void yac_get_cell_bounding_circle_unstruct_triangle (double a[3], double b[3], double c[3], struct bounding_circle *bnd_circle)
 
static struct sin_cos_angle compute_edge_inc_angle (double *restrict a, double *restrict b, double *restrict middle_point)
 
void yac_get_cell_bounding_circle (struct yac_grid_cell cell, struct bounding_circle *bnd_circle)
 
int yac_extents_overlap (struct bounding_circle *extent_a, struct bounding_circle *extent_b)
 

Detailed Description

Set of functions to calculate a bounding circle around a certain set of points.

Definition in file bnd_circle.c.

Function Documentation

◆ compute_edge_inc_angle()

static struct sin_cos_angle compute_edge_inc_angle ( double *restrict  a,
double *restrict  b,
double *restrict  middle_point 
)
inlinestatic

Definition at line 148 of file bnd_circle.c.

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

◆ get_sin_vector_angle()

static double get_sin_vector_angle ( double  a[3],
double  b[3] 
)
inlinestatic

Definition at line 80 of file bnd_circle.c.

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

◆ yac_extents_overlap()

int yac_extents_overlap ( struct bounding_circle extent_a,
struct bounding_circle extent_b 
)

checks whether two extents overlap

Parameters
[in]extent_abounding circle
[in]extent_bbounding circle
Returns
0 if the bounding circles do not overlap
Examples
test_bnd_sphere_part.c, and test_geometry.c.

Definition at line 204 of file bnd_circle.c.

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

◆ yac_get_cell_bounding_circle()

void yac_get_cell_bounding_circle ( struct yac_grid_cell  cell,
struct bounding_circle bnd_circle 
)

gets the bounding circle for a grid cell

Parameters
[in]cellgrid cell (coordinates have to be in radian)
[out]bnd_circlebounding circle of the grid cell
Examples
test_cell_bnd_circle.c.

Definition at line 160 of file bnd_circle.c.

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

◆ yac_get_cell_bounding_circle_reg_quad()

void yac_get_cell_bounding_circle_reg_quad ( double  a[3],
double  b[3],
double  c[3],
struct bounding_circle bnd_circle 
)

computes the smallest bounding circle for a triangle on the sphere

Parameters
[in]acoordinates of first point (xyz)
[in]bcoordinates of second point (xyz)
[in]ccoordinates of thrid point (xyz)
[out]bnd_circlebounding circle
Remarks
it is assumed that all edges of the quad are either circles of longitude or latitude
Examples
test_cell_bnd_circle.c.

Definition at line 36 of file bnd_circle.c.

Here is the call graph for this function:

◆ yac_get_cell_bounding_circle_unstruct_triangle()

void yac_get_cell_bounding_circle_unstruct_triangle ( double  a[3],
double  b[3],
double  c[3],
struct bounding_circle bnd_circle 
)

computes the smallest bounding circle for a triangle on the sphere

Parameters
[in]acoordinates of first point (xyz)
[in]bcoordinates of second point (xyz)
[in]ccoordinates of thrid point (xyz)
[out]bnd_circlebounding circle
Remarks
it is assumed that all three edges of the triangle are great circles
Examples
test_cell_bnd_circle.c.

Definition at line 93 of file bnd_circle.c.

Here is the call graph for this function:

◆ yac_get_cell_circumscribe_circle_reg_quad()

void yac_get_cell_circumscribe_circle_reg_quad ( double  a[3],
double  b[3],
double  c[3],
struct bounding_circle bnd_circle 
)

computes the circumscribe circle for a quad on the sphere

Parameters
[in]acoordinates of first point (xyz)
[in]bcoordinates of second point (xyz)
[in]ccoordinates of thrid point (xyz)
[out]bnd_circlecircumscribe circle
Remarks
it is assumed that all edges of the quad are either circles of longitude or latitude
Examples
test_cell_bnd_circle.c.

Definition at line 27 of file bnd_circle.c.

Here is the call graph for this function:

◆ yac_get_cell_circumscribe_circle_unstruct_triangle()

void yac_get_cell_circumscribe_circle_unstruct_triangle ( double  a[3],
double  b[3],
double  c[3],
struct bounding_circle bnd_circle 
)

computes the circumscribe circle for a triangle on the sphere

Parameters
[in]acoordinates of first point (xyz)
[in]bcoordinates of second point (xyz)
[in]ccoordinates of thrid point (xyz)
[out]bnd_circlecircumscribe circle
Remarks
it is assumed that all three edges of the triangle are great circles
Examples
test_cell_bnd_circle.c.

Definition at line 45 of file bnd_circle.c.

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