PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Public Member Functions | Public Attributes | List of all members
pism::LocalInterpCtx Class Reference

#include <LocalInterpCtx.hh>

Public Member Functions

 LocalInterpCtx (const grid::InputGridInfo &input_grid, const Grid &internal_grid, InterpolationType type)
 
 LocalInterpCtx (const grid::InputGridInfo &input_grid, const Grid &internal_grid, const std::vector< double > &z_internal, InterpolationType type)
 Construct a local interpolation context. More...
 
int buffer_size () const
 

Public Attributes

std::array< int, 4 > start
 
std::array< int, 4 > count
 
std::shared_ptr< Interpolationx
 
std::shared_ptr< Interpolationy
 
std::shared_ptr< Interpolationz
 

Detailed Description

The "local interpolation context" describes the processor's part of the source NetCDF file (for regridding).

The local interpolation context contains the details of how the processor's block of the new computational domain fits into the domain of the netCDF file. Note that each vertical column of the grid is owned by exactly one processor.

For any particular dimension, we have a new computational domain \([a,b]\) with spacing \(h\) so there are \(n = (b - a) / h\) interior cells, indexed by \(\{i_0, \dots, i_n\}\). The local processor owns a range \(\{i_m, \dots, i_{m'}\}\). Suppose the netCDF file has domain \([A,B]\), spacing \(H\), and \(N = (B - A) / H\) cells. In order to interpolate onto these points, we need the indices \(\{I_m, \dots, I_{m'}\}\) of the netCDF file so that

\[ [x(i_m), x(i_{m'})] \quad \text{is a subset of} \quad [x(I_m), x(I_{m'})] \]

The arrays start and count have 4 integer entries, corresponding to the dimensions t, x, y, z(zb).

Definition at line 54 of file LocalInterpCtx.hh.


The documentation for this class was generated from the following files: