Generalize surface heat flux calculations. Create mesh function to give
index based on position.