YAC 3.12.0
Yet Another Coupler
Loading...
Searching...
No Matches
weight_file_common.h File Reference
#include "location.h"
Include dependency graph for weight_file_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void write_weight_file (char const *file_name, int const *src_id, int const *tgt_id, double const *weights, unsigned num_links, enum yac_location const *src_locations, unsigned num_src_fields, int const *num_links_per_src_field, int *tgt_id_fixed, unsigned num_fixed_tgt, double *fixed_values, int *num_tgt_per_fixed_value, unsigned num_fixed_values, enum yac_location tgt_location, char const *src_grid_name, char const *tgt_grid_name)
 
void write_cdo_weight_file (char const *file_name, int const *src_id, int const *tgt_id, double const *weights, unsigned num_links, char const *src_grid_name, char const *tgt_grid_name)
 
void check_weight_file (char const *file_name, int const *ref_src_address, int const *ref_tgt_address, double const *ref_weights, unsigned ref_num_links, enum yac_location const *ref_src_locations, unsigned ref_num_src_fields, int const *ref_num_links_per_src_field, int const *ref_tgt_id_fixed, double const *ref_fixed_values, int const *ref_num_tgt_per_fixed_value, unsigned ref_num_fixed_values, enum yac_location ref_tgt_location, char const *ref_src_grid_name, char const *ref_tgt_grid_name)
 

Function Documentation

◆ check_weight_file()

void check_weight_file ( char const * file_name,
int const * ref_src_address,
int const * ref_tgt_address,
double const * ref_weights,
unsigned ref_num_links,
enum yac_location const * ref_src_locations,
unsigned ref_num_src_fields,
int const * ref_num_links_per_src_field,
int const * ref_tgt_id_fixed,
double const * ref_fixed_values,
int const * ref_num_tgt_per_fixed_value,
unsigned ref_num_fixed_values,
enum yac_location ref_tgt_location,
char const * ref_src_grid_name,
char const * ref_tgt_grid_name )

checks whether data in a weight file is identical to the reference data provided

Parameters
[in]file_namename of the weight file that is to be checked
[in]ref_src_addressreference source indices for all links
[in]ref_tgt_addressreference target indices for all links
[in]ref_weightsreference weights for all links
[in]ref_num_linksreference number of links
[in]ref_src_locationsreference location for each source field
[in]ref_num_src_fieldsreference number of source fields
[in]ref_num_links_per_src_fieldreference number of links per source field
[in]ref_tgt_id_fixedreference target indices for all points that receive a fixed value
[in]ref_fixed_valuesreference fixed values to be used
[in]ref_num_tgt_per_fixed_valuenumber of target points per fixed value
[in]ref_num_fixed_valuesreference number of fixed values
[in]ref_tgt_locationreference location of the target field
[in]ref_src_grid_namename of the source grid
[in]ref_tgt_grid_namename of the target grid
Remarks
routine adds the number of differences found to the global variable err_count__ (see tests.h)

Definition at line 233 of file weight_file_common.c.

Here is the call graph for this function:

◆ write_cdo_weight_file()

void write_cdo_weight_file ( char const * file_name,
int const * src_id,
int const * tgt_id,
double const * weights,
unsigned num_links,
char const * src_grid_name,
char const * tgt_grid_name )

creates a CDO-like weight file

Parameters
[in]file_namename of the weight file
[in]src_idsource indices for all links
[in]tgt_idtarget indices for all links
[in]weightsweights for all links
[in]num_linksnumber of links
[in]src_grid_namename of the source grid
[in]tgt_grid_namename of the target grid
Remarks
the links have to be ordered by the source field index (ascending order)

Definition at line 170 of file weight_file_common.c.

Here is the call graph for this function:

◆ write_weight_file()

void write_weight_file ( char const * file_name,
int const * src_id,
int const * tgt_id,
double const * weights,
unsigned num_links,
enum yac_location const * src_locations,
unsigned num_src_fields,
int const * num_links_per_src_field,
int * tgt_id_fixed,
unsigned num_fixed_tgt,
double * fixed_values,
int * num_tgt_per_fixed_value,
unsigned num_fixed_values,
enum yac_location tgt_location,
char const * src_grid_name,
char const * tgt_grid_name )

creates a weight file

Parameters
[in]file_namename of the weight file
[in]src_idsource indices for all links
[in]tgt_idtarget indices for all links
[in]weightsweights for all links
[in]num_linksnumber of links
[in]src_locationslocation for each source field
[in]num_src_fieldsnumber of source fields
[in]num_links_per_src_fieldnumber of links per source field
[in]tgt_id_fixedtarget indices for all points that receive a fixed value
[in]num_fixed_tgtnumber of target points that receive a fixed value
[in]fixed_valuesfixed values to be used
[in]num_tgt_per_fixed_valuenumber of target points per fixed value
[in]num_fixed_valuesnumber of fixed values
[in]tgt_locationlocation of the target field
[in]src_grid_namename of the source grid
[in]tgt_grid_namename of the target grid
Remarks
the sum of all entries in num_links_per_src_field must be equal to num_links
the sum of all entries in num_tgt_per_fixed_value must be equal to num_fixed_tgt
the links have to be ordered by the source field index (ascending order)

Definition at line 15 of file weight_file_common.c.

Here is the call graph for this function: