YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
basic_grid.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 BASIC_GRID_H
6#define BASIC_GRID_H
7
8#include "basic_grid_data.h"
9#include "location.h"
10#include "field_data.h"
11
12// YAC PUBLIC HEADER START
13
22
23struct yac_basic_grid;
24
26 char const * name, struct yac_basic_grid_data grid_data);
27struct yac_basic_grid * yac_basic_grid_empty_new(char const * name);
29 struct yac_basic_grid * grid, struct yac_interp_field field);
31 struct yac_basic_grid * grid, struct yac_interp_field field);
33 struct yac_basic_grid * grid, enum yac_location location);
34char const * yac_basic_grid_get_name(struct yac_basic_grid * grid);
36 struct yac_basic_grid * grid);
38 struct yac_basic_grid * grid, enum yac_location location);
40 struct yac_basic_grid * grid, enum yac_location location);
42 struct yac_basic_grid * grid, enum yac_location location,
43 char const * mask_name);
45 struct yac_basic_grid * grid, enum yac_location location,
48 struct yac_basic_grid * grid, enum yac_location location,
51 struct yac_basic_grid * grid, enum yac_location location,
52 int const * mask, size_t count, char const * mask_name);
54 struct yac_basic_grid * grid, enum yac_location location,
55 int const * mask, char const * mask_name);
56void yac_basic_grid_delete(struct yac_basic_grid * grid);
57
59 char const * name, size_t nbr_vertices[2], int cyclic[2],
60 double *lon_vertices, double *lat_vertices);
61
63 char const * name, size_t nbr_vertices[2], int cyclic[2],
64 double *lon_vertices, double *lat_vertices);
65
67 char const * name, size_t nbr_vertices[2], int cyclic[2],
68 double *lon_vertices, double *lat_vertices);
69
71 char const * name, size_t nbr_vertices[2], int cyclic[2],
72 double *lon_vertices, double *lat_vertices);
73
75 char const * name, size_t nbr_vertices, size_t nbr_cells,
76 int *num_vertices_per_cell, double *x_vertices, double *y_vertices,
77 int *cell_to_vertex);
78
80 char const * name, size_t nbr_vertices, size_t nbr_cells,
81 int *num_vertices_per_cell, double *x_vertices, double *y_vertices,
82 int *cell_to_vertex);
83
85 char const * name, size_t nbr_vertices, size_t nbr_cells,
86 int *num_vertices_per_cell, double *x_vertices, double *y_vertices,
87 int *cell_to_vertex);
88
90 char const * name, size_t nbr_vertices, size_t nbr_cells,
91 int *num_vertices_per_cell, double *x_vertices, double *y_vertices,
92 int *cell_to_vertex);
93
95 char const * name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges,
96 int *num_edges_per_cell, double *x_vertices, double *y_vertices,
97 int *cell_to_edge, int *edge_to_vertex);
98
100 char const * name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges,
101 int *num_edges_per_cell, double *x_vertices, double *y_vertices,
102 int *cell_to_edge, int *edge_to_vertex);
103
105 char const * name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges,
106 int *num_edges_per_cell, double *x_vertices, double *y_vertices,
107 int *cell_to_edge, int *edge_to_vertex);
108
110 char const * name, size_t nbr_vertices, size_t nbr_cells, size_t nbr_edges,
111 int *num_edges_per_cell, double *x_vertices, double *y_vertices,
112 int *cell_to_edge, int *edge_to_vertex);
113
115 char const * name, size_t nbr_points, double *x_points, double *y_points);
116
118 char const * name, size_t nbr_points, double *x_points, double *y_points);
119
121 struct yac_basic_grid * grid, char const * filename, MPI_Comm comm);
122
124 struct yac_basic_grid * grid, double * cell_areas);
125
126// YAC PUBLIC HEADER STOP
127
128#endif // BASIC_GRID_H
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)
Definition basic_grid.c:420
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)
Definition basic_grid.c:446
struct yac_field_data * yac_basic_grid_get_field_data(struct yac_basic_grid *grid, enum yac_location location)
Definition basic_grid.c:309
size_t yac_basic_grid_get_named_mask_idx(struct yac_basic_grid *grid, enum yac_location location, char const *mask_name)
Definition basic_grid.c:177
int const * yac_basic_grid_get_field_mask(struct yac_basic_grid *grid, struct yac_interp_field field)
Definition basic_grid.c:118
struct yac_basic_grid * yac_basic_grid_new(char const *name, struct yac_basic_grid_data grid_data)
Definition basic_grid.c:50
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)
Definition basic_grid.c:335
void yac_basic_grid_to_file_parallel(struct yac_basic_grid *grid, char const *filename, MPI_Comm comm)
Definition basic_grid.c:742
struct yac_basic_grid * yac_basic_grid_cloud_new(char const *name, size_t nbr_points, double *x_points, double *y_points)
Definition basic_grid.c:472
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)
Definition basic_grid.c:381
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)
Definition basic_grid.c:368
yac_const_coordinate_pointer yac_basic_grid_get_field_coordinates(struct yac_basic_grid *grid, struct yac_interp_field field)
Definition basic_grid.c:81
struct yac_basic_grid_data * yac_basic_grid_get_data(struct yac_basic_grid *grid)
Definition basic_grid.c:137
struct yac_basic_grid * yac_basic_grid_cloud_deg_new(char const *name, size_t nbr_points, double *x_points, double *y_points)
Definition basic_grid.c:481
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)
Definition basic_grid.c:433
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)
Definition basic_grid.c:284
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)
Definition basic_grid.c:324
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)
Definition basic_grid.c:394
size_t yac_basic_grid_add_coordinates_nocpy(struct yac_basic_grid *grid, enum yac_location location, yac_coordinate_pointer coordinates)
Definition basic_grid.c:208
char const * yac_basic_grid_get_name(struct yac_basic_grid *grid)
Definition basic_grid.c:128
void yac_basic_grid_compute_cell_areas(struct yac_basic_grid *grid, double *cell_areas)
size_t yac_basic_grid_add_coordinates(struct yac_basic_grid *grid, enum yac_location location, yac_coordinate_pointer coordinates, size_t count)
Definition basic_grid.c:232
size_t yac_basic_grid_get_data_size(struct yac_basic_grid *grid, enum yac_location location)
Definition basic_grid.c:147
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)
Definition basic_grid.c:407
int const * yac_basic_grid_get_core_mask(struct yac_basic_grid *grid, enum yac_location location)
Definition basic_grid.c:101
struct yac_basic_grid * yac_basic_grid_empty_new(char const *name)
Definition basic_grid.c:63
void yac_basic_grid_delete(struct yac_basic_grid *grid)
Definition basic_grid.c:70
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)
Definition basic_grid.c:346
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)
Definition basic_grid.c:357
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)
Definition basic_grid.c:459
size_t yac_basic_grid_add_mask_nocpy(struct yac_basic_grid *grid, enum yac_location location, int const *mask, char const *mask_name)
Definition basic_grid.c:258
yac_location
Definition location.h:12
yac_coordinate_pointer * coordinates
Definition field_data.c:16
enum yac_location location
Definition basic_grid.h:18
size_t coordinates_idx
Definition basic_grid.h:19
double const (* yac_const_coordinate_pointer)[3]
Definition yac_types.h:20
double(* yac_coordinate_pointer)[3]
Definition yac_types.h:19