PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ init_interpolation_indexes()

static std::vector<unsigned int> pism::init_interpolation_indexes ( const std::vector< double > &  z_input,
const std::vector< double > &  z_output 
)
static

Given two 1D grids, z_input and z_output, for each z_output index k we find an index m so that

z_input[m] < z_output[k] <= z_input[m+1]

In other words, we look for two consecutive points in the input grid that bracket a point in the output grid.

This function sets result[k] = m. This information is then used to interpolate from the grid defined by z_input to the one defined by z_output.

We use constant extrapolation outside the range defined by z_input.

Definition at line 179 of file ColumnInterpolation.cc.

References k.

Referenced by pism::ColumnInterpolation::init_interpolation().