YAC 3.13.0
Yet Another Coupler
Loading...
Searching...
No Matches
clipping.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef CLIPPING_H
6#define CLIPPING_H
7
8#include "grids/grid_cell.h"
9
10struct yac_circle;
11
37void yac_cell_clipping (size_t N,
38 struct yac_grid_cell * source_cell,
39 struct yac_grid_cell target_cell,
40 struct yac_grid_cell * overlap_buffer);
41
62void yac_cell_lat_clipping (size_t N,
63 struct yac_grid_cell * cells,
64 double lat_bounds[2],
65 struct yac_grid_cell * overlap_buffer);
66
91void yac_compute_overlap_areas (size_t N,
92 struct yac_grid_cell * source_cell,
93 struct yac_grid_cell target_cell,
94 double * partial_areas);
95
124void yac_compute_overlap_info (size_t N,
125 struct yac_grid_cell * source_cell,
126 struct yac_grid_cell target_cell,
127 double * overlap_areas,
128 double (*overlap_barycenters)[3]);
129
134
144void yac_correct_weights (size_t N, double * weight);
145
156 double const * a, double const * b, enum yac_edge_type type,
157 int edge_ordering, struct yac_circle * circle);
158
167int yac_circle_compare(void const * a, void const * b);
168
174int yac_circle_contains_north_pole(struct yac_circle * circle);
175
187 double const point[3], struct yac_circle * circle);
188
199 double const a[3], double const b[3], struct yac_circle * circle);
200
201#endif // CLIPPING_H
int yac_circle_point_is_inside(double const point[3], struct yac_circle *circle)
Definition clipping.c:473
void yac_cell_lat_clipping(size_t N, struct yac_grid_cell *cells, double lat_bounds[2], struct yac_grid_cell *overlap_buffer)
cell clipping to get the cells describing the intersections
Definition clipping.c:1325
void yac_cell_clipping(size_t N, struct yac_grid_cell *source_cell, struct yac_grid_cell target_cell, struct yac_grid_cell *overlap_buffer)
cell clipping to get the cells describing the intersections
Definition clipping.c:1088
void yac_compute_overlap_info(size_t N, struct yac_grid_cell *source_cell, struct yac_grid_cell target_cell, double *overlap_areas, double(*overlap_barycenters)[3])
calculates partial areas for all overlapping parts of the source cells with arbitrary target cells,...
Definition clipping.c:119
void yac_compute_overlap_areas(size_t N, struct yac_grid_cell *source_cell, struct yac_grid_cell target_cell, double *partial_areas)
calculates partial areas for all overlapping parts of the source cells with arbitrary target cells,...
Definition clipping.c:278
int yac_circle_compare(void const *a, void const *b)
Definition clipping.c:346
void yac_correct_weights(size_t N, double *weight)
correct interpolation weights
Definition clipping.c:1445
int yac_circle_contains_north_pole(struct yac_circle *circle)
Definition clipping.c:565
void yac_circle_generate(double const *a, double const *b, enum yac_edge_type type, int edge_ordering, struct yac_circle *circle)
Definition clipping.c:417
void yac_compute_overlap_buf_free()
Definition clipping.c:88
int yac_circle_compare_distances(double const a[3], double const b[3], struct yac_circle *circle)
Definition clipping.c:511
yac_edge_type
Definition grid_cell.h:12
enum callback_type type
#define N