#!/bin/sh
sed -e 's/\(^[ \t]*\)\(forAll[ \t]*(\)\(.*\)\(\.boundaryField()\)/\1const volScalarField::GeometricBoundaryField\& b\3 = \3\4;\n\n\1\2b\3/g' $*
