#include <string.h>
#include "tests.h"
#include "test_common.h"
enum {
NUM_LOCACTIONS = sizeof(locations) / sizeof(locations[0])
};
static void check_basic_grid(
int const * const * ref_core_masks,
size_t const * ref_grid_data_sizes);
static void check_interp_field(
double * coordinates, size_t count);
int const * mask, char const * mask_name);
int const * mask, size_t count, char const * mask_name);
char const * grid_name = "basic_grid_name";
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0,1};
double lat_vertices[] = {0,1,2};
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {0, 0, 0};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0.0,0.1};
double lat_vertices[] = {0.0,0.1,0.2};
grid_name, nbr_vertices, cyclic, lon_vertices, lat_vertices);
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0.0,0.1};
double lat_vertices[] = {0.0,0.1,0.2};
grid_name, nbr_vertices, cyclic, lon_vertices, lat_vertices);
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double lat_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, cyclic, lon_vertices, lat_vertices);
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double lat_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, cyclic, lon_vertices, lat_vertices);
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, nbr_cells, num_vertices_per_cell,
x_vertices, y_vertices, cell_to_vertex);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, nbr_cells, num_vertices_per_cell,
x_vertices, y_vertices, cell_to_vertex);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, nbr_cells, num_vertices_per_cell,
x_vertices, y_vertices, cell_to_vertex);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_vertices, nbr_cells, num_vertices_per_cell,
x_vertices, y_vertices, cell_to_vertex);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
size_t nbr_edges = 7;
int num_edges_per_cell[] = {4, 4};
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
int edge_to_vertex[] = {0,1, 0,2, 1,3, 2,3, 2,4, 3,5, 4,5};
grid_name, nbr_vertices, nbr_cells, nbr_edges,
num_edges_per_cell, x_vertices, y_vertices,
cell_to_edge, edge_to_vertex);
nbr_vertices, nbr_cells, nbr_edges, num_edges_per_cell,
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
size_t nbr_edges = 7;
int num_edges_per_cell[] = {4, 4};
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
int edge_to_vertex[] = {0,1, 0,2, 1,3, 2,3, 2,4, 3,5, 4,5};
grid_name, nbr_vertices, nbr_cells, nbr_edges,
num_edges_per_cell, x_vertices, y_vertices,
cell_to_edge, edge_to_vertex);
nbr_vertices, nbr_cells, nbr_edges, num_edges_per_cell,
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
size_t nbr_edges = 7;
int num_edges_per_cell[] = {4, 4};
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
int edge_to_vertex[] = {0,1, 0,2, 1,3, 2,3, 2,4, 3,5, 4,5};
grid_name, nbr_vertices, nbr_cells, nbr_edges,
num_edges_per_cell, x_vertices, y_vertices,
cell_to_edge, edge_to_vertex);
nbr_vertices, nbr_cells, nbr_edges, num_edges_per_cell,
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices = 6;
size_t nbr_cells = 2;
size_t nbr_edges = 7;
int num_edges_per_cell[] = {4, 4};
double x_vertices[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_vertices[] = {0.0,0.0,0.1,0.1,0.2,0.2};
int edge_to_vertex[] = {0,1, 0,2, 1,3, 2,3, 2,4, 3,5, 4,5};
grid_name, nbr_vertices, nbr_cells, nbr_edges,
num_edges_per_cell, x_vertices, y_vertices,
cell_to_edge, edge_to_vertex);
nbr_vertices, nbr_cells, nbr_edges, num_edges_per_cell,
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {2, 6, 7};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_points = 6;
double x_points[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_points[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_points, x_points, y_points);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {0, 6, 0};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_points = 6;
double x_points[] = {0.0,0.1,0.0,0.1,0.0,0.1};
double y_points[] = {0.0,0.0,0.1,0.1,0.2,0.2};
grid_name, nbr_points, x_points, y_points);
int const * ref_core_masks[NUM_LOCACTIONS] = {NULL, NULL, NULL};
size_t const ref_grid_data_sizes[NUM_LOCACTIONS] = {0, 6, 0};
check_basic_grid(
grid, grid_name, ref_grid_data, ref_core_masks, ref_grid_data_sizes);
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0,1};
double lat_vertices[] = {0,1,2};
nbr_vertices, cyclic, lon_vertices, lat_vertices);
{
double ref_cell_center_coordinates[2][3];
int ref_cell_mask[] = {0,1};
{
.coordinates_idx =
.masks_idx =
};
check_interp_field(
grid, cell_interp_field,
}
{
{
.coordinates_idx = SIZE_MAX,
.masks_idx = SIZE_MAX
};
check_interp_field(
grid, cell_interp_field, NULL, NULL);
}
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0,1};
double lat_vertices[] = {0,1,2};
nbr_vertices, cyclic, lon_vertices, lat_vertices);
int const cell_mask[] = {1,0,1,0,1,0};
char const mask_name[] = "test_mask";
size_t ref_mask_idx =
if (ref_mask_idx !=
PUT_ERR("ERROR in yac_basic_grid_get_named_mask_idx");
if (SIZE_MAX !=
PUT_ERR("ERROR in yac_basic_grid_get_named_mask_idx");
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0,1};
double lat_vertices[] = {0,1,2};
nbr_vertices, cyclic, lon_vertices, lat_vertices);
{
double cell_coordinates[2][2][3];
double vertex_coordinates[1][6][3];
int cell_mask[3][2] = {{1,0},{0,1},{0,0}};
int edge_mask[2][7] = {{0,0,0,1,1,1,1},{1,1,1,0,0,0,0}};
enum {
NUM_CELL_COORDS =
sizeof(cell_coordinates)/sizeof(cell_coordinates[0]),
NUM_CELL_MASKS = sizeof(cell_mask)/sizeof(cell_mask[0]),
NUM_CORNER_COORDS =
sizeof(vertex_coordinates)/sizeof(vertex_coordinates[0]),
NUM_CORNER_MASKS = 0,
NUM_EDGE_COORDS = 0,
NUM_EDGE_MASKS = sizeof(edge_mask)/sizeof(edge_mask[0]),
};
size_t ref_coordinates_idxs[3][2] = {
{SIZE_MAX}
};
size_t ref_masks_idxs[3][3] = {
{SIZE_MAX},
};
size_t ref_num_coords[3] =
{NUM_CELL_COORDS, NUM_CORNER_COORDS, NUM_EDGE_COORDS};
size_t ref_num_masks[3] =
{NUM_CELL_MASKS, NUM_CORNER_MASKS, NUM_EDGE_MASKS};
for (size_t loc_idx = 0; loc_idx < NUM_LOCACTIONS; ++loc_idx) {
if (ref_num_coords[loc_idx] !=
PUT_ERR("ERROR in yac_field_data_get_coordinates_count");
for (size_t coord_idx = 0; coord_idx < ref_num_coords[loc_idx];
++coord_idx) {
.coordinates_idx = ref_coordinates_idxs[loc_idx][coord_idx],
.masks_idx = SIZE_MAX};
for (size_t i = 0; i < data_size; ++i)
PUT_ERR("ERROR in yac_basic_grid_get_field_data");
}
.coordinates_idx = SIZE_MAX,
.masks_idx = ref_masks_idxs[loc_idx][
masks_idx]};
int const * ref_masks =
for (size_t i = 0; i < data_size; ++i)
if (ref_masks[i] !=
masks[i])
PUT_ERR("ERROR in yac_basic_grid_get_field_data");
}
}
}
}
{
size_t nbr_vertices[2] = {2,3};
int cyclic[2] = {0,0};
double lon_vertices[] = {0,1};
double lat_vertices[] = {0,1,2};
nbr_vertices, cyclic, lon_vertices, lat_vertices);
{
double ref_cell_center_coordinates[2][2][3];
int ref_cell_mask[2][2] = {{0,1},{1,0}};
LLtoXYZ_deg(0.5, 0.5, ref_cell_center_coordinates[0][0]);
LLtoXYZ_deg(0.5, 1.5, ref_cell_center_coordinates[0][1]);
LLtoXYZ_deg(0.6, 0.6, ref_cell_center_coordinates[1][0]);
LLtoXYZ_deg(0.6, 1.6, ref_cell_center_coordinates[1][1]);
{
.coordinates_idx =
grid,
YAC_LOC_CELL, TO_POINTER(ref_cell_center_coordinates[0])),
.masks_idx =
},
{
.coordinates_idx =
grid,
YAC_LOC_CELL, &(ref_cell_center_coordinates[1][0][0]), 2),
.masks_idx =
}
};
enum {NUM_FIELDS = sizeof(interp_fields) / sizeof(interp_fields[0])};
for (size_t loc_idx = 0; loc_idx < NUM_LOCACTIONS; ++loc_idx) {
PUT_ERR("ERROR in yac_basic_grid_get_data_size_f2c");
}
for (size_t i = 0; i < NUM_FIELDS; ++i)
check_interp_field(
grid, interp_fields[i],
ref_cell_mask[i]);
}
}
return TEST_EXIT_CODE;
}
static void check_basic_grid(
int const * const * ref_core_masks,
size_t const * ref_grid_data_sizes) {
PUT_ERR("ERROR in yac_basic_grid_get_name");
check_basic_grid_data(
for (size_t loc_idx = 0; loc_idx < NUM_LOCACTIONS; ++loc_idx) {
if (ref_core_masks[loc_idx] !=
PUT_ERR("ERROR in yac_basic_grid_get_core_mask");
if (ref_grid_data_sizes[loc_idx] !=
PUT_ERR("ERROR in yac_basic_grid_get_data_size");
}
double * cell_areas = malloc(num_cells * sizeof(*cell_areas));
for (size_t i = 0; i < num_cells; ++i) cell_areas[i] = DBL_MAX;
for (size_t i = 0; i < num_cells; ++i)
if (cell_areas[i] == DBL_MAX)
PUT_ERR("ERROR in yac_basic_grid_compute_cell_areas");
free(cell_areas);
}
static void check_interp_field(
if ((ref_coords == NULL) != (coords == NULL))
PUT_ERR("ERROR in yac_basic_grid_get_field_coordinates");
if (ref_coords != NULL)
for (size_t i = 0; i < data_size; ++i)
PUT_ERR("ERROR in yac_basic_grid_get_field_coordinates");
int const * mask =
if ((ref_mask == NULL) != (mask == NULL))
PUT_ERR("ERROR in yac_basic_grid_get_field_mask");
if (ref_mask != NULL)
for (size_t i = 0; i < data_size; ++i)
if (ref_mask[i] != mask[i])
PUT_ERR("ERROR in yac_basic_grid_get_field_mask");
}
struct yac_basic_grid * yac_basic_grid_unstruct_edge_new(char const *name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_basic_grid * yac_basic_grid_unstruct_edge_ll_new(char const *name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_field_data * yac_basic_grid_get_field_data(struct yac_basic_grid *grid, enum yac_location location)
size_t yac_basic_grid_get_named_mask_idx(struct yac_basic_grid *grid, enum yac_location location, char const *mask_name)
int const * yac_basic_grid_get_field_mask(struct yac_basic_grid *grid, struct yac_interp_field field)
struct yac_basic_grid * yac_basic_grid_new(char const *name, struct yac_basic_grid_data grid_data)
struct yac_basic_grid * yac_basic_grid_reg_2d_deg_new(char const *name, size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid * yac_basic_grid_cloud_new(char const *name, size_t nbr_points, double *x_points, double *y_points)
struct yac_basic_grid * yac_basic_grid_unstruct_deg_new(char const *name, size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
struct yac_basic_grid * yac_basic_grid_unstruct_new(char const *name, size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
yac_const_coordinate_pointer yac_basic_grid_get_field_coordinates(struct yac_basic_grid *grid, struct yac_interp_field field)
struct yac_basic_grid_data * yac_basic_grid_get_data(struct yac_basic_grid *grid)
struct yac_basic_grid * yac_basic_grid_cloud_deg_new(char const *name, size_t nbr_points, double *x_points, double *y_points)
struct yac_basic_grid * yac_basic_grid_unstruct_edge_deg_new(char const *name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
size_t yac_basic_grid_add_mask(struct yac_basic_grid *grid, enum yac_location location, int const *mask, size_t count, char const *mask_name)
struct yac_basic_grid * yac_basic_grid_reg_2d_new(char const *name, size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid * yac_basic_grid_unstruct_ll_new(char const *name, size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
size_t yac_basic_grid_get_data_size_f2c(struct yac_basic_grid *grid, int location)
char const * yac_basic_grid_get_name(struct yac_basic_grid *grid)
void yac_basic_grid_compute_cell_areas(struct yac_basic_grid *grid, double *cell_areas)
size_t yac_basic_grid_add_mask_nocpy_f2c(struct yac_basic_grid *grid, int location, int const *mask, char const *mask_name)
size_t yac_basic_grid_add_coordinates_f2c(struct yac_basic_grid *grid, int location, double *coordinates, size_t count)
size_t yac_basic_grid_add_coordinates(struct yac_basic_grid *grid, enum yac_location location, yac_coordinate_pointer coordinates, size_t count)
size_t yac_basic_grid_get_data_size(struct yac_basic_grid *grid, enum yac_location location)
struct yac_basic_grid * yac_basic_grid_unstruct_ll_deg_new(char const *name, size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
int const * yac_basic_grid_get_core_mask(struct yac_basic_grid *grid, enum yac_location location)
size_t yac_basic_grid_add_coordinates_nocpy_f2c(struct yac_basic_grid *grid, int location, double *coordinates)
struct yac_basic_grid * yac_basic_grid_empty_new(char const *name)
void yac_basic_grid_delete(struct yac_basic_grid *grid)
size_t yac_basic_grid_add_mask_f2c(struct yac_basic_grid *grid, int location, int const *mask, size_t count, char const *mask_name)
struct yac_basic_grid * yac_basic_grid_curve_2d_new(char const *name, size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid * yac_basic_grid_curve_2d_deg_new(char const *name, size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid * yac_basic_grid_unstruct_edge_ll_deg_new(char const *name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
void yac_basic_grid_data_free(struct yac_basic_grid_data grid)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_deg(size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_reg_2d(size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_ll(size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_edge(size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_cloud(size_t nbr_points, double *x_points, double *y_points)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_edge_deg(size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_edge_ll(size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_edge_ll_deg(size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges, int *num_edges_per_cell, double *x_vertices, double *y_vertices, int *cell_to_edge, int *edge_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_cloud_deg(size_t nbr_points, double *x_points, double *y_points)
struct yac_basic_grid_data yac_generate_basic_grid_data_curve_2d_deg(size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid_data yac_generate_basic_grid_data_curve_2d(size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct(size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
struct yac_basic_grid_data yac_generate_basic_grid_data_reg_2d_deg(size_t nbr_vertices[2], int cyclic[2], double *lon_vertices, double *lat_vertices)
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct_ll_deg(size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
int main(int argc, char **argv)
size_t yac_field_data_get_coordinates_count(struct yac_field_data *field_data)
yac_const_coordinate_pointer yac_field_data_get_coordinates_data(struct yac_field_data *field_data, size_t coordinates_idx)
int const * yac_field_data_get_mask_data(struct yac_field_data *field_data, size_t mask_idx)
static void LLtoXYZ_deg(double lon, double lat, double p_out[])
static double get_vector_angle(double const a[3], double const b[3])
yac_size_t_2_pointer edge_to_vertex
int * num_vertices_per_cell
enum yac_location location
static struct user_input_data_masks ** masks
double const (* yac_const_coordinate_pointer)[3]