Needs rewriting to avoid unnecessary code duplication, preferably using standard OpenFOAM interpolation functionality.