  Assumption of certain hierarchy of soft ferromagnet energy terms, realized in
small enough flat nano-elements, allows to obtain explicit expressions for
their magnetization distributions. By minimising the energy terms sequentially,
from most to the least important, magnetization distributions are expressed as
solutions of Riemann-Hilbert boundary value problem for a function of complex
variable. A number of free parameters, corresponding to positions of vortices
and anti-vortices, still remain in the expression. These parameters can be
found by computing and minimizing the total magnetic energy of the particle
with no approximations. Thus, the presented approach is a factory of realistic
Ritz functions for analytical micromagnetic calculations. These functions are
so versatile, that they may even find applications on their own (e.g. for
fitting magnetic microscopy images). Examples are given for multi-vortex
magnetization distributions in circular cylinder, and for 2-dimensional domain
walls in thin magnetic strips.
