Formulate stencil kernels in pystencils and generate optimized C++ Code for waLBerla from it. Look at the waLBerla documentation on how to use it.
Install with
pip install pystencils-walberla
and enable WALBERLA_BUILD_WITH_CODEGEN in waLBerla's CMake.