  Creating a highly parallel and flexible discrete element software requires an
interdisciplinary approach, where expertise from different disciplines is
combined. On the one hand domain specialists provide interaction models between
particles. On the other hand high-performance computing specialists optimize
the code to achieve good performance on different hardware architectures. In
particular, the software must be carefully crafted to achieve good scaling on
massively parallel supercomputers. Combining all this in a flexible and
extensible, widely usable software is a challenging task. In this article we
outline the design decisions and concepts of a newly developed particle
dynamics code MESA-PD that is implemented as part of the waLBerla multi-physics
framework. Extensibility, flexibility, but also performance and scalability are
primary design goals for the new software framework. In particular, the new
modular architecture is designed such that physical models can be modified and
extended by domain scientists without understanding all details of the parallel
computing functionality and the underlying distributed data structures that are
needed to achieve good performance on current supercomputer architectures. This
goal is achieved by combining the high performance simulation framework
waLBerla with code generation techniques. All code and the code generator are
released as open source under GPLv3 within the publicly available waLBerla
framework (www.walberla.net).
