YAC 3.8.0
Yet Another Coupler
Loading...
Searching...
No Matches
toy_coupling.c File Reference
#include <mpi.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "yac.h"
#include "yac_core.h"
#include "yac_utils.h"
Include dependency graph for toy_coupling.c:

Go to the source code of this file.

Data Structures

struct  point_with_index
 

Macros

#define EXACT
 
#define YAC_RAD   (0.01745329251994329576923690768489)
 
#define STR_USAGE   "Usage: %s -c configFilename -g gridPath\n"
 
#define YAC_ASSERT_ARGS(exp, msg)
 

Functions

static void dummy_compA (char const *configFilename, char const *gridPath)
 
static void dummy_compB (char const *configFilename)
 
static void parse_arguments (int argc, char **argv, char const **configFilenamem, char const **gridPath)
 
static void LLtoXYZ (double lon, double lat, double p_out[])
 
static int compare_point_with_index (const void *a, const void *b)
 
static void remove_duplicated_vertices (double *temp_vertex_lon, double *temp_vertex_lat, int *temp_nbr_vertices, int *old_to_new_id)
 
static void read_compA_grid_data (char const *gridPath, int *nbr_vertices, int *nbr_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **buffer_lonv, double **buffer_latv, double **buffer_lon, double **buffer_lat)
 

Variables

const char * fieldName []
 
const int no_of_fields = 2
 
int info
 
int ierror
 
int comp_id
 
int comp_ids [1]
 
int cell_point_id
 
int grid_id
 
int nbr_fields
 
double * recv_buffer
 
double * send_buffer
 
double * buffer = NULL
 
int * global_index
 
int * cell_core_mask
 
int * field_id
 

Macro Definition Documentation

◆ EXACT

#define EXACT

Definition at line 5 of file toy_coupling.c.

◆ STR_USAGE

#define STR_USAGE   "Usage: %s -c configFilename -g gridPath\n"

Definition at line 49 of file toy_coupling.c.

◆ YAC_ASSERT_ARGS

#define YAC_ASSERT_ARGS ( exp,
msg )
Value:
{ \
if(!((exp))) { \
fprintf(stderr, "ERROR: %s\n" STR_USAGE, msg, argv[0]); \
exit(EXIT_FAILURE); \
} \
}
#define STR_USAGE

Definition at line 50 of file toy_coupling.c.

◆ YAC_RAD

#define YAC_RAD   (0.01745329251994329576923690768489)

Definition at line 19 of file toy_coupling.c.

Function Documentation

◆ compare_point_with_index()

static int compare_point_with_index ( const void * a,
const void * b )
static

Definition at line 96 of file toy_coupling.c.

Here is the caller graph for this function:

◆ dummy_compA()

static void dummy_compA ( char const * configFilename,
char const * gridPath )
static

Definition at line 337 of file toy_coupling.c.

Here is the call graph for this function:

◆ dummy_compB()

static void dummy_compB ( char const * configFilename)
static

Definition at line 506 of file toy_coupling.c.

Here is the call graph for this function:

◆ LLtoXYZ()

static void LLtoXYZ ( double lon,
double lat,
double p_out[] )
inlinestatic

Definition at line 755 of file toy_coupling.c.

Here is the caller graph for this function:

◆ parse_arguments()

static void parse_arguments ( int argc,
char ** argv,
char const ** configFilenamem,
char const ** gridPath )
static

Definition at line 736 of file toy_coupling.c.

◆ read_compA_grid_data()

static void read_compA_grid_data ( char const * gridPath,
int * nbr_vertices,
int * nbr_cells,
int ** num_vertices_per_cell,
int ** cell_to_vertex,
double ** buffer_lonv,
double ** buffer_latv,
double ** buffer_lon,
double ** buffer_lat )
static

Definition at line 185 of file toy_coupling.c.

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

◆ remove_duplicated_vertices()

static void remove_duplicated_vertices ( double * temp_vertex_lon,
double * temp_vertex_lat,
int * temp_nbr_vertices,
int * old_to_new_id )
static

Definition at line 117 of file toy_coupling.c.

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

Variable Documentation

◆ buffer

double* buffer = NULL
Examples
dummy_atmosphere_c.c, and dummy_ocean_c.c.

Definition at line 39 of file toy_coupling.c.

◆ cell_core_mask

int* cell_core_mask
Examples
dummy_atmosphere_c.c, dummy_io_c.c, and dummy_ocean_c.c.

Definition at line 42 of file toy_coupling.c.

◆ cell_point_id

int cell_point_id

Definition at line 30 of file toy_coupling.c.

◆ comp_id

int comp_id
Examples
dummy_atmosphere_c.c, dummy_io_c.c, and dummy_ocean_c.c.

Definition at line 27 of file toy_coupling.c.

◆ comp_ids

int comp_ids[1]

Definition at line 28 of file toy_coupling.c.

◆ field_id

int* field_id
Examples
dummy_atmosphere_c.c, dummy_io_c.c, and dummy_ocean_c.c.

Definition at line 44 of file toy_coupling.c.

◆ fieldName

const char* fieldName[]
Initial value:
= { "AtoB",
"BtoA"}

Definition at line 21 of file toy_coupling.c.

◆ global_index

int* global_index
Examples
dummy_atmosphere_c.c, dummy_io_c.c, and dummy_ocean_c.c.

Definition at line 41 of file toy_coupling.c.

◆ grid_id

int grid_id
Examples
dummy_atmosphere_c.c, and dummy_ocean_c.c.

Definition at line 32 of file toy_coupling.c.

◆ ierror

int ierror
Examples
dummy_atmosphere_c.c, and dummy_ocean_c.c.

Definition at line 26 of file toy_coupling.c.

◆ info

int info
Examples
dummy_atmosphere_c.c, and dummy_ocean_c.c.

Definition at line 26 of file toy_coupling.c.

◆ nbr_fields

int nbr_fields

Definition at line 34 of file toy_coupling.c.

◆ no_of_fields

const int no_of_fields = 2
Examples
dummy_atmosphere_c.c, dummy_io_c.c, and dummy_ocean_c.c.

Definition at line 24 of file toy_coupling.c.

◆ recv_buffer

double* recv_buffer

Definition at line 36 of file toy_coupling.c.

◆ send_buffer

double* send_buffer

Definition at line 37 of file toy_coupling.c.