107 xmalloc(1 *
sizeof(*interp_stack_copy));
108 interp_stack_copy->
size = interp_stack->
size;
109 interp_stack_copy->
config =
111 for (
size_t i = 0; i < interp_stack_copy->
size; ++i)
113 interp_stack_copy->
config + i, interp_stack->
config + i);
114 return interp_stack_copy;
134 "ERROR(%s): invalid interpolation type", routine)
138 struct yac_spmap_cell_area_config a,
struct yac_spmap_cell_area_config b) {
141 if ((ret = ((
int)(a.cell_area_provider) > (
int)(b.cell_area_provider)) -
142 ((
int)(a.cell_area_provider) < (
int)(b.cell_area_provider))))
145 switch (a.cell_area_provider) {
149 ((
int)(a.sphere_radius) > (
int)(b.sphere_radius)) -
150 ((int)(a.sphere_radius) < (int)(b.sphere_radius));
153 if ((ret = strcmp(a.file_config.filename, b.file_config.filename)))
155 if ((ret = strcmp(a.file_config.varname, b.file_config.varname)))
158 ((
int)(a.file_config.min_global_id) >
159 (
int)(b.file_config.min_global_id)) -
160 ((int)(a.file_config.min_global_id) <
161 (int)(b.file_config.min_global_id));
170 if ((ret = ((
int)(a.
type) > (
int)(b.
type)) - ((
int)(a.
type) < (
int)(b.
type))))
178 void const * a_,
void const * b_) {
186 a->
general.
type,
"yac_interp_stack_config_entry_compare");
188 b->
general.
type,
"yac_interp_stack_config_entry_compare");
191 "ERROR(yac_interp_stack_config_entry_compare): "
192 "interpolation type is undefined");
342 size_t stack_size = a->
size;
343 for (
size_t method_idx = 0; method_idx < stack_size; ++method_idx)
354 size_t interp_stack_size = interp_stack->
size;
356 xmalloc((interp_stack_size + 1) *
sizeof(*method_stack));
357 method_stack[interp_stack_size] = NULL;
359 for (
size_t i = 0; i < interp_stack_size; ++i) {
365 "ERROR(yac_interp_stack_config_generate): "
366 "unsupported interpolation method")
372 int partial_coverage =
381 int enforced_conserv =
383 int partial_coverage =
390 order, enforced_conserv, partial_coverage, normalisation);
400 char const * weight_file_name =
408 void * constructor_user_data;
410 void * do_search_user_data;
414 &constructor_callback, &constructor_user_data);
421 constructor_callback, constructor_user_data,
429 n_nearest_neighbor.
config);
441 radial_basis_function.
config);
484 char const *
string, MPI_Comm comm) {
486 int strlen_pack_size, string_pack_size;
487 yac_mpi_call(MPI_Pack_size(1, MPI_INT, comm, &strlen_pack_size), comm);
490 string != NULL,
"ERROR(yac_interp_stack_config_get_string_pack_size): "
495 (
int)(strlen(
string)), MPI_CHAR, comm, &string_pack_size), comm);
497 return (
size_t)strlen_pack_size + (size_t)string_pack_size;
501 struct yac_spmap_cell_area_config cell_area_config, MPI_Comm comm) {
503 int int_pack_size, dbl_pack_size;
504 yac_mpi_call(MPI_Pack_size(1, MPI_INT, comm, &int_pack_size), comm);
505 yac_mpi_call(MPI_Pack_size(1, MPI_DOUBLE, comm, &dbl_pack_size), comm);
507 size_t pack_size = (size_t)int_pack_size;
509 switch (cell_area_config.cell_area_provider) {
512 pack_size += (size_t)dbl_pack_size;
518 cell_area_config.file_config.filename, comm) +
520 cell_area_config.file_config.varname, comm) +
532 int int_pack_size, dbl_pack_size;
533 yac_mpi_call(MPI_Pack_size(1, MPI_INT, comm, &int_pack_size), comm);
534 yac_mpi_call(MPI_Pack_size(1, MPI_DOUBLE, comm, &dbl_pack_size), comm);
538 "yac_interp_stack_config_get_entry_pack_size");
541 "ERROR(yac_interp_stack_config_get_entry_pack_size): "
542 "invalid interpolation type")
546 return (
size_t)int_pack_size +
547 (size_t)int_pack_size +
548 (
size_t)int_pack_size;
551 return (
size_t)int_pack_size +
552 (size_t)int_pack_size +
553 (
size_t)int_pack_size +
554 (size_t)dbl_pack_size +
555 (
size_t)dbl_pack_size;
557 return (
size_t)int_pack_size +
558 (size_t)int_pack_size +
559 (
size_t)int_pack_size +
560 (size_t)int_pack_size +
561 (
size_t)int_pack_size;
563 return (
size_t)int_pack_size +
564 (size_t)dbl_pack_size +
565 (
size_t)dbl_pack_size +
566 (size_t)int_pack_size +
567 (
size_t)int_pack_size +
573 return (
size_t)int_pack_size +
574 (size_t)dbl_pack_size;
576 return (
size_t)int_pack_size;
578 return (
size_t)int_pack_size +
582 return (
size_t)int_pack_size +
588 return (
size_t)int_pack_size +
589 (size_t)int_pack_size;
591 return (
size_t)int_pack_size +
596 return (
size_t)int_pack_size +
597 (size_t)int_pack_size +
598 (
size_t)int_pack_size;
606 yac_mpi_call(MPI_Pack_size(1, MPI_INT, comm, &size_pack_size), comm);
608 size_t config_pack_size = 0;
610 for (
size_t i = 0; i < interp_stack->
size; ++i)
613 interp_stack->
config + i, comm);
615 return (
size_t)size_pack_size + config_pack_size;
619 char const *
string,
void * buffer,
int buffer_size,
int * position,
622 size_t len = (
string == NULL)?0:strlen(
string);
625 len <= INT_MAX,
"ERROR(yac_interp_stack_config_pack_string): string too long")
627 int len_int = (int)len;
631 &len_int, 1, MPI_INT, buffer, buffer_size, position, comm), comm);
636 string, len_int, MPI_CHAR, buffer, buffer_size, position, comm),
641 struct yac_spmap_cell_area_config cell_area_config,
642 void * buffer,
int buffer_size,
int * position, MPI_Comm comm) {
644 int cell_area_provider = (int)(cell_area_config.cell_area_provider);
647 &cell_area_provider, 1, MPI_INT, buffer, buffer_size, position, comm), comm);
649 switch (cell_area_config.cell_area_provider) {
654 &(cell_area_config.sphere_radius), 1, MPI_DOUBLE,
655 buffer, buffer_size, position, comm), comm);
660 cell_area_config.file_config.filename,
661 buffer, buffer_size, position, comm);
663 cell_area_config.file_config.varname,
664 buffer, buffer_size, position, comm);
666 (cell_area_config.file_config.min_global_id >= -INT_MAX) &&
667 (cell_area_config.file_config.min_global_id <= INT_MAX),
668 "ERRROR(yac_spmap_cell_area_config_pack): invalid minimum global id");
669 int min_global_id = (int)(cell_area_config.file_config.min_global_id);
672 &min_global_id, 1, MPI_INT, buffer, buffer_size, position, comm),
681 void * buffer,
int buffer_size,
int * position, MPI_Comm comm) {
685 MPI_Pack(&
type, 1, MPI_INT, buffer, buffer_size, position, comm), comm);
689 "yac_interp_stack_config_pack_entry");
692 "ERROR(yac_interp_stack_config_pack_entry): "
693 "invalid interpolation type")
700 &reduction_type, 1, MPI_INT, buffer, buffer_size, position, comm),
705 buffer, buffer_size, position, comm), comm);
712 "ERROR(yac_interp_stack_config_pack_entry): "
713 "n_nearest_neighbor.config.n bigger than INT_MAX")
717 &
type, 1, MPI_INT, buffer, buffer_size, position, comm), comm);
721 &n, 1, MPI_INT, buffer, buffer_size, position, comm), comm);
725 MPI_DOUBLE, buffer, buffer_size, position, comm), comm);
729 buffer, buffer_size, position, comm), comm);
736 buffer, buffer_size, position, comm), comm);
740 buffer, buffer_size, position, comm), comm);
744 buffer, buffer_size, position, comm), comm);
748 &normalisation, 1, MPI_INT, buffer, buffer_size, position, comm),
756 buffer, buffer_size, position, comm), comm);
760 buffer, buffer_size, position, comm), comm);
764 &
weight_type, 1, MPI_INT, buffer, buffer_size, position, comm),
769 &scale_type, 1, MPI_INT, buffer, buffer_size, position, comm),
781 buffer, buffer_size, position, comm), comm);
802 buffer, buffer_size, position, comm), comm);
808 buffer, buffer_size, position, comm);
815 &
weight_type, 1, MPI_INT, buffer, buffer_size, position, comm),
820 buffer, buffer_size, position, comm), comm);
828 void * buffer,
int buffer_size,
int * position, MPI_Comm comm) {
830 int stack_size = (int)(interp_stack->
size);
833 &stack_size, 1, MPI_INT,
834 buffer, buffer_size, position, comm), comm);
836 for (
size_t i = 0; i < interp_stack->
size; ++i)
838 interp_stack->
config + i, buffer, buffer_size, position, comm);
842 void * buffer,
int buffer_size,
int * position,
843 char *
string,
int max_string_len, MPI_Comm comm) {
848 buffer, buffer_size, position, &string_len, 1, MPI_INT, comm), comm);
852 "ERROR(yac_interp_stack_config_unpack_n_string): invalid string length")
855 string_len < max_string_len,
856 "ERROR(yac_interp_stack_config_unpack_n_string): string length to long")
861 buffer, buffer_size, position,
string, string_len, MPI_CHAR, comm),
863 string[string_len] =
'\0';
867 void * buffer,
int buffer_size,
int * position, MPI_Comm comm) {
872 buffer, buffer_size, position, &string_len, 1, MPI_INT, comm), comm);
876 "ERROR(yac_interp_stack_config_unpack_string): invalid string length")
878 char *
string = NULL;
879 if (string_len > 0) {
880 string =
xmalloc((
size_t)(string_len + 1) *
sizeof(*
string));
883 buffer, buffer_size, position,
string, string_len, MPI_CHAR, comm),
885 string[string_len] =
'\0';
891 void * buffer,
int buffer_size,
int * position,
892 struct yac_spmap_cell_area_config * cell_area_config, MPI_Comm comm) {
894 int cell_area_provider;
897 buffer, buffer_size, position, &cell_area_provider, 1, MPI_INT, comm),
899 cell_area_config->cell_area_provider =
902 switch (cell_area_config->cell_area_provider) {
907 buffer, buffer_size, position,
908 &(cell_area_config->sphere_radius), 1, MPI_DOUBLE, comm), comm);
909 cell_area_config->file_config.filename = NULL;
910 cell_area_config->file_config.varname = NULL;
911 cell_area_config->file_config.min_global_id = 0;
915 cell_area_config->sphere_radius = 0.0;
916 cell_area_config->file_config.filename =
918 buffer, buffer_size, position, comm);
919 cell_area_config->file_config.varname =
921 buffer, buffer_size, position, comm);
925 buffer, buffer_size, position, &min_global_id, 1, MPI_INT, comm),
927 cell_area_config->file_config.min_global_id = (size_t)min_global_id;
933 void * buffer,
int buffer_size,
int * position,
939 buffer, buffer_size, position, &
type, 1, MPI_INT, comm), comm);
945 "yac_interp_stack_config_unpack_entry");
948 "ERROR(yac_interp_stack_config_unpack_entry): "
949 "invalid interpolation type")
956 buffer, buffer_size, position, &reduction_type, 1, MPI_INT, comm),
963 1, MPI_INT, comm), comm);
971 buffer, buffer_size, position, &
type, 1, MPI_INT, comm), comm);
977 buffer, buffer_size, position, &n, 1, MPI_INT, comm), comm);
980 "ERROR(yac_interp_stack_config_unpack_entry): "
981 "invalid n_nearest_neighbor.config.n")
985 buffer, buffer_size, position,
987 1, MPI_DOUBLE, comm), comm);
990 buffer, buffer_size, position,
992 1, MPI_DOUBLE, comm), comm);
998 buffer, buffer_size, position,
1002 buffer, buffer_size, position,
1006 buffer, buffer_size, position,
1011 buffer, buffer_size, position, &normalisation, 1, MPI_INT, comm),
1020 buffer, buffer_size, position,
1024 buffer, buffer_size, position,
1029 buffer, buffer_size, position, &
weight_type, 1, MPI_INT, comm),
1036 buffer, buffer_size, position, &scale_type, 1, MPI_INT, comm),
1049 buffer, buffer_size, position,
1050 &(entry->
fixed.
value), 1, MPI_DOUBLE, comm), comm);
1057 buffer, buffer_size, position,
1063 buffer, buffer_size, position,
1066 buffer, buffer_size, position,
1073 buffer, buffer_size, position,
1079 buffer, buffer_size, position,
1088 buffer, buffer_size, position, &
weight_type, 1, MPI_INT, comm),
1094 buffer, buffer_size, position,
1096 1, MPI_INT, comm), comm);
1103 void * buffer,
int buffer_size,
int * position, MPI_Comm comm) {
1108 buffer, buffer_size, position, &stack_size, 1, MPI_INT, comm), comm);
1112 "ERROR(yac_interp_stack_config_unpack_interp_stack): invalid stack size")
1117 interp_stack->
size = (size_t)stack_size;
1119 xmalloc((
size_t)stack_size *
sizeof(*interp_stack->
config));
1121 for (
int i = 0; i < stack_size; ++i)
1123 buffer, buffer_size, position, interp_stack->
config + (
size_t)i, comm);
1125 return interp_stack;
1131 xmalloc(1 *
sizeof(*interp_stack_config));
1132 interp_stack_config->
config = NULL;
1133 interp_stack_config->
size = 0;
1135 return interp_stack_config;
1151 for (
size_t i = 0; i < interp_stack_config->
size; ++i)
1153 free(interp_stack_config->
config);
1154 free(interp_stack_config);
1161 interp_stack_config->
size++;
1162 interp_stack_config->
config =
1164 interp_stack_config->
config,
1165 interp_stack_config->
size *
sizeof(*(interp_stack_config->
config)));
1167 return interp_stack_config->
config + (interp_stack_config->
size - 1);
1190 "ERROR(yac_interp_stack_config_add_average_f2c): "
1191 "reduction_type must be one of "
1192 "YAC_INTERP_AVG_ARITHMETIC/YAC_INTERP_AVG_DIST/YAC_INTERP_AVG_BARY");
1218 "ERROR(yac_interp_stack_config_add_ncc_f2c): "
1219 "weight_type must be one of "
1220 "YAC_INTERP_NCC_AVG/YAC_INTERP_NCC_DIST");
1241 .data.rbf_scale = scale};
1247 .data.rbf_scale = scale};
1253 int type,
size_t n,
double max_search_distance,
double scale) {
1261 "ERROR(yac_interp_stack_config_add_nnn_f2c): "
1262 "type must be one of YAC_INTERP_NNN_AVG/YAC_INTERP_NNN_DIST/"
1263 "YAC_INTERP_NNN_GAUSS/YAC_INTERP_NNN_RBF/YAC_INTERP_NNN_ZERO.")
1267 max_search_distance, scale);
1272 int order,
int enforced_conserv,
int partial_coverage,
1293 "ERROR(yac_interp_stack_config_add_conservative_f2c): "
1294 "type must be one of "
1295 "YAC_INTERP_CONSERV_DESTAREA/YAC_INTERP_CONSERV_FRACAREA.")
1303 double sphere_radius, char const * filename,
1304 char const * varname,
int min_global_id,
char const *
type) {
1307 (sphere_radius == 0.0) ||
1308 ((sphere_radius != 0.0) &&
1309 ((filename == NULL) && (varname == NULL))),
1310 "ERROR(yac_spmap_cell_area_config_set): "
1311 "%s sphere_radius != 0.0, but filename and varname are not NULL",
type);
1313 (sphere_radius != 0.0) ||
1314 ((sphere_radius == 0.0) &&
1315 ((filename != NULL) && (strlen(filename) > 0) && (filename[0] !=
'\0') &&
1316 (varname != NULL) && (strlen(varname) > 0) && (varname[0] !=
'\0'))),
1317 "ERROR(yac_spmap_cell_area_config_set): "
1318 "%s sphere_radius == 0.0, but filename and/or varname are invalid",
type);
1320 struct yac_spmap_cell_area_config cell_area_config;
1321 if (sphere_radius != 0.0)
1326 switch (cell_area_config.cell_area_provider) {
1331 sphere_radius > 0.0,
1332 "ERROR(yac_spmap_cell_area_config_set): "
1333 "invalid %s sphere_radius (%.6lf)",
type, sphere_radius)
1334 cell_area_config.sphere_radius = sphere_radius;
1335 cell_area_config.file_config.filename = NULL;
1336 cell_area_config.file_config.varname = NULL;
1337 cell_area_config.file_config.min_global_id = 0;
1342 cell_area_config.sphere_radius = 0.0;
1343 cell_area_config.file_config.filename = strdup(filename);
1344 cell_area_config.file_config.varname = strdup(varname);
1345 cell_area_config.file_config.min_global_id = (
yac_int)min_global_id;
1349 return cell_area_config;
1354 double spread_distance,
double max_search_distance,
1357 double src_sphere_radius,
char const * src_filename,
1358 char const * src_varname,
int src_min_global_id,
1359 double tgt_sphere_radius,
char const * tgt_filename,
1360 char const * tgt_varname,
int tgt_min_global_id) {
1372 src_sphere_radius, src_filename,
1373 src_varname, src_min_global_id,
"source");
1376 tgt_sphere_radius, tgt_filename,
1377 tgt_varname, tgt_min_global_id,
"target");
1384 double src_sphere_radius,
char const * src_filename,
1385 char const * src_varname,
int src_min_global_id,
1386 double tgt_sphere_radius,
char const * tgt_filename,
1387 char const * tgt_varname,
int tgt_min_global_id) {
1392 "ERROR(yac_interp_stack_config_add_spmap_f2c): "
1393 "weight_type must be one of "
1394 "YAC_INTERP_SPMAP_AVG/YAC_INTERP_SPMAP_DIST.")
1401 "ERROR(yac_interp_stack_config_add_spmap_f2c): "
1402 "scale_type must be one of "
1403 "YAC_INTERP_SPMAP_NONE/YAC_INTERP_SPMAP_SRCAREA/"
1404 "YAC_INTERP_SPMAP_INVTGTAREA/YAC_INTERP_SPMAP_FRACAREA.")
1406 if (src_filename && (src_filename[0] ==
'\0')) src_filename = NULL;
1407 if (src_varname && (src_varname[0] ==
'\0')) src_varname = NULL;
1408 if (tgt_filename && (tgt_filename[0] ==
'\0')) tgt_filename = NULL;
1409 if (tgt_varname && (tgt_varname[0] ==
'\0')) tgt_varname = NULL;
1415 src_sphere_radius, src_filename, src_varname, src_min_global_id,
1416 tgt_sphere_radius, tgt_filename, tgt_varname, tgt_min_global_id);
1429 char const *
string,
char const * file,
int line,
char const * routine,
1430 char const * variable) {
1433 string != NULL,
"ERROR(%s:%d:%s): %s is NULL",
1434 file, line, routine, variable)
1437 "ERROR(%s:%d:%s): %s is too long", file, line, routine, variable)
1446 "yac_interp_stack_config_add_user_file",
"filename");
1471 "ERROR(yac_interp_stack_config_add_check): "
1472 "constructor_key name \"%s\" is too long "
1476 "ERROR(yac_interp_stack_config_add_check): "
1477 "do_search_key name \"%s\" is too long "
1514 "yac_interp_stack_config_add_user_callback",
1515 "func_compute_weights_key");
1528 return interp_stack->
size;
1534 size_t interp_stack_idx) {
1537 interp_stack_idx < interp_stack->size,
1538 "ERROR(yac_interp_stack_config_get_entry): "
1539 "invalid interpolation stack index");
1541 return interp_stack->
config + interp_stack_idx;
1558 "ERROR(yac_interp_stack_config_entry_get_average): "
1559 "wrong interpolation stack entry type");
1571 "ERROR(yac_interp_stack_config_entry_get_ncc): "
1572 "wrong interpolation stack entry type");
1587 "ERROR(yac_interp_stack_config_entry_get_nnn): "
1588 "wrong interpolation stack entry type");
1604 "ERROR(yac_interp_stack_config_entry_get_conservative): "
1605 "wrong interpolation stack entry type");
1618 double * src_sphere_radius,
char const ** src_filename,
1619 char const ** src_varname,
int * src_min_global_id,
1620 double * tgt_sphere_radius,
char const ** tgt_filename,
1621 char const ** tgt_varname,
int * tgt_min_global_id) {
1625 "ERROR(yac_interp_stack_config_entry_get_spmap): "
1626 "wrong interpolation stack entry type");
1637 *src_min_global_id =
1644 *tgt_min_global_id =
1654 "ERROR(yac_interp_stack_config_entry_get_user_file): "
1655 "wrong interpolation stack entry type");
1666 "ERROR(yac_interp_stack_config_entry_get_fixed): "
1667 "wrong interpolation stack entry type");
1678 "ERROR(yac_interp_stack_config_entry_get_check): "
1679 "wrong interpolation stack entry type");
1691 "ERROR(yac_interp_stack_config_entry_get_creep): "
1692 "wrong interpolation stack entry type");
1703 "ERROR(yac_interp_stack_config_entry_get_user_callback): "
1704 "wrong interpolation stack entry type");
enum yac_interp_ncc_weight_type weight_type
struct interp_method * yac_interp_method_avg_new(enum yac_interp_avg_weight_type weight_type, int partial_coverage)
yac_interp_avg_weight_type
@ YAC_INTERP_AVG_ARITHMETIC
void yac_interp_method_callback_get_compute_weights_callback(char const *key, yac_func_compute_weights *compute_weights_callback, void **user_data)
static size_t do_search_callback(struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights)
struct interp_method * yac_interp_method_callback_new(yac_func_compute_weights compute_weights_callback, void *user_data)
void(* yac_func_compute_weights)(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)
void yac_interp_method_check_get_do_search_callback(char const *key, func_do_search *do_search_callback, void **user_data)
void yac_interp_method_check_get_constructor_callback(char const *key, func_constructor *constructor_callback, void **user_data)
struct interp_method * yac_interp_method_check_new(func_constructor constructor_callback, void *constructor_user_data, func_do_search do_search_callback, void *do_search_user_data)
void(* func_do_search)(yac_int const *global_ids, double const (*coordinates_xyz)[3], size_t count, void *user_data)
void(* func_constructor)(void *user_data)
struct interp_method * yac_interp_method_conserv_new(int order, int enforced_conserv, int partial_coverage, enum yac_interp_method_conserv_normalisation normalisation)
yac_interp_method_conserv_normalisation
@ YAC_INTERP_CONSERV_DESTAREA
@ YAC_INTERP_CONSERV_FRACAREA
struct interp_method * yac_interp_method_creep_new(int creep_distance)
struct interp_method * yac_interp_method_file_new(char const *weight_file_name)
struct interp_method * yac_interp_method_fixed_new(double value)
struct interp_method * yac_interp_method_hcsbb_new()
struct interp_method * yac_interp_method_ncc_new(enum yac_interp_ncc_weight_type weight_type, int partial_coverage)
yac_interp_ncc_weight_type
@ YAC_INTERP_NCC_DIST
distance weighted average of n source points
@ YAC_INTERP_NCC_AVG
average of n source points
struct interp_method * yac_interp_method_nnn_new(struct yac_nnn_config config)
yac_interp_nnn_weight_type
@ YAC_INTERP_NNN_GAUSS
distance with Gauss weights of n source points
@ YAC_INTERP_NNN_RBF
radial basis functions
@ YAC_INTERP_NNN_AVG
average of n source points
@ YAC_INTERP_NNN_DIST
distance weighted average of n source points
@ YAC_INTERP_NNN_ZERO
all weights are set to zero
struct interp_method * yac_interp_method_spmap_new(double spread_distance, double max_search_distance, enum yac_interp_spmap_weight_type weight_type, struct yac_spmap_scale_config scale_config)
yac_interp_spmap_scale_type
@ YAC_INTERP_SPMAP_NONE
weights are not scaled
@ YAC_INTERP_SPMAP_INVTGTAREA
@ YAC_INTERP_SPMAP_SRCAREA
@ YAC_INTERP_SPMAP_FRACAREA
yac_interp_spmap_cell_area_provider
@ YAC_INTERP_SPMAP_CELL_AREA_FILE
@ YAC_INTERP_SPMAP_CELL_AREA_YAC
yac_interp_spmap_weight_type
void yac_interp_stack_config_entry_get_creep(union yac_interp_stack_config_entry const *interp_stack_entry, int *creep_distance)
void yac_interp_stack_config_add_check(struct yac_interp_stack_config *interp_stack_config, char const *constructor_key, char const *do_search_key)
size_t yac_interp_stack_config_get_size(struct yac_interp_stack_config *interp_stack)
int yac_interp_stack_config_compare(void const *a_, void const *b_)
static union yac_interp_stack_config_entry * yac_interp_stack_config_add_entry(struct yac_interp_stack_config *interp_stack_config)
static void yac_spmap_cell_area_config_unpack(void *buffer, int buffer_size, int *position, struct yac_spmap_cell_area_config *cell_area_config, MPI_Comm comm)
static void yac_spmap_cell_area_config_pack(struct yac_spmap_cell_area_config cell_area_config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static struct yac_spmap_cell_area_config yac_spmap_cell_area_config_set(double sphere_radius, char const *filename, char const *varname, int min_global_id, char const *type)
union yac_interp_stack_config_entry const * yac_interp_stack_config_get_entry(struct yac_interp_stack_config *interp_stack, size_t interp_stack_idx)
static void yac_interp_stack_config_pack_string(char const *string, void *buffer, int buffer_size, int *position, MPI_Comm comm)
enum yac_interpolation_list yac_interp_stack_config_entry_get_type(union yac_interp_stack_config_entry const *interp_stack_entry)
void yac_interp_stack_config_add_spmap(struct yac_interp_stack_config *interp_stack_config, double spread_distance, double max_search_distance, enum yac_interp_spmap_weight_type weight_type, enum yac_interp_spmap_scale_type scale_type, double src_sphere_radius, char const *src_filename, char const *src_varname, int src_min_global_id, double tgt_sphere_radius, char const *tgt_filename, char const *tgt_varname, int tgt_min_global_id)
void yac_interp_stack_config_add_fixed(struct yac_interp_stack_config *interp_stack_config, double value)
void yac_interp_stack_config_add_hcsbb(struct yac_interp_stack_config *interp_stack_config)
void yac_interp_stack_config_add_average(struct yac_interp_stack_config *interp_stack_config, enum yac_interp_avg_weight_type reduction_type, int partial_coverage)
static void yac_interp_stack_config_pack_entry(union yac_interp_stack_config_entry *entry, void *buffer, int buffer_size, int *position, MPI_Comm comm)
void yac_interp_stack_config_entry_get_user_file(union yac_interp_stack_config_entry const *interp_stack_entry, char const **filename)
void yac_interp_stack_config_add_creep(struct yac_interp_stack_config *interp_stack_config, int creep_distance)
void yac_interp_stack_config_add_user_file(struct yac_interp_stack_config *interp_stack_config, char const *filename)
static size_t yac_interp_stack_config_get_string_pack_size(char const *string, MPI_Comm comm)
static int yac_spmap_cell_area_config_compare(struct yac_spmap_cell_area_config a, struct yac_spmap_cell_area_config b)
static size_t yac_spmap_cell_area_config_get_pack_size(struct yac_spmap_cell_area_config cell_area_config, MPI_Comm comm)
static int yac_spmap_scale_config_compare(struct yac_spmap_scale_config a, struct yac_spmap_scale_config b)
void yac_interp_stack_config_add_nnn(struct yac_interp_stack_config *interp_stack_config, enum yac_interp_nnn_weight_type type, size_t n, double max_search_distance, double scale)
void yac_interp_stack_config_add_spmap_f2c(struct yac_interp_stack_config *interp_stack_config, double spread_distance, double max_search_distance, int weight_type, int scale_type, double src_sphere_radius, char const *src_filename, char const *src_varname, int src_min_global_id, double tgt_sphere_radius, char const *tgt_filename, char const *tgt_varname, int tgt_min_global_id)
void yac_interp_stack_config_entry_get_ncc(union yac_interp_stack_config_entry const *interp_stack_entry, enum yac_interp_ncc_weight_type *type, int *partial_coverage)
void yac_interp_stack_config_add_conservative_f2c(struct yac_interp_stack_config *interp_stack_config, int order, int enforced_conserv, int partial_coverage, int normalisation)
static void yac_interp_stack_config_unpack_entry(void *buffer, int buffer_size, int *position, union yac_interp_stack_config_entry *entry, MPI_Comm comm)
struct yac_interp_stack_config * yac_interp_stack_config_unpack(void *buffer, int buffer_size, int *position, MPI_Comm comm)
void yac_interp_stack_config_add_ncc_f2c(struct yac_interp_stack_config *interp_stack_config, int weight_type, int partial_coverage)
static void check_interpolation_type(enum yac_interpolation_list type, char const *routine)
void yac_interp_stack_config_delete(struct yac_interp_stack_config *interp_stack_config)
void yac_interp_stack_config_entry_get_user_callback(union yac_interp_stack_config_entry const *interp_stack_entry, char const **func_compute_weights_key)
struct yac_interp_stack_config * yac_interp_stack_config_copy(struct yac_interp_stack_config *interp_stack)
void yac_interp_stack_config_add_conservative(struct yac_interp_stack_config *interp_stack_config, int order, int enforced_conserv, int partial_coverage, enum yac_interp_method_conserv_normalisation normalisation)
void yac_interp_stack_config_entry_get_check(union yac_interp_stack_config_entry const *interp_stack_entry, char const **constructor_key, char const **do_search_key)
static int yac_interp_stack_config_entry_compare(void const *a_, void const *b_)
struct interp_method ** yac_interp_stack_config_generate(struct yac_interp_stack_config *interp_stack)
void yac_interp_stack_config_entry_get_conservative(union yac_interp_stack_config_entry const *interp_stack_entry, int *order, int *enforced_conserv, int *partial_coverage, enum yac_interp_method_conserv_normalisation *normalisation)
static char * yac_interp_stack_config_unpack_string(void *buffer, int buffer_size, int *position, MPI_Comm comm)
void yac_interp_stack_config_entry_get_average(union yac_interp_stack_config_entry const *interp_stack_entry, enum yac_interp_avg_weight_type *reduction_type, int *partial_coverage)
size_t yac_interp_stack_config_get_pack_size(struct yac_interp_stack_config *interp_stack, MPI_Comm comm)
void yac_interp_stack_config_add_average_f2c(struct yac_interp_stack_config *interp_stack_config, int reduction_type, int partial_coverage)
void yac_interp_stack_config_add_ncc(struct yac_interp_stack_config *interp_stack_config, enum yac_interp_ncc_weight_type weight_type, int partial_coverage)
void yac_interp_stack_config_add_nnn_f2c(struct yac_interp_stack_config *interp_stack_config, int type, size_t n, double max_search_distance, double scale)
void yac_interp_stack_config_entry_get_nnn(union yac_interp_stack_config_entry const *interp_stack_entry, enum yac_interp_nnn_weight_type *type, size_t *n, double *max_search_distance, double *scale)
void yac_interp_stack_config_add_user_callback(struct yac_interp_stack_config *interp_stack_config, char const *func_compute_weights_key)
static void yac_interp_stack_config_unpack_n_string(void *buffer, int buffer_size, int *position, char *string, int max_string_len, MPI_Comm comm)
struct yac_interp_stack_config * yac_interp_stack_config_new()
static void yac_interp_stack_config_entry_free(union yac_interp_stack_config_entry *entry)
void yac_interp_stack_config_pack(struct yac_interp_stack_config *interp_stack, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static void check_string(char const *string, char const *file, int line, char const *routine, char const *variable)
static void yac_interp_stack_config_entry_copy(union yac_interp_stack_config_entry *to, union yac_interp_stack_config_entry *from)
void yac_interp_stack_config_entry_get_fixed(union yac_interp_stack_config_entry const *interp_stack_entry, double *value)
void yac_interp_stack_config_entry_get_spmap(union yac_interp_stack_config_entry const *interp_stack_entry, double *spread_distance, double *max_search_distance, enum yac_interp_spmap_weight_type *weight_type, enum yac_interp_spmap_scale_type *scale_type, double *src_sphere_radius, char const **src_filename, char const **src_varname, int *src_min_global_id, double *tgt_sphere_radius, char const **tgt_filename, char const **tgt_varname, int *tgt_min_global_id)
static size_t yac_interp_stack_config_get_entry_pack_size(union yac_interp_stack_config_entry *entry, MPI_Comm comm)
@ YAC_SOURCE_TO_TARGET_MAP
@ YAC_NEAREST_CORNER_CELLS
@ YAC_RADIAL_BASIS_FUNCTION
#define YAC_MAX_ROUTINE_NAME_LENGTH
#define YAC_MAX_FILE_NAME_LENGTH
#define xrealloc(ptr, size)
union yac_interp_stack_config_entry * config
double max_search_distance
union yac_nnn_config::@21 data
enum yac_interp_nnn_weight_type type
struct yac_spmap_scale_config::yac_spmap_cell_area_config::yac_spmap_cell_area_file_config file_config
struct yac_spmap_scale_config::yac_spmap_cell_area_config src
struct yac_spmap_scale_config::yac_spmap_cell_area_config tgt
enum yac_interp_spmap_scale_type type
struct yac_interp_stack_config_entry::@33 nearest_corner_cells
struct yac_interp_stack_config_entry::@29 fixed
enum yac_interp_ncc_weight_type weight_type
char do_search_key[YAC_MAX_ROUTINE_NAME_LENGTH]
struct yac_interp_stack_config_entry::@23 average
double max_search_distance
enum yac_interpolation_list type
struct yac_interp_stack_config_entry::@25 conservative
struct yac_interp_stack_config_entry::@24 radial_basis_function
struct yac_nnn_config config
struct yac_interp_stack_config_entry::@31 creep
struct yac_interp_stack_config_entry::@32 user_callback
struct yac_interp_stack_config_entry::@26 spmap
char constructor_key[YAC_MAX_ROUTINE_NAME_LENGTH]
enum yac_interp_avg_weight_type reduction_type
struct yac_interp_stack_config_entry::@28 user_file
enum yac_interp_method_conserv_normalisation normalisation
struct yac_interp_stack_config_entry::@22 general
struct yac_interp_stack_config_entry::@27 hcsbb
char filename[YAC_MAX_FILE_NAME_LENGTH]
enum yac_interp_spmap_weight_type weight_type
struct yac_interp_stack_config_entry::@24 n_nearest_neighbor
struct yac_interp_stack_config_entry::@30 check
char func_compute_weights_key[YAC_MAX_ROUTINE_NAME_LENGTH]
struct yac_spmap_scale_config scale_config
#define YAC_ASSERT_F(exp, format,...)
#define YAC_ASSERT(exp, msg)
#define yac_mpi_call(call, comm)