YAC 3.21.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
41void yac_cell_clipping (size_t N,
42 struct yac_grid_cell * source_cell,
43 struct yac_grid_cell target_cell,
44 struct yac_grid_cell * overlap_buffer);
45
70void yac_cell_lat_clipping (size_t N,
71 struct yac_grid_cell * cells,
72 double lat_bounds[2],
73 struct yac_grid_cell * overlap_buffer);
74
99void yac_compute_overlap_areas (size_t N,
100 struct yac_grid_cell * source_cell,
101 struct yac_grid_cell target_cell,
102 double * partial_areas);
103
132void yac_compute_overlap_info (size_t N,
133 struct yac_grid_cell * source_cell,
134 struct yac_grid_cell target_cell,
135 double * overlap_areas,
136 double (*overlap_barycenters)[3]);
137
142
155void yac_correct_weights (size_t N, double * weight);
156
167 double const * a, double const * b, enum yac_edge_type type,
168 int edge_ordering, struct yac_circle * circle);
169
182int yac_circle_compare(void const * a, void const * b);
183
190int yac_circle_contains_north_pole(struct yac_circle const * circle);
191
203 double const point[3], struct yac_circle const * circle);
204
215 double const a[3], double const b[3], struct yac_circle const * circle);
216
217#endif // CLIPPING_H
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:1386
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:1125
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:271
int yac_circle_compare(void const *a, void const *b)
Definition clipping.c:339
void yac_correct_weights(size_t N, double *weight)
correct interpolation weights
Definition clipping.c:1513
int yac_circle_contains_north_pole(struct yac_circle const *circle)
Definition clipping.c:595
int yac_circle_point_is_inside(double const point[3], struct yac_circle const *circle)
Definition clipping.c:492
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:407
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 const *circle)
Definition clipping.c:542
yac_edge_type
Definition grid_cell.h:12
enum callback_type type
#define N