Generated code uses uncheckedFastGetData
Using walberla::field::Field::uncheckedFastGetData
in the template instead of walberla::field::Field::getData
is dangerous. I kind of doubt it's so much faster that it would be worth forgoing the type checking. It's easy enough to accidentally switch around BlockDataID arguments to a sweep and you only notice because your results are wrong.
It seems like this is a workaround to permit retrieving e.g. a walberla::field::GhostLayerField<walberla::math::Matrix3<double>, 3ul>
as a walberla::field::GhostLayerField<double, 27ul>
, but there should be ways to do that in a type-checked manner. This workaround probably only works for layout zyxf anyway and would silently fail for fzyx.
Edited by Michael Kuron