  The microstructure of metals and foams can be effectively modelled with
anisotropic power diagrams (APDs), which provide control over the shape of
individual grains. One major obstacle to the wider adoption of APDs is the
computational cost that is associated with their generation. We propose a novel
approach to generate APDs with prescribed statistical properties, including
fine control over the size of individual grains. To this end, we rely on fast
optimal transport algorithms that stream well on Graphics Processing Units
(GPU) and handle non-uniform, anisotropic distance functions. This allows us to
find large APDs that best fit experimental data and generate synthetic
high-resolution microstructures in (tens of) seconds. This unlocks their use
for computational homogenisation, which is especially relevant to machine
learning methods that require the generation of large collections of
representative microstructures as training data. The paper is accompanied by a
Python library, PyAPD, which is freely available at:
www.github.com/mbuze/PyAPD.
