YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
interp_weights.h File Reference
#include "yac_types.h"
#include "location.h"
#include "interpolation.h"
Include dependency graph for interp_weights.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  yac_interp_weights_reorder_type { YAC_MAPPING_ON_SRC , YAC_MAPPING_ON_TGT }
 

Functions

struct yac_interp_weightsyac_interp_weights_new (MPI_Comm comm, enum yac_location tgt_location, enum yac_location *src_locations, size_t num_src_fields)
 
void yac_interp_weights_write_to_file (struct yac_interp_weights *weights, char const *filename, char const *src_grid_name, char const *tgt_grid_name, size_t src_grid_size, size_t tgt_grid_size)
 
struct yac_interpolationyac_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)
 
size_t yac_interp_weights_get_interp_count (struct yac_interp_weights *weights)
 
yac_intyac_interp_weights_get_interp_tgt (struct yac_interp_weights *weights)
 
void yac_interp_weights_delete (struct yac_interp_weights *weights)
 

Enumeration Type Documentation

◆ yac_interp_weights_reorder_type

Enumerator
YAC_MAPPING_ON_SRC 

weights will be appied at source processes

YAC_MAPPING_ON_TGT 

weights will be applied at target processes

Definition at line 18 of file interp_weights.h.

Function Documentation

◆ yac_interp_weights_delete()

void yac_interp_weights_delete ( struct yac_interp_weights * weights)

Destructor for interpolation weights.

Parameters
[in,out]weightsinterpolation weights

Definition at line 4871 of file interp_weights.c.

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

◆ yac_interp_weights_get_interp_count()

size_t yac_interp_weights_get_interp_count ( struct yac_interp_weights * weights)

returns the count of all target for which the weights contain a stencil

Parameters
[in]weightsinterpolation weights
Returns
count of all targets in weights with a stencil

Definition at line 4847 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_get_interp_tgt()

yac_int * yac_interp_weights_get_interp_tgt ( struct yac_interp_weights * weights)

returns the global ids of all targets for which the weights contain a stencil

Parameters
[in]weightsinterpolation weights
Returns
global ids of all targets in weights with a stencil

Definition at line 4853 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_get_interpolation()

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 )

generates an interpolation from interpolation weights

Parameters
[in]weightsinterpolation weights
[in]reorderdetermines at which processes the weights are to be applied
[in]collection_sizecollection size
[in]frac_mask_fallback_valuefallback value for dynamic fractional masking
[in]scaling_factorscaling factor
[in]scaling_summandscaling summand
[in]yaxt_exchanger_namename of the yaxt exchanger that is to be used in the interpolation
Returns
interpolation
Remarks
if frac_mask_fallback_value != YAC_FRAC_MASK_NO_VALUE, dynamic fractional masking will be used
all target field values, whose source points are not masked by the fractional mask, that receive a interpolation value, which is not a fixed value will by scaled by the following formula:
y = scaling_factor * x + scaling_summand
if yaxt_exchanger_name == NULL, the default exchanger will be used

Definition at line 3776 of file interp_weights.c.

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

◆ yac_interp_weights_new()

struct yac_interp_weights * yac_interp_weights_new ( MPI_Comm comm,
enum yac_location tgt_location,
enum yac_location * src_locations,
size_t num_src_fields )

Constructor for interpolation weights.

Parameters
[in]commMPI communicator
[in]tgt_locationlocation of target field
[in]src_locationslocations of source fields
[in]num_src_fieldsnumber of source fields
Returns
interpolation weights

Definition at line 130 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_write_to_file()

void yac_interp_weights_write_to_file ( struct yac_interp_weights * weights,
char const * filename,
char const * src_grid_name,
char const * tgt_grid_name,
size_t src_grid_size,
size_t tgt_grid_size )

writes interpolation weights to file

Parameters
[in]weightsinterpolation weights
[in]filenamefile name
[in]src_grid_namename of the source grid
[in]tgt_grid_namename of the target grid
[in]src_grid_sizeglobal size of the source grid
[in]tgt_grid_sizeglobal size of the target grid
Remarks
this call is collective
Global grid size argument can be either the global grid size or zero. If a valid global grid size was provided by at least one process, it will be added as a dimension to the weight file.

Definition at line 4615 of file interp_weights.c.

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