Based on patch contributed by Tobias Holzmann Resolves feature-request https://bugs.openfoam.org/view.php?id=2525