Commit 9a3aa1f7 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed sort_add_and_weights to sort_weights.

parent aaa4096b
Pipeline #4674 passed with stages
in 16 minutes and 38 seconds
......@@ -282,7 +282,7 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
{
// Successfully found iw,jw - compute weights
bicubicSetWeights(iw, jw, weights);
sort_add_and_weights_bicubic(src_add, weights);
sort_weights_bicubic(src_add, weights);
tgt_array[tgt_cell_add] = bicubicRemap(src_array, weights, src_add, gradients);
}
else
......@@ -300,7 +300,7 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
{
tgt_grid->cell_frac[tgt_cell_add] = 1.;
renormalizeWeights(src_lats, weights);
sort_add_and_weights_bicubic(src_add, weights);
sort_weights_bicubic(src_add, weights);
tgt_array[tgt_cell_add] = bicubicRemap(src_array, weights, src_add, gradients);
}
}
......
......@@ -325,7 +325,7 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
{
// Successfully found iw,jw - compute weights
bilinearSetWeights(iw, jw, weights);
sort_add_and_4weights(src_add, weights);
sort_weights_n4(src_add, weights);
tgt_array[tgt_cell_add] = bilinearRemap(src_array, weights, src_add);
}
else
......@@ -345,7 +345,7 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
{
tgt_grid->cell_frac[tgt_cell_add] = 1.;
renormalizeWeights(src_lats, weights);
sort_add_and_4weights(src_add, weights);
sort_weights_n4(src_add, weights);
tgt_array[tgt_cell_add] = bilinearRemap(src_array, weights, src_add);
}
}
......
......@@ -948,7 +948,7 @@ remapConserv(NormOpt normOpt, RemapSearch &rsearch, const double *restrict src_a
if (num_weights)
{
sort_add_and_weights(num_weights, srch_add[ompthID].data(), partial_weights.data());
sort_weights(num_weights, srch_add[ompthID].data(), partial_weights.data());
// Normalize weights using destination area if requested
remapNormalizeWeights(normOpt, tgt_area, tgt_grid->cell_frac[tgt_cell_add], num_weights, partial_weights.data());
tgt_array[tgt_cell_add] = conservRemap(src_array, num_weights, partial_weights, srch_add[ompthID]);
......
......@@ -74,7 +74,7 @@ sortAddweights4(Addweight4 *addweights)
}
void
sort_add_and_4weights(size_t *src_add, double *weights)
sort_weights_n4(size_t *src_add, double *weights)
{
constexpr size_t numWeights = 4;
size_t n;
......@@ -100,7 +100,7 @@ sort_add_and_4weights(size_t *src_add, double *weights)
}
void
sort_add_and_weights(size_t numWeights, size_t *src_add, double *weights)
sort_weights(size_t numWeights, size_t *src_add, double *weights)
{
size_t n;
for (n = 1; n < numWeights; ++n)
......@@ -128,7 +128,7 @@ sort_add_and_weights(size_t numWeights, size_t *src_add, double *weights)
}
void
sort_add_and_weights_bicubic(size_t *src_add, double (&weights)[4][4])
sort_weights_bicubic(size_t *src_add, double (&weights)[4][4])
{
constexpr size_t numWeights = 4;
size_t n;
......
......@@ -55,8 +55,8 @@ void store_weightlinks(int lalloc, size_t numWeights, size_t *srch_add, double *
void store_weightlinks_bicubic(size_t *srch_add, double (&weights)[4][4], size_t cell_add, std::vector<WeightLinks4> &weightLinks);
void weightLinksToRemapLinks(int lalloc, size_t gridSize, std::vector<WeightLinks> &weightLinks, RemapVars &rv);
void weightLinks4ToRemapLinks(size_t gridSize, std::vector<WeightLinks4> &weightLinks, RemapVars &rv);
void sort_add_and_weights(size_t numWeights, size_t *src_add, double *weights);
void sort_add_and_4weights(size_t *src_add, double *weights);
void sort_add_and_weights_bicubic(size_t *src_add, double (&weights)[4][4]);
void sort_weights(size_t numWeights, size_t *src_add, double *weights);
void sort_weights_n4(size_t *src_add, double *weights);
void sort_weights_bicubic(size_t *src_add, double (&weights)[4][4]);
#endif /* REMAP_STORE_LINK */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment