Towards generating efficient flow solvers with the ExaStencils approach. (25th May 2017) - Kuckuk, Sebastian; Haase, Gundolf; Vasco, Diego A.; Köstler, Harald
Summary: ExaStencils aims at providing intuitive interfaces for the specification of numerical problems and resulting solvers, particularly those from the class of (geometric) multigrid methods. It envisions a multi‐layered domain‐specific language and a sophisticated code generation framework ultimately emitting source code in a chosen target language. We present our recent advances in fully generating solvers applied to 3D fluid mechanics for nonisothermal/non‐Newtonian flows. In detail, a system of time‐dependent, nonlinear partial differential equations is discretized on a cubic, nonuniform, and staggered grid using finite volumes. We examine the contained problem of coupled Navier‐Stokes and temperature equations, which are linearized and solved using the SIMPLE algorithm and geometric multigrid solvers, as well as the incorporation of non‐Newtonian properties. Furthermore, we provide details on necessary extensions to our domain‐specific language and code generation framework, in particular, those concerning the handling of boundary conditions, support for nonequidistant staggered grids, and supplying specialized functions to express operations reoccurring in the scope of finite volume discretizations. Many of these enhancements are generalizable and thus suitable for utilization in similar projects. Lastly, we demonstrate the applicability of our code generation approach by providing convincing performance results for fully generated and automatically parallelized solvers.