A test for internal interpolation routines.
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <mpi.h>
#include "tests.h"
#include "test_common.h"
#include "dist_grid_utils.h"
#define YAC_RAD (0.01745329251994329576923690768489)
static void submain_1(
static void submain_2(
int main(
int argc,
char *argv[]) {
if (argc != 2) {
PUT_ERR("wrong number of arguments\n");
return TEST_EXIT_CODE;
}
PUT_ERR("invalid argument (has to be either \"src\" or \"tgt\")\n");
return TEST_EXIT_CODE;
}
MPI_Init(NULL, NULL);
xt_initialize(MPI_COMM_WORLD);
int comm_rank, comm_size;
MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank);
MPI_Comm_size(MPI_COMM_WORLD, &comm_size);
MPI_Barrier(MPI_COMM_WORLD);
if (comm_size != 4) {
PUT_ERR("ERROR: wrong number of processes");
xt_finalize();
MPI_Finalize();
return TEST_EXIT_CODE;
}
int comp_flag = comm_rank < 2;
MPI_Comm split_comm;
MPI_Comm_split(MPI_COMM_WORLD, comp_flag, 0, &split_comm);
if (comp_flag) submain_1(split_comm, reorder_type);
else submain_2(split_comm, reorder_type);
MPI_Comm_free(&split_comm);
xt_finalize();
MPI_Finalize();
return TEST_EXIT_CODE;
}
static void submain_2(
char const local_grid_name[] = "grid2";
char const remote_grid_name[] = "grid1";
int my_rank;
MPI_Comm_rank(comp_comm, &my_rank);
double coordinates_x[] = {0.0, 1.0, 2.0, 3.0, 4.0};
double coordinates_y[] = {0.0, 1.0, 2.0, 3.0, 4.0};
double edge_coordinates_x[] = {
0.25,0.0,1.25,1.0,2.25,2.0,3.25,3.0,4.0,
0.25,0.0,1.25,1.0,2.25,2.0,3.25,3.0,4.0,
0.25,0.0,1.25,1.0,2.25,2.0,3.25,3.0,4.0,
0.25,0.0,1.25,1.0,2.25,2.0,3.25,3.0,4.0,
0.25,1.25,2.25,3.25};
double edge_coordinates_y[] = {
0.0,0.25,0.0,0.25,0.0,0.25,0.0,0.25,0.25,
1.0,1.25,1.0,1.25,1.0,1.25,1.0,1.25,1.25,
2.0,2.25,2.0,2.25,2.0,2.25,2.0,2.25,2.25,
3.0,3.25,3.0,3.25,3.0,3.25,3.0,3.25,3.25,
4.0,4.0,4.0,4.0};
double edge_coords[40][3];
size_t const num_cells[2] = {4,4};
size_t local_start[2][2] = {{0,0},{2,0}};
size_t local_count[2][2] = {{2,4},{2,4}};
int with_halo = 1;
for (
size_t i = 0; i <= num_cells[0]; ++i) coordinates_x[i] *=
YAC_RAD;
for (
size_t i = 0; i <= num_cells[1]; ++i) coordinates_y[i] *=
YAC_RAD;
for (size_t i = 0; i < 40; ++i)
LLtoXYZ_deg(edge_coordinates_x[i], edge_coordinates_y[i], edge_coords[i]);
yac_generate_basic_grid_data_reg2d(
local_start[my_rank], local_count[my_rank], with_halo);
yac_int masked_corner_ids[] = {10,11,12,15,16,17};
size_t num_masked_corners =
sizeof(masked_corner_ids)/sizeof(masked_corner_ids[0]);
int * corner_mask =
xmalloc(num_vertices *
sizeof(*corner_mask));
for (size_t i = 0; i < num_vertices; ++i) {
corner_mask[i] = 1;
for (size_t j = 0; j < num_masked_corners; ++j)
if (grid_data.
vertex_ids[i] == masked_corner_ids[j]) corner_mask[i] = 0;
}
yac_int masked_edge_ids[] = {18,19,20,21,23,27,29};
size_t num_masked_edges =
sizeof(masked_edge_ids)/sizeof(masked_edge_ids[0]);
int * edge_mask =
xmalloc(num_edges *
sizeof(*edge_mask));
for (size_t i = 0; i < num_edges; ++i) {
edge_mask[i] = 1;
for (size_t j = 0; j < num_masked_edges; ++j)
if (grid_data.
edge_ids[i] == masked_edge_ids[j]) edge_mask[i] = 0;
}
xmalloc(num_edges *
sizeof(*edge_field_coords));
for (size_t i = 0; i < num_edges; ++i)
memcpy(edge_field_coords[i], edge_coords[grid_data.
edge_ids[i]],
3 * sizeof(double));
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_out, reorder_type, 1,
weights_in, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {1338,1338,1338,1338,1338,
1338, 3, 4, 5, 6,
1338, 8, 9, 10, 11,
1338, 13, 14, 15, 16,
1338, 18, 19, 20, 21};
for (size_t i = 0; i < num_vertices; ++i) {
if (double_are_unequal(
target_data[0][i],
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_out, reorder_type, 1,
weights_in, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {1338,1338,1338,1338,1338,
1338, 3,1338,1338,1338,
1338, 8,1338,1338,1338,
1338, 13,1338,1338,1338,
1338, 18, 19, 20, 21};
for (size_t i = 0; i < num_vertices; ++i) {
if (double_are_unequal(
target_data[0][i],
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_out, reorder_type, 1,
weights_in, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {1338,1338, 1338,1338,1338,
1338, 3, 3, 2.5, 3.5,
1338, 8, 8.5,1338,1338,
1338, 13,44.0/3.0,17.5,18.5,
1338, 18, 19, 20, 21};
for (size_t i = 0; i < num_vertices; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
vertex_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_out =
num_src_fields, src_fields, tgt_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_in =
num_src_fields, src_fields, tgt_field);
}
NULL};
NULL};
weights_out, reorder_type, 1,
weights_in, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {1338,1338,1338,1338,1338,
1338, 3, 3, 2.5, 3.5,
-1, -1, -1,1338,1338,
-1, -1, -1,17.5,18.5,
1338, 18, 19, 20, 21};
for (size_t i = 0; i < num_vertices; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
vertex_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_out =
num_src_fields, src_fields, tgt_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_in =
num_src_fields, src_fields, tgt_field);
}
NULL};
NULL};
weights_out, reorder_type, 1,
weights_in, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_edges *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_edges; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {
1338,1338,1338,1338, 1338, 1338,1338,1338,1338,
1338,1338, 3, 3, 3, 3, 2.5, 2.5, 3.5,
-1, -1, -1, -1, 8.5, -1,1338,1338,1338,
-1,1338, -1, 13,44.0/3.0,44.0/3.0,17.5,17.5,18.5,
1338, 18, 19, 20};
for (size_t i = 0; i < num_edges; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
edge_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid =
num_src_fields, src_fields, tgt_field);
}
NULL};
double frac_mask_value = -1337.0;
interpolations[0] =
weights, reorder_type, 1, frac_mask_value, 1.0, 0.0, NULL);
interpolations[1] =
double * target_data_field =
xmalloc(num_edges *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (int interp_idx = 0; interp_idx < 2; ++interp_idx) {
for (size_t i = 0; i < num_edges; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = {
1337,1337,1337,1337, 1337, 1337,1337,1337,1337,
1337,1337, 3, 3, 3, 3, 2.5, 2.5, 3.5,
-1, -1, -1, -1, 8.5, -1,1337,1337,1337,
-1,1337, -1, 13,44.0/3.0,44.0/3.0,17.5,17.5,18.5,
1337, 18, 19, 20};
for (size_t i = 0; i < num_edges; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
edge_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
}
free(target_data_field);
for (int interp_idx = 0; interp_idx < 2; ++interp_idx)
}
}
static void submain_1(
char const local_grid_name[] = "grid1";
char const remote_grid_name[] = "grid2";
int my_rank;
MPI_Comm_rank(comp_comm, &my_rank);
double vertex_coordinates_x[] = {0.5, 1.5, 2.5, 3.5, 4.5};
double vertex_coordinates_y[] = {0.5, 1.5, 2.5, 3.5, 4.5};
double cell_coordinates_x[] = {0.75, 1.75, 2.75, 3.75};
double cell_coordinates_y[] = {0.75, 1.75, 2.75, 3.75};
double cell_coords[16][3];
size_t const num_global_cells[2] = {4,4};
size_t local_start[2][2] = {{0,0},{0,2}};
size_t local_count[2][2] = {{4,2},{4,2}};
int with_halo = 1;
for (size_t i = 0; i <= num_global_cells[0]; ++i)
vertex_coordinates_x[i] *=
YAC_RAD;
for (size_t i = 0; i <= num_global_cells[1]; ++i)
vertex_coordinates_y[i] *=
YAC_RAD;
for (size_t i = 0, k = 0; i < num_global_cells[1]; ++i)
for (size_t j = 0; j < num_global_cells[0]; ++j, ++k)
LLtoXYZ_deg(cell_coordinates_x[j], cell_coordinates_y[i], cell_coords[k]);
yac_generate_basic_grid_data_reg2d(
vertex_coordinates_x, vertex_coordinates_y, num_global_cells,
local_start[my_rank], local_count[my_rank], with_halo);
yac_int masked_corner_ids[] = {7,8,9,12,13,14};
size_t num_masked_corners =
sizeof(masked_corner_ids)/sizeof(masked_corner_ids[0]);
int * corner_mask =
xmalloc(num_vertices *
sizeof(*corner_mask));
for (size_t i = 0; i < num_vertices; ++i) {
corner_mask[i] = 1;
for (size_t j = 0; j < num_masked_corners; ++j)
if (grid_data.
vertex_ids[i] == masked_corner_ids[j]) corner_mask[i] = 0;
}
size_t num_masked_cells =
sizeof(masked_cell_ids)/sizeof(masked_cell_ids[0]);
int * cell_mask =
xmalloc(num_cells *
sizeof(*cell_mask));
for (size_t i = 0; i < num_cells; ++i) {
cell_mask[i] = 1;
for (size_t j = 0; j < num_masked_cells; ++j)
if (grid_data.
cell_ids[i] == masked_cell_ids[j]) cell_mask[i] = 0;
}
xmalloc(num_cells *
sizeof(*cell_field_coords));
for (size_t i = 0; i < num_cells; ++i)
memcpy(cell_field_coords[i], cell_coords[grid_data.
cell_ids[i]],
3 * sizeof(double));
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_in, reorder_type, 1,
weights_out, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = { 3, 4, 5, 6,1337,
8, 9, 10, 11,1337,
13, 14, 15, 16,1337,
18, 19, 20, 21,1337,
1337,1337,1337,1337,1337};
for (size_t i = 0; i < num_vertices; ++i) {
if (double_are_unequal(
target_data[0][i],
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_in, reorder_type, 1,
weights_out, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = { 3, 4, 5, 6,1337,
1337,1337,1337, 11,1337,
1337,1337,1337, 16,1337,
1337,1337,1337, 21,1337,
1337,1337,1337,1337,1337};
for (size_t i = 0; i < num_vertices; ++i) {
if (double_are_unequal(
target_data[0][i],
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
NULL};
NULL};
weights_in, reorder_type, 1,
weights_out, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = { 3, 4, 5, 6,1337,
5.5, 6.5,28.0/3.0, 11,1337,
1337,1337, 15.5, 16,1337,
20.5,21.5, 21, 21,1337,
1337,1337, 1337,1337,1337};
for (size_t i = 0; i < num_vertices; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
vertex_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_in =
num_src_fields, src_fields, tgt_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_out =
num_src_fields, src_fields, tgt_field);
}
NULL};
NULL};
weights_in, reorder_type, 1,
weights_out, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_vertices *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_vertices; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = { 3, 4, 5, 6,1337,
5.5, 6.5, -1, -1, -1,
1337,1337, -1, -1, -1,
20.5,21.5, 21, 21,1337,
1337,1337,1337,1337,1337};
for (size_t i = 0; i < num_vertices; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
vertex_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_in =
num_src_fields, src_fields, tgt_field);
}
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid_out =
num_src_fields, src_fields, tgt_field);
}
NULL};
NULL};
weights_in, reorder_type, 1,
weights_out, reorder_type, 1,
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
double * target_data_field =
xmalloc(num_cells *
sizeof(*target_data_field));
double * target_data[1] = {target_data_field};
for (size_t i = 0; i < num_cells; ++i) target_data_field[i] = -1.0;
double ref_global_target_data[] = { 3, 4, 5, 6,
5.5, 6.5, -1, -1,
1337,1337,15.5, 16,
20.5,21.5, 21, 21};
for (size_t i = 0; i < num_cells; ++i) {
if (fabs(target_data[0][i] -
ref_global_target_data[grid_data.
cell_ids[i]]) > 1e-9)
PUT_ERR("error in interpolated data on target side\n");
} else {
if (target_data[0][i] != -1.0)
PUT_ERR("error in interpolated data on target side\n");
}
}
free(target_data_field);
free(source_data_field);
}
{
{
size_t num_src_fields = sizeof(src_fields) / sizeof(src_fields[0]);
interp_grid =
num_src_fields, src_fields, tgt_field);
}
NULL};
double frac_mask_value = -1337.0;
interpolations[0] =
weights, reorder_type, 1, frac_mask_value, 1.0, 0.0, NULL);
interpolations[1] =
double * source_data_field =
xmalloc(num_vertices *
sizeof(*source_data_field));
double * source_data_pointset[1] = {source_data_field};
double ** source_data[1] = {source_data_pointset};
double * source_frac_mask_data =
xmalloc(num_vertices *
sizeof(*source_frac_mask_data));
double * source_frac_mask_pointset[1] = {source_frac_mask_data};
double ** source_frac_mask[1] = {source_frac_mask_pointset};
for (size_t i = 0; i < num_vertices; ++i) source_frac_mask_data[i] = 0.5;
for (size_t i = 0; i < num_vertices; ++i)
source_data_field[i] =
((double)(grid_data.
vertex_ids[i])*source_frac_mask_data[i]):(-1.0);
for (int interp_idx = 0; interp_idx < 2; ++interp_idx)
interpolations[interp_idx], source_data, source_frac_mask);
free(source_frac_mask_data);
free(source_data_field);
for (int interp_idx = 0; interp_idx < 2; ++interp_idx)
}
}
struct yac_basic_grid * yac_basic_grid_new(char const *name, struct yac_basic_grid_data grid_data)
size_t yac_basic_grid_add_coordinates_nocpy(struct yac_basic_grid *grid, enum yac_location location, yac_coordinate_pointer coordinates)
struct yac_basic_grid * yac_basic_grid_empty_new(char const *name)
void yac_basic_grid_delete(struct yac_basic_grid *grid)
size_t yac_basic_grid_add_mask_nocpy(struct yac_basic_grid *grid, enum yac_location location, int const *mask, char const *mask_name)
int main(int argc, char **argv)
void yac_dist_grid_pair_delete(struct yac_dist_grid_pair *grid_pair)
struct yac_dist_grid_pair * yac_dist_grid_pair_new(struct yac_basic_grid *grid_a, struct yac_basic_grid *grid_b, MPI_Comm comm)
static void LLtoXYZ_deg(double lon, double lat, double p_out[])
void yac_interp_grid_delete(struct yac_interp_grid *interp_grid)
struct yac_interp_grid * yac_interp_grid_new(struct yac_dist_grid_pair *grid_pair, char const *src_grid_name, char const *tgt_grid_name, size_t num_src_fields, struct yac_interp_field const *src_fields, struct yac_interp_field const tgt_field)
void yac_interp_method_delete(struct interp_method **method)
struct yac_interp_weights * yac_interp_method_do_search(struct interp_method **method, struct yac_interp_grid *interp_grid)
struct interp_method * yac_interp_method_avg_new(enum yac_interp_avg_weight_type weight_type, int partial_coverage)
@ YAC_INTERP_AVG_ARITHMETIC
struct interp_method * yac_interp_method_fixed_new(double value)
void yac_interp_weights_delete(struct yac_interp_weights *weights)
struct yac_interpolation * yac_interp_weights_get_interpolation(struct yac_interp_weights *weights, enum yac_interp_weights_reorder_type reorder, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name)
yac_interp_weights_reorder_type
@ YAC_MAPPING_ON_TGT
weights will be applied at target processes
@ YAC_MAPPING_ON_SRC
weights will be appied at source processes
struct yac_interpolation * yac_interpolation_copy(struct yac_interpolation *interp)
void yac_interpolation_delete(struct yac_interpolation *interp)
void yac_interpolation_execute_get(struct yac_interpolation *interp, double **tgt_field)
void yac_interpolation_execute_put_frac(struct yac_interpolation *interp, double ***src_fields, double ***src_frac_masks)
void yac_interpolation_execute_put(struct yac_interpolation *interp, double ***src_fields)
double const YAC_FRAC_MASK_NO_VALUE
enum yac_location location
struct yac_interp_field tgt_field
struct yac_dist_grid_pair * grid_pair
struct yac_interp_field src_fields[]
double(* yac_coordinate_pointer)[3]