defining boundary field predicate in C++
It is easier to define boundary fields in the C++ side, because the registered
fields can be cast to Grid<Real, dim> and compared to the boundary dimension.
This makes it easy to create a list of boundary fields. However, care must be
taken when registering scalar fields: an additional length 1 dimension should be
appended to the array so that it is cast to the correct Grid type.