YetAnotherCoupler 2.4.3
Data Structures | Macros | Typedefs | Enumerations | Functions
grid.h File Reference
#include "utils.h"
#include "grid_cell.h"
Include dependency graph for grid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yac_field_data
 
struct  yac_field_data_set
 
struct  interp_field
 
struct  basic_grid_data
 

Macros

#define YAC_MAX_LOC_STR_LEN   10
 
#define M_PI   3.14159265358979323846264338327950288 /* pi */
 
#define M_PI_2   1.57079632679489661923132169163975144 /* pi/2 */
 
#define YAC_EARTH_RADIUS   (6371.2290)
 
#define YAC_EARTH_RADIUS2   ((6371.2290 * 6371.2290) * 0.5)
 
#define YAC_RAD   (0.01745329251994329576923690768489)
 

Typedefs

typedef size_t(* size_t_2_pointer)[2]
 

Enumerations

enum  yac_location {
  CELL = 0 , CORNER = 1 , EDGE = 2 , LOC_UNDEFINED = 3 ,
  LOC_INVALID = 4
}
 

Functions

struct 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 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 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 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 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 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_gridyac_basic_grid_new (char const *name, struct basic_grid_data grid_data)
 
coordinate_pointer yac_basic_grid_get_field_coordinates (struct yac_basic_grid *grid, struct interp_field field)
 
int const * yac_basic_grid_get_field_mask (struct yac_basic_grid *grid, struct interp_field field)
 
char const * yac_basic_grid_get_name (struct yac_basic_grid *grid)
 
struct basic_grid_datayac_basic_grid_get_data (struct yac_basic_grid *grid)
 
struct yac_field_datayac_basic_grid_get_field_data (struct yac_basic_grid *grid, enum yac_location location)
 
size_t yac_basic_grid_get_data_size (struct yac_basic_grid *grid, enum yac_location location)
 
size_t yac_basic_grid_add_coordinates (struct yac_basic_grid *grid, enum yac_location location, coordinate_pointer coordinates, size_t count)
 
size_t yac_basic_grid_add_coordinates_nocpy (struct yac_basic_grid *grid, enum yac_location location, coordinate_pointer coordinates)
 
size_t yac_basic_grid_add_mask (struct yac_basic_grid *grid, enum yac_location location, int const *mask, size_t count)
 
size_t yac_basic_grid_add_mask_nocpy (struct yac_basic_grid *grid, enum yac_location location, int const *mask)
 
void yac_basic_grid_delete (struct yac_basic_grid *grid)
 
void yac_basic_grid_data_free (struct basic_grid_data grid)
 
enum yac_location yac_str2loc (char const *location)
 
char const * yac_loc2str (enum yac_location location)
 
enum yac_location yac_get_location (int const location)
 
struct yac_field_data yac_field_data_init ()
 
size_t yac_field_data_add_mask_nocpy (struct yac_field_data *field_data, int const *mask)
 
size_t yac_field_data_add_coordinates_nocpy (struct yac_field_data *field_data, coordinate_pointer coordinates)
 
struct yac_field_data_set yac_field_data_set_init ()
 
size_t yac_field_data_set_add_mask (struct yac_field_data_set *field_data_set, enum yac_location location, int const *mask, size_t count)
 
size_t yac_field_data_set_add_coordinates (struct yac_field_data_set *field_data_set, enum yac_location location, coordinate_pointer coordinates, size_t count)
 
size_t yac_field_data_set_add_mask_nocpy (struct yac_field_data_set *field_data_set, enum yac_location location, int const *mask)
 
size_t yac_field_data_set_add_coordinates_nocpy (struct yac_field_data_set *field_data_set, enum yac_location location, coordinate_pointer coordinates)
 
void yac_field_data_set_free (struct yac_field_data_set field_data_set)
 

Detailed Description

Version
1.0
Author
Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Rene Redler rene..nosp@m.redl.nosp@m.er@mp.nosp@m.imet.nosp@m..mpg..nosp@m.de

Definition in file grid.h.

Macro Definition Documentation

◆ M_PI

#define M_PI   3.14159265358979323846264338327950288 /* pi */
Examples
test_angle.c, test_geometry.c, and test_point_sphere_part.c.

Definition at line 68 of file grid.h.

◆ M_PI_2

#define M_PI_2   1.57079632679489661923132169163975144 /* pi/2 */
Examples
test_area.c, test_geometry.c, and test_point_sphere_part.c.

Definition at line 72 of file grid.h.

◆ YAC_EARTH_RADIUS

#define YAC_EARTH_RADIUS   (6371.2290)
Examples
test_area.c.

Definition at line 75 of file grid.h.

◆ YAC_EARTH_RADIUS2

#define YAC_EARTH_RADIUS2   ((6371.2290 * 6371.2290) * 0.5)

Definition at line 76 of file grid.h.

◆ YAC_MAX_LOC_STR_LEN

#define YAC_MAX_LOC_STR_LEN   10

Definition at line 53 of file grid.h.

◆ YAC_RAD

#define YAC_RAD   (0.01745329251994329576923690768489)

Typedef Documentation

◆ size_t_2_pointer

typedef size_t(* size_t_2_pointer)[2]
Examples
test_dist_grid_utils.c.

Definition at line 79 of file grid.h.

Enumeration Type Documentation

◆ yac_location

Enumerator
CELL 
CORNER 
EDGE 
LOC_UNDEFINED 
LOC_INVALID 

Definition at line 55 of file grid.h.

Function Documentation

◆ yac_basic_grid_add_coordinates()

size_t yac_basic_grid_add_coordinates ( struct yac_basic_grid grid,
enum yac_location  location,
coordinate_pointer  coordinates,
size_t  count 
)

Definition at line 246 of file grid.c.

Here is the call graph for this function:

◆ yac_basic_grid_add_coordinates_nocpy()

size_t yac_basic_grid_add_coordinates_nocpy ( struct yac_basic_grid grid,
enum yac_location  location,
coordinate_pointer  coordinates 
)

Definition at line 237 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_add_mask()

size_t yac_basic_grid_add_mask ( struct yac_basic_grid grid,
enum yac_location  location,
int const *  mask,
size_t  count 
)

Definition at line 264 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_add_mask_nocpy()

size_t yac_basic_grid_add_mask_nocpy ( struct yac_basic_grid grid,
enum yac_location  location,
int const *  mask 
)

Definition at line 255 of file grid.c.

Here is the call graph for this function:

◆ yac_basic_grid_data_free()

void yac_basic_grid_data_free ( struct basic_grid_data  grid)

Definition at line 280 of file grid.c.

Here is the caller graph for this function:

◆ yac_basic_grid_delete()

void yac_basic_grid_delete ( struct yac_basic_grid grid)

Definition at line 102 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_get_data()

struct basic_grid_data * yac_basic_grid_get_data ( struct yac_basic_grid grid)

Definition at line 202 of file grid.c.

Here is the caller graph for this function:

◆ yac_basic_grid_get_data_size()

size_t yac_basic_grid_get_data_size ( struct yac_basic_grid grid,
enum yac_location  location 
)

Definition at line 221 of file grid.c.

Here is the caller graph for this function:

◆ yac_basic_grid_get_field_coordinates()

coordinate_pointer yac_basic_grid_get_field_coordinates ( struct yac_basic_grid grid,
struct interp_field  field 
)

Definition at line 156 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_get_field_data()

struct yac_field_data * yac_basic_grid_get_field_data ( struct yac_basic_grid grid,
enum yac_location  location 
)

Definition at line 273 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_get_field_mask()

int const * yac_basic_grid_get_field_mask ( struct yac_basic_grid grid,
struct interp_field  field 
)

Definition at line 182 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_basic_grid_get_name()

char const * yac_basic_grid_get_name ( struct yac_basic_grid grid)

Definition at line 197 of file grid.c.

Here is the caller graph for this function:

◆ yac_basic_grid_new()

struct yac_basic_grid * yac_basic_grid_new ( char const *  name,
struct basic_grid_data  grid_data 
)

Definition at line 87 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_add_coordinates_nocpy()

size_t yac_field_data_add_coordinates_nocpy ( struct yac_field_data field_data,
coordinate_pointer  coordinates 
)

Definition at line 322 of file grid.c.

Here is the caller graph for this function:

◆ yac_field_data_add_mask_nocpy()

size_t yac_field_data_add_mask_nocpy ( struct yac_field_data field_data,
int const *  mask 
)

Definition at line 310 of file grid.c.

Here is the caller graph for this function:

◆ yac_field_data_init()

struct yac_field_data yac_field_data_init ( )

Definition at line 302 of file grid.c.

Here is the caller graph for this function:

◆ yac_field_data_set_add_coordinates()

size_t yac_field_data_set_add_coordinates ( struct yac_field_data_set field_data_set,
enum yac_location  location,
coordinate_pointer  coordinates,
size_t  count 
)

Definition at line 373 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_set_add_coordinates_nocpy()

size_t yac_field_data_set_add_coordinates_nocpy ( struct yac_field_data_set field_data_set,
enum yac_location  location,
coordinate_pointer  coordinates 
)

Definition at line 364 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_set_add_mask()

size_t yac_field_data_set_add_mask ( struct yac_field_data_set field_data_set,
enum yac_location  location,
int const *  mask,
size_t  count 
)

Definition at line 352 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_set_add_mask_nocpy()

size_t yac_field_data_set_add_mask_nocpy ( struct yac_field_data_set field_data_set,
enum yac_location  location,
int const *  mask 
)

Definition at line 343 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_set_free()

void yac_field_data_set_free ( struct yac_field_data_set  field_data_set)

Definition at line 397 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_field_data_set_init()

struct yac_field_data_set yac_field_data_set_init ( )

Definition at line 335 of file grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_generate_basic_grid_data_curve_2d()

struct basic_grid_data yac_generate_basic_grid_data_curve_2d ( size_t  nbr_vertices[2],
int  cyclic[2],
double *  lon_vertices,
double *  lat_vertices 
)

Definition at line 84 of file grid_curve2d.c.

Here is the call graph for this function:

◆ yac_generate_basic_grid_data_curve_2d_deg()

struct 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 
)
Examples
test_grid.c.

Definition at line 93 of file grid_curve2d.c.

Here is the call graph for this function:

◆ yac_generate_basic_grid_data_reg_2d()

struct basic_grid_data yac_generate_basic_grid_data_reg_2d ( size_t  nbr_vertices[2],
int  cyclic[2],
double *  lon_vertices,
double *  lat_vertices 
)

Definition at line 105 of file grid_reg2d.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_generate_basic_grid_data_reg_2d_deg()

struct 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 
)

◆ yac_generate_basic_grid_data_unstruct()

struct 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 
)
Examples
test_interp_method_avg_parallel.c.

Definition at line 184 of file grid_unstruct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_generate_basic_grid_data_unstruct_deg()

struct 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 
)
Examples
test_dist_grid_pair_parallel.c, test_grid.c, and test_interp_method_avg_parallel.c.

Definition at line 194 of file grid_unstruct.c.

Here is the call graph for this function:

◆ yac_get_location()

enum yac_location yac_get_location ( int const  location)

Definition at line 145 of file grid.c.

Here is the caller graph for this function:

◆ yac_loc2str()

char const * yac_loc2str ( enum yac_location  location)

Definition at line 134 of file grid.c.

Here is the caller graph for this function:

◆ yac_str2loc()

enum yac_location yac_str2loc ( char const *  location)

Definition at line 117 of file grid.c.

Here is the caller graph for this function: