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

Go to the source code of this file.

Macros

#define YAC_RAD   (0.01745329251994329576923690768489)
 

Functions

static void gen_weight_file (void)
 
void compute_weights_callback (double const tgt_coords[3], int src_cell_id, size_t src_cell_idx, int const **global_results_points, double **result_weights, size_t *result_count, void *user_data)
 

Variables

int n_cells [2] = {32, 16}
 
int n_corners [2] = {32+1, 16+1}
 
int cyclic [2] = {0, 0}
 
double * data
 
double * corner_lon
 
double * corner_lat
 
double * cell_lon
 
double * cell_lat
 
int timestep_counter
 
char const * weight_file_name = "test_dynamic_config_c.nc"
 
char const * weight_file_name_dummy = "test_dynamic_config_dummy_c.nc"
 
int comp_id
 
int point_id
 
char const * test_config_filename_yaml
 
char const * test_config_filename_json
 
char const * grid_output_filename = "test_dynamic_config_c_grids.nc"
 

Detailed Description

Test
This example tests the usage of the interface for the dynamic configuration.

Definition in file test_dynamic_config_c.c.

Macro Definition Documentation

◆ YAC_RAD

#define YAC_RAD   (0.01745329251994329576923690768489)

Definition at line 22 of file test_dynamic_config_c.c.

Function Documentation

◆ compute_weights_callback()

static void compute_weights_callback ( double const tgt_coords[3],
int src_cell_id,
size_t src_cell_idx,
int const ** global_results_points,
double ** result_weights,
size_t * result_count,
void * user_data )

Definition at line 59 of file test_dynamic_config_c.c.

◆ gen_weight_file()

static void gen_weight_file ( void )
static

Definition at line 495 of file test_dynamic_config_c.c.

Here is the call graph for this function:

Variable Documentation

◆ cell_lat

double * cell_lat

Definition at line 46 of file test_dynamic_config_c.c.

◆ cell_lon

double * cell_lon

Definition at line 46 of file test_dynamic_config_c.c.

◆ comp_id

int comp_id

Definition at line 50 of file test_dynamic_config_c.c.

◆ corner_lat

double * corner_lat

Definition at line 46 of file test_dynamic_config_c.c.

◆ corner_lon

double * corner_lon

Definition at line 46 of file test_dynamic_config_c.c.

◆ cyclic

int cyclic[2] = {0, 0}

Definition at line 45 of file test_dynamic_config_c.c.

◆ data

double* data

Definition at line 46 of file test_dynamic_config_c.c.

◆ grid_output_filename

char const* grid_output_filename = "test_dynamic_config_c_grids.nc"

Definition at line 57 of file test_dynamic_config_c.c.

◆ n_cells

int n_cells[2] = {32, 16}

Definition at line 43 of file test_dynamic_config_c.c.

◆ n_corners

int n_corners[2] = {32+1, 16+1}

Definition at line 44 of file test_dynamic_config_c.c.

◆ point_id

int point_id

Definition at line 50 of file test_dynamic_config_c.c.

◆ test_config_filename_json

char const* test_config_filename_json
Initial value:
=
"test_dynamic_config_c.json"

Definition at line 54 of file test_dynamic_config_c.c.

◆ test_config_filename_yaml

char const* test_config_filename_yaml
Initial value:
=
"test_dynamic_config_c.yaml"

Definition at line 52 of file test_dynamic_config_c.c.

◆ timestep_counter

int timestep_counter

Definition at line 47 of file test_dynamic_config_c.c.

◆ weight_file_name

char const* weight_file_name = "test_dynamic_config_c.nc"

Definition at line 48 of file test_dynamic_config_c.c.

◆ weight_file_name_dummy

char const* weight_file_name_dummy = "test_dynamic_config_dummy_c.nc"

Definition at line 49 of file test_dynamic_config_c.c.