ENH: applyBoundaryLayer - updated for parallel running