Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
 
int buffer_size () const
 

Public Attributes

std::array< int, 4 > start
 
std::array< int, 4 > count
 
std::shared_ptr< Interpolation1Dx
 
std::shared_ptr< Interpolation1Dy
 
std::shared_ptr< Interpolation1Dz
 

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: