YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Enumerations | Functions
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)
 
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 4784 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 4760 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 4766 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 
)

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
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

Definition at line 3699 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 129 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 4528 of file interp_weights.c.

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