File interpolation.hxx#

Functions

inline BoutReal interp(const stencil &s)#

Perform interpolation between centre -> shifted or vice-versa.

Interpolate using 4th-order staggered formula

Parameters:

s[in] Input stencil. mm -> -3/2, m -> -1/2, p -> +1/2, pp -> +3/2

template<typename T>
const T interp_to(const T &var, CELL_LOC loc, const std::string region = "RGN_ALL")#

Interpolate to a give cell location.

Interpolate between different cell locations

NOTE: This requires communication if the result is required in guard cells NOTE: Since corner guard cells cannot be communicated, it never makes sense to calculate interpolation in guard cells. If guard cell values are required, we must communicate (unless interpolating in z). Since mesh->communicate() communicates both x- and y-guard cells by default, there is no difference between RGN_ALL, RGN_NOX and RGN_NOY.

Parameters:
  • var[in] Input variable

  • loc[in] Location of output values

  • region[in] Region where output will be calculated