YetAnotherCoupler 3.4.0
Loading...
Searching...
No Matches
interp_method_spmap.h File Reference
#include "interp_method.h"
Include dependency graph for interp_method_spmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT   (0.0)
 
#define YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT   (0.0)
 
#define YAC_INTERP_SPMAP_WEIGHTED_DEFAULT   (YAC_INTERP_SPMAP_AVG)
 
#define YAC_INTERP_SPMAP_SCALE_DEFAULT   (YAC_INTERP_SPMAP_NONE)
 
#define YAC_INTERP_SPMAP_SRC_SPHERE_RADIUS_DEFAULT   (1.0)
 
#define YAC_INTERP_SPMAP_TGT_SPHERE_RADIUS_DEFAULT   (1.0)
 

Enumerations

enum  yac_interp_spmap_weight_type { YAC_INTERP_SPMAP_AVG = 0 , YAC_INTERP_SPMAP_DIST = 1 }
 
enum  yac_interp_spmap_scale_type { YAC_INTERP_SPMAP_NONE = 0 , YAC_INTERP_SPMAP_SRCAREA = 1 , YAC_INTERP_SPMAP_INVTGTAREA = 2 , YAC_INTERP_SPMAP_FRACAREA = 3 }
 

Functions

struct interp_methodyac_interp_method_spmap_new (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, double tgt_sphere_radius)
 

Macro Definition Documentation

◆ YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT

#define YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT   (0.0)

◆ YAC_INTERP_SPMAP_SCALE_DEFAULT

#define YAC_INTERP_SPMAP_SCALE_DEFAULT   (YAC_INTERP_SPMAP_NONE)
Examples
test_interp_method_spmap_parallel.c.

Definition at line 37 of file interp_method_spmap.h.

◆ YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT

#define YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT   (0.0)
Examples
test_interp_method_spmap_parallel.c.

Definition at line 34 of file interp_method_spmap.h.

◆ YAC_INTERP_SPMAP_SRC_SPHERE_RADIUS_DEFAULT

#define YAC_INTERP_SPMAP_SRC_SPHERE_RADIUS_DEFAULT   (1.0)

◆ YAC_INTERP_SPMAP_TGT_SPHERE_RADIUS_DEFAULT

#define YAC_INTERP_SPMAP_TGT_SPHERE_RADIUS_DEFAULT   (1.0)
Examples
test_interp_method_spmap_parallel.c.

Definition at line 39 of file interp_method_spmap.h.

◆ YAC_INTERP_SPMAP_WEIGHTED_DEFAULT

#define YAC_INTERP_SPMAP_WEIGHTED_DEFAULT   (YAC_INTERP_SPMAP_AVG)
Examples
test_interp_method_spmap_parallel.c.

Definition at line 36 of file interp_method_spmap.h.

Enumeration Type Documentation

◆ yac_interp_spmap_scale_type

Enumerator
YAC_INTERP_SPMAP_NONE 

weights are not scaled

YAC_INTERP_SPMAP_SRCAREA 

weights are multiplied by the area of the associated source cell

YAC_INTERP_SPMAP_INVTGTAREA 

weights are muliplied by the inverse of the area of the associated target cell

YAC_INTERP_SPMAP_FRACAREA 

weights are multiplied by the area of the associated source cell and the inverse of the area of the associated target cell

Definition at line 21 of file interp_method_spmap.h.

◆ yac_interp_spmap_weight_type

Enumerator
YAC_INTERP_SPMAP_AVG 
YAC_INTERP_SPMAP_DIST 

Definition at line 16 of file interp_method_spmap.h.

Function Documentation

◆ yac_interp_method_spmap_new()

struct interp_method * yac_interp_method_spmap_new ( 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,
double tgt_sphere_radius )

Constructor for a interpolation method of type interp_method_spmap
This method searches for each unmasked source point the closest unmasked target point.
If the maximum search distance is > 0.0, only target points that are within this distance from the source points are being considered. If spread_distance is > 0.0, the method uses the previously found target points as a starting point. Around each starting point, a bounding circle is generated. Afterwards for each starting point all target cells whose bounding circles intersect with the generated one are put into a list. Out of this list all target cells connected directly or indirectly through other cells from this list to the target cell of the starting are selected for the interpolation. Then a weighting method is applied to the selected target cells to generate the weights. Afterwards the weights are scaled.

Parameters
[in]spread_distancespreading distance
[in]max_search_distancemaximum search distance
[in]weight_typeweighting type
[in]scale_typescaling type
[in]src_sphere_radiussphere radius used for source cell area computation
[in]tgt_sphere_radiussphere radius used for target cell area computation
Remarks
the unit for the spread and maximum search distance is Radian

Definition at line 644 of file interp_method_spmap.c.

Here is the caller graph for this function: