YAC 3.12.0
Yet Another Coupler
Loading...
Searching...
No Matches
test_dist_grid_utils.c
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#include <stdlib.h>
6#include <stdio.h>
7#include "dist_grid_utils.h"
8#include "tests.h"
9#include "geometry.h"
10
17static void utest_check_basic_grid_data(
19 struct yac_basic_grid_data ref_grid_data);
20
21int main (void) {
22
23 { // test grid without halo
24 double coordinates_x[] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0};
25 double coordinates_y[] = {-4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0};
26 size_t const num_cells[2] = {9, 8};
27 size_t local_start[2] = {3, 3};
28 size_t local_count[2] = {3, 2};
29 int with_halo = 0;
30
31 for (size_t i = 0; i < sizeof(coordinates_x)/sizeof(coordinates_x[0]); ++i)
33 for (size_t i = 0; i < sizeof(coordinates_y)/sizeof(coordinates_y[0]); ++i)
35
36 double ref_vertex_coordinates[12][3];
37 yac_int ref_cell_ids[6] = {30, 31, 32,
38 39, 40, 41};
39 yac_int ref_vertex_ids[12] = {33, 34, 35, 36,
40 43, 44, 45, 46,
41 53, 54, 55, 56};
42 yac_int ref_edge_ids[17] = {63, 64, 65, 66, 67, 68, 70,
43 82, 83, 84, 85, 86, 87, 89,
44 101, 103, 105};
45 size_t ref_num_cells = 6;
46 size_t ref_num_vertices = 12;
47 size_t ref_num_edges = 17;
48 int ref_core_cell_mask[6] = {1, 1, 1,
49 1, 1, 1};
50 int ref_core_vertex_mask[12] = {1, 1, 1, 1,
51 1, 1, 1, 1,
52 1, 1, 1, 1};
53 int ref_core_edge_mask[17] = {1, 1, 1, 1, 1, 1, 1,
54 1, 1, 1, 1, 1, 1, 1,
55 1, 1, 1};
56 int ref_num_vertices_per_cell[6] = {4, 4, 4,
57 4, 4, 4};
58 int ref_num_cells_per_vertex[12] = {1, 2, 2, 1,
59 2, 4, 4, 2,
60 1, 2, 2, 1};
61 size_t ref_cell_to_vertex[6][4] = {{0,1,5,4}, {1,2,6,5}, {2,3,7,6},
62 {4,5,9,8}, {5,6,10,9}, {6,7,11,10}};
63 size_t ref_cell_to_vertex_offsets[6] = {0,4,8,12,16,20};
64 size_t ref_cell_to_edge[6][4] = {{0,3,7,1}, {2,5,9,3}, {4,6,11,5},
65 {7,10,14,8}, {9,12,15,10}, {11,13,16,12}};
66 size_t ref_cell_to_edge_offsets[6] = {0,4,8,12,16,20};
67 size_t ref_vertex_to_cell[] =
68 {0, 0,1, 1,2, 2, 0,3, 0,1,3,4, 1,2,4,5, 2,5, 3, 3,4, 4,5, 5};
69 size_t ref_vertex_to_cell_offsets[12] = {0,1,3,5,6,8,12,16,18,19,21,23};
70 size_t ref_edge_to_vertex[17][2] = {{0,1}, {0,4}, {1,2}, {1,5}, {2,3}, {2,6}, {3,7},
71 {4,5}, {4,8}, {5,6}, {5,9}, {6,7}, {6,10}, {7,11},
72 {8,9}, {9,10}, {10,11}};
73 enum yac_edge_type ref_edge_type[17] = {
79
80 for (size_t i = 0, k = 0; i < local_count[1] + 1; ++i)
81 for (size_t j = 0; j < local_count[0] + 1; ++j, ++k)
82 LLtoXYZ(coordinates_x[local_start[0]+j],
83 coordinates_y[local_start[1]+i],
84 &(ref_vertex_coordinates[k][0]));
85
86 struct yac_basic_grid_data ref_grid_data = {
87 .vertex_coordinates = ref_vertex_coordinates,
88 .cell_ids = ref_cell_ids,
89 .vertex_ids = ref_vertex_ids,
90 .edge_ids = ref_edge_ids,
91 .num_cells = ref_num_cells,
92 .num_vertices = ref_num_vertices,
93 .num_edges = ref_num_edges,
94 .core_cell_mask = ref_core_cell_mask,
95 .core_vertex_mask = ref_core_vertex_mask,
96 .core_edge_mask = ref_core_edge_mask,
97 .num_vertices_per_cell = ref_num_vertices_per_cell,
98 .num_cells_per_vertex = ref_num_cells_per_vertex,
99 .cell_to_vertex = &(ref_cell_to_vertex[0][0]),
100 .cell_to_vertex_offsets = ref_cell_to_vertex_offsets,
101 .cell_to_edge = &(ref_cell_to_edge[0][0]),
102 .cell_to_edge_offsets = ref_cell_to_edge_offsets,
103 .vertex_to_cell = ref_vertex_to_cell,
104 .vertex_to_cell_offsets = ref_vertex_to_cell_offsets,
105 .edge_to_vertex = (yac_size_t_2_pointer)
106 &(ref_edge_to_vertex[0][0]),
107 .edge_type = ref_edge_type,
108 .num_total_cells = ref_num_cells,
109 .num_total_vertices = ref_num_vertices,
110 .num_total_edges = ref_num_edges
111 };
112
113 // generate basic grid data
114
117 num_cells, local_start, local_count,
118 with_halo);
119
120 // check basic grid data
121 utest_check_basic_grid_data(grid_data, ref_grid_data);
122 }
123
124 { // test grid with halo
125 double coordinates_x[] = {-3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0};
126 double coordinates_y[] = {-3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0};
127 size_t const num_cells[2] = {6, 6};
128 size_t local_start[2] = {2, 2};
129 size_t local_count[2] = {2, 2};
130 int with_halo = 1;
131
132 for (size_t i = 0; i < sizeof(coordinates_x)/sizeof(coordinates_x[0]); ++i)
134 for (size_t i = 0; i < sizeof(coordinates_y)/sizeof(coordinates_y[0]); ++i)
136
137 double ref_vertex_coordinates[25][3];
138 yac_int ref_cell_ids[16] = {7,8,9,10, 13,14,15,16, 19,20,21,22, 25,26,27,28};
139 yac_int ref_vertex_ids[25] = {8,9,10,11,12, 15,16,17,18,19, 22,23,24,25,26,
140 29,30,31,32,33, 36,37,38,39,40};
141 yac_int ref_edge_ids[40] = {15,16,17,18,19,20,21,22,24,
142 28,29,30,31,32,33,34,35,37,
143 41,42,43,44,45,46,47,48,50,
144 54,55,56,57,58,59,60,61,63,
145 67,69,71,73};
146 size_t ref_num_cells = 16;
147 size_t ref_num_vertices = 25;
148 size_t ref_num_edges = 40;
149 int ref_core_cell_mask[16] = {0,0,0,0,
150 0,1,1,0,
151 0,1,1,0,
152 0,0,0,0};
153 int ref_core_vertex_mask[25] = {0,0,0,0,0,
154 0,1,1,1,0,
155 0,1,1,1,0,
156 0,1,1,1,0,
157 0,0,0,0,0};
158 int ref_core_edge_mask[40] = {0,0,0,0,0,0,0,0,0,
159 0,0,1,1,1,1,0,1,0,
160 0,0,1,1,1,1,0,1,0,
161 0,0,1,0,1,0,0,0,0,
162 0,0,0,0};
163 int ref_num_vertices_per_cell[16] = {4,4,4,4,
164 4,4,4,4,
165 4,4,4,4,
166 4,4,4,4};
167 int ref_num_cells_per_vertex[25] = {1,2,2,2,1,
168 2,4,4,4,2,
169 2,4,4,4,2,
170 2,4,4,4,2,
171 1,2,2,2,1};
172 size_t ref_cell_to_vertex[16][4] =
173 {{0,1,6,5}, {1,2,7,6}, {2,3,8,7}, {3,4,9,8},
174 {5,6,11,10}, {6,7,12,11}, {7,8,13,12}, {8,9,14,13},
175 {10,11,16,15}, {11,12,17,16}, {12,13,18,17}, {13,14,19,18},
176 {15,16,21,20}, {16,17,22,21}, {17,18,23,22}, {18,19,24,23}};
177 size_t ref_cell_to_vertex_offsets[16] = {0,4,8,12,
178 16,20,24,28,
179 32,36,40,44,
180 48,52,56,60};
181 size_t ref_cell_to_edge[16][4] =
182 {{0,3,9,1}, {2,5,11,3}, {4,7,13,5}, {6,8,15,7},
183 {9,12,18,10}, {11,14,20,12}, {13,16,22,14}, {15,17,24,16},
184 {18,21,27,19}, {20,23,29,21}, {22,25,31,23}, {24,26,33,25},
185 {27,30,36,28}, {29,32,37,30}, {31,34,38,32}, {33,35,39,34}};
186 size_t ref_cell_to_edge_offsets[16] = {0,4,8,12,
187 16,20,24,28,
188 32,36,40,44,
189 48,52,56,60};
190 size_t ref_vertex_to_cell[] =
191 {0, 0,1, 1,2, 2,3, 3,
192 0,4, 0,1,4,5, 1,2,5,6, 2,3,6,7, 3,7,
193 4,8, 4,5,8,9, 5,6,9,10, 6,7,10,11, 7,11,
194 8,12, 8,9,12,13, 9,10,13,14, 10,11,14,15, 11,15,
195 12, 12,13, 13,14, 14,15, 15};
196 size_t ref_vertex_to_cell_offsets[25] = {0,
197 1,3,5,7,8,
198 10,14,18,22,24,
199 26,30,34,38,40,
200 42,46,50,54,56,
201 57,59,61,63};
202 size_t ref_edge_to_vertex[40][2] = {{0,1}, {0,5}, {1,2}, {1,6}, {2,3}, {2,7}, {3,4}, {3,8}, {4,9},
203 {5,6}, {5,10}, {6,7}, {6,11}, {7,8}, {7,12}, {8,9}, {8,13}, {9,14},
204 {10,11}, {10,15}, {11,12}, {11,16}, {12,13}, {12,17}, {13,14}, {13,18}, {14,19},
205 {15,16}, {15,20}, {16,17}, {16,21}, {17,18},{17,22}, {18,19}, {18,23}, {19,24},
206 {20,21}, {21,22}, {22,23}, {23,24}};
207 enum yac_edge_type ref_edge_type[40] = {
218
219#ifndef __NEC__
220 for (size_t i = 0, k = 0; i < local_count[1] + 1 + 2; ++i)
221 for (size_t j = 0; j < local_count[0] + 1 + 2; ++j, ++k)
222#else
223// NEC compiler optimizes the following loops out when
224// CFLAGS='-O2 -finline-functions' if they are specified
225// as above
226 for (size_t i = 0, k = 0; i < local_count[1] + 3; ++i)
227 for (size_t j = 0; j < local_count[0] + 3; ++j, ++k)
228#endif
229 LLtoXYZ(coordinates_x[local_start[0]-1+j],
230 coordinates_y[local_start[1]-1+i],
231 &(ref_vertex_coordinates[k][0]));
232
233 struct yac_basic_grid_data ref_grid_data = {
234 .vertex_coordinates = ref_vertex_coordinates,
235 .cell_ids = ref_cell_ids,
236 .vertex_ids = ref_vertex_ids,
237 .edge_ids = ref_edge_ids,
238 .num_cells = ref_num_cells,
239 .num_vertices = ref_num_vertices,
240 .num_edges = ref_num_edges,
241 .core_cell_mask = ref_core_cell_mask,
242 .core_vertex_mask = ref_core_vertex_mask,
243 .core_edge_mask = ref_core_edge_mask,
244 .num_vertices_per_cell = ref_num_vertices_per_cell,
245 .num_cells_per_vertex = ref_num_cells_per_vertex,
246 .cell_to_vertex = &(ref_cell_to_vertex[0][0]),
247 .cell_to_vertex_offsets = ref_cell_to_vertex_offsets,
248 .cell_to_edge = &(ref_cell_to_edge[0][0]),
249 .cell_to_edge_offsets = ref_cell_to_edge_offsets,
250 .vertex_to_cell = ref_vertex_to_cell,
251 .vertex_to_cell_offsets = ref_vertex_to_cell_offsets,
252 .edge_to_vertex = (yac_size_t_2_pointer)
253 &(ref_edge_to_vertex[0][0]),
254 .edge_type = ref_edge_type,
255 .num_total_cells = ref_num_cells,
256 .num_total_vertices = ref_num_vertices,
257 .num_total_edges = ref_num_edges
258 };
259
260 // generate basic grid data
261
264 num_cells, local_start, local_count,
265 with_halo);
266
267 // check basic grid data
268 utest_check_basic_grid_data(grid_data, ref_grid_data);
269 }
270
271 { // test grid, which is at the boundary of the global grid, with halo
272 double coordinates_x[] = {-2.0, -1.0, 0.0, 1.0, 2.0};
273 double coordinates_y[] = {-2.0, -1.0, 0.0, 1.0, 2.0};
274 size_t const num_cells[2] = {4, 4};
275 size_t local_start[2] = {0, 0};
276 size_t local_count[2] = {2, 2};
277 int with_halo = 1;
278
279 for (size_t i = 0; i < sizeof(coordinates_x)/sizeof(coordinates_x[0]); ++i)
281 for (size_t i = 0; i < sizeof(coordinates_y)/sizeof(coordinates_y[0]); ++i)
283
284 double ref_vertex_coordinates[16][3];
285 yac_int ref_cell_ids[9] = {0,1,2, 4,5,6, 8,9,10};
286 yac_int ref_vertex_ids[16] = {0,1,2,3, 5,6,7,8, 10,11,12,13, 15,16,17,18};
287 yac_int ref_edge_ids[24] = {0,1,2,3,4,5,7,
288 9,10,11,12,13,14,16,
289 18,19,20,21,22,23,25,
290 27,29,31};
291 size_t ref_num_cells = 9;
292 size_t ref_num_vertices = 16;
293 size_t ref_num_edges = 24;
294 int ref_core_cell_mask[9] = {1,1,0,
295 1,1,0,
296 0,0,0};
297 int ref_core_vertex_mask[16] = {1,1,1,0,
298 1,1,1,0,
299 1,1,1,0,
300 0,0,0,0};
301 int ref_core_edge_mask[24] = {1,1,1,1,0,1,0,
302 1,1,1,1,0,1,0,
303 1,0,1,0,0,0,0,
304 0,0,0};
305 int ref_num_vertices_per_cell[9] = {4,4,4,
306 4,4,4,
307 4,4,4};
308 int ref_num_cells_per_vertex[16] = {1,2,2,1,
309 2,4,4,2,
310 2,4,4,2,
311 1,2,2,1};
312 size_t ref_cell_to_vertex[9][4] =
313 {{0,1,5,4}, {1,2,6,5}, {2,3,7,6},
314 {4,5,9,8}, {5,6,10,9}, {6,7,11,10},
315 {8,9,13,12}, {9,10,14,13}, {10,11,15,14}};
316 size_t ref_cell_to_vertex_offsets[9] = {0,4,8, 12,16,20, 24,28,32};
317 size_t ref_cell_to_edge[9][4] =
318 {{0,3,7,1}, {2,5,9,3}, {4,6,11,5},
319 {7,10,14,8}, {9,12,16,10}, {11,13,18,12},
320 {14,17,21,15}, {16,19,22,17}, {18,20,23,19}};
321 size_t ref_cell_to_edge_offsets[9] = {0,4,8, 12,16,20, 24,28,32};
322 size_t ref_vertex_to_cell[] =
323 {0, 0,1, 1,2, 2,
324 0,3, 0,1,3,4, 1,2,4,5, 2,5,
325 3,6, 3,4,6,7, 4,5,7,8, 5,8,
326 6, 6,7, 7,8, 8};
327 size_t ref_vertex_to_cell_offsets[16] = {0,1,3,5,
328 6,8,12,16,
329 18,20,24,28,
330 30,31,33,35};
331 size_t ref_edge_to_vertex[24][2] = {{0,1}, {0,4}, {1,2}, {1,5}, {2,3}, {2,6}, {3,7},
332 {4,5}, {4,8}, {5,6}, {5,9}, {6,7}, {6,10}, {7,11},
333 {8,9}, {8,12}, {9,10}, {9,13}, {10,11}, {10,14}, {11,15},
334 {12,13}, {13,14}, {14,15}};
335
336 enum yac_edge_type ref_edge_type[24] = {
343
344#ifndef __NEC__
345 for (size_t i = 0, k = 0; i < local_count[1] + 1 + 1; ++i)
346 for (size_t j = 0; j < local_count[0] + 1 + 1; ++j, ++k)
347#else
348// NEC compiler optimizes the following loops out when
349// CFLAGS='-O2 -finline-functions' if they are specified
350// as above
351 for (size_t i = 0, k = 0; i < local_count[1] + 2; ++i)
352 for (size_t j = 0; j < local_count[0] + 2; ++j, ++k)
353#endif
354 LLtoXYZ(coordinates_x[local_start[0]+j],
355 coordinates_y[local_start[1]+i],
356 &(ref_vertex_coordinates[k][0]));
357
358 struct yac_basic_grid_data ref_grid_data = {
359 .vertex_coordinates = ref_vertex_coordinates,
360 .cell_ids = ref_cell_ids,
361 .vertex_ids = ref_vertex_ids,
362 .edge_ids = ref_edge_ids,
363 .num_cells = ref_num_cells,
364 .num_vertices = ref_num_vertices,
365 .num_edges = ref_num_edges,
366 .core_cell_mask = ref_core_cell_mask,
367 .core_vertex_mask = ref_core_vertex_mask,
368 .core_edge_mask = ref_core_edge_mask,
369 .num_vertices_per_cell = ref_num_vertices_per_cell,
370 .num_cells_per_vertex = ref_num_cells_per_vertex,
371 .cell_to_vertex = &(ref_cell_to_vertex[0][0]),
372 .cell_to_vertex_offsets = ref_cell_to_vertex_offsets,
373 .cell_to_edge = &(ref_cell_to_edge[0][0]),
374 .cell_to_edge_offsets = ref_cell_to_edge_offsets,
375 .vertex_to_cell = ref_vertex_to_cell,
376 .vertex_to_cell_offsets = ref_vertex_to_cell_offsets,
377 .edge_to_vertex = (yac_size_t_2_pointer)
378 &(ref_edge_to_vertex[0][0]),
379 .edge_type = ref_edge_type,
380 .num_total_cells = ref_num_cells,
381 .num_total_vertices = ref_num_vertices,
382 .num_total_edges = ref_num_edges
383 };
384
385 // generate basic grid data
386
389 num_cells, local_start, local_count,
390 with_halo);
391
392 // check basic grid data
393 utest_check_basic_grid_data(grid_data, ref_grid_data);
394 }
395
396 return TEST_EXIT_CODE;
397}
398
399
400static void utest_check_basic_grid_data(
402 struct yac_basic_grid_data ref_grid_data) {
403
404 if (grid_data.num_cells != ref_grid_data.num_cells)
405 PUT_ERR("wrong num_cells");
406 if (grid_data.num_vertices != ref_grid_data.num_vertices)
407 PUT_ERR("wrong num_vertices");
408 if (grid_data.num_edges != ref_grid_data.num_edges)
409 PUT_ERR("wrong num_edges");
410
411 for (size_t i = 0; i < ref_grid_data.num_vertices; ++i)
412 for (int j = 0; j < 3; ++j)
413 if (fabs(grid_data.vertex_coordinates[i][j] -
414 ref_grid_data.vertex_coordinates[i][j]) > 1e-9)
415 PUT_ERR("wrong grid_data.vertex_coordinates");
416
417 for (size_t i = 0; i < ref_grid_data.num_cells; ++i) {
418 if (grid_data.cell_ids[i] != ref_grid_data.cell_ids[i])
419 PUT_ERR("wrong cell_ids");
420 if (grid_data.core_cell_mask[i] != ref_grid_data.core_cell_mask[i])
421 PUT_ERR("wrong core_cell_mask");
422 if (grid_data.num_vertices_per_cell[i] != ref_grid_data.num_vertices_per_cell[i])
423 PUT_ERR("wrong num_vertices_per_cell");
424 if (grid_data.cell_to_vertex_offsets[i] != ref_grid_data.cell_to_vertex_offsets[i])
425 PUT_ERR("wrong cell_to_vertex_offsets");
426 for (int j = 0; j < ref_grid_data.num_vertices_per_cell[i]; ++j)
427 if (grid_data.cell_to_vertex[grid_data.cell_to_vertex_offsets[i]+j] !=
428 ref_grid_data.cell_to_vertex[ref_grid_data.cell_to_vertex_offsets[i]+j])
429 PUT_ERR("wrong cell_to_vertex");
430 if (grid_data.cell_to_edge_offsets[i] != ref_grid_data.cell_to_edge_offsets[i])
431 PUT_ERR("wrong cell_to_edge_offsets");
432 for (int j = 0; j < ref_grid_data.num_vertices_per_cell[i]; ++j)
433 if (grid_data.cell_to_edge[grid_data.cell_to_edge_offsets[i]+j] !=
434 ref_grid_data.cell_to_edge[ref_grid_data.cell_to_edge_offsets[i]+j])
435 PUT_ERR("wrong cell_to_edge");
436
437 }
438 for (size_t i = 0; i < ref_grid_data.num_vertices; ++i) {
439 if (grid_data.vertex_ids[i] != ref_grid_data.vertex_ids[i])
440 PUT_ERR("wrong vertex_ids");
441 if (grid_data.core_vertex_mask[i] != ref_grid_data.core_vertex_mask[i])
442 PUT_ERR("wrong core_vertex_mask");
443 if (grid_data.num_cells_per_vertex[i] != ref_grid_data.num_cells_per_vertex[i])
444 PUT_ERR("wrong num_cells_per_vertex");
445 if (grid_data.vertex_to_cell_offsets[i] != ref_grid_data.vertex_to_cell_offsets[i])
446 PUT_ERR("wrong vertex_to_cell_offsets");
447 for (int j = 0; j < ref_grid_data.num_cells_per_vertex[i]; ++j)
448 if (grid_data.vertex_to_cell[grid_data.vertex_to_cell_offsets[i]+j] !=
449 ref_grid_data.vertex_to_cell[ref_grid_data.vertex_to_cell_offsets[i]+j])
450 PUT_ERR("wrong vertex_to_cell");
451 }
452 for (size_t i = 0; i < ref_grid_data.num_edges; ++i) {
453 if (grid_data.edge_ids[i] != ref_grid_data.edge_ids[i])
454 PUT_ERR("wrong edge_ids");
455 if (grid_data.core_edge_mask[i] != ref_grid_data.core_edge_mask[i])
456 PUT_ERR("wrong core_edge_mask");
457 if (grid_data.edge_type[i] != ref_grid_data.edge_type[i])
458 PUT_ERR("wrong edge_type");
459 if (!(((grid_data.edge_to_vertex[i][0] == ref_grid_data.edge_to_vertex[i][0]) &&
460 (grid_data.edge_to_vertex[i][1] == ref_grid_data.edge_to_vertex[i][1])) ||
461 ((grid_data.edge_to_vertex[i][0] == ref_grid_data.edge_to_vertex[i][1]) &&
462 (grid_data.edge_to_vertex[i][1] == ref_grid_data.edge_to_vertex[i][0]))))
463 PUT_ERR("wrong edge_to_vertex");
464 }
465
466 if (grid_data.num_total_cells != ref_grid_data.num_total_cells)
467 PUT_ERR("wrong num_total_cells");
468 if (grid_data.num_total_vertices != ref_grid_data.num_total_vertices)
469 PUT_ERR("wrong num_total_vertices");
470 if (grid_data.num_total_edges != ref_grid_data.num_total_edges)
471 PUT_ERR("wrong num_total_edges");
472}
struct yac_basic_grid_data yac_generate_basic_grid_data_reg2d(double const *global_coords_x, double const *global_coords_y, size_t const num_global_cells_[2], size_t const local_start[2], size_t const local_count[2], int with_halo)
#define YAC_RAD
yac_edge_type
Definition grid_cell.h:12
@ YAC_LAT_CIRCLE_EDGE
latitude circle
Definition grid_cell.h:14
@ YAC_LON_CIRCLE_EDGE
longitude circle
Definition grid_cell.h:15
yac_coordinate_pointer vertex_coordinates
size_t * vertex_to_cell_offsets
yac_size_t_2_pointer edge_to_vertex
enum yac_edge_type * edge_type
size_t * cell_to_vertex_offsets
double coordinates_x[]
size_t num_cells[2]
double coordinates_y[]
#define TEST_EXIT_CODE
Definition tests.h:14
#define PUT_ERR(string)
Definition tests.h:10
static void LLtoXYZ(double lon, double lat, double p_out[])
Definition toy_scrip.c:587
YAC_INT yac_int
Definition yac_types.h:15
size_t(* yac_size_t_2_pointer)[2]
Definition yac_types.h:23