  The collective behavior of active agents, whether herds of wildebeest or
microscopic actin filaments propelled by molecular motors, is an exciting
frontier in biological and soft matter physics. Almost three decades ago, Toner
and Tu developed a continuum theory of the collective action of flocks, or
herds, that helped launch the modern field of active matter. One challenge
faced when applying continuum active matter theories to living phenomena is the
complex geometric structure of biological environments. Both macroscopic and
microscopic herds move on asymmetric curved surfaces, like undulating grass
plains or the surface layers of cells or embryos, which can render problems
analytically intractable. In this work, we present a formulation of the
Toner-Tu flocking theory that uses the finite element method to solve the
governing equations on arbitrary curved surfaces. First, we test the developed
formalism and its numerical implementation in channel flow with scattering
obstacles and on cylindrical and spherical surfaces, comparing our results to
analytical solutions. We then progress to surfaces with arbitrary curvature,
moving beyond previously accessible problems to explore herding behavior on a
variety of landscapes. Our approach allows the investigation of transients and
dynamic solutions not revealed by analytic methods. It also enables versatile
incorporation of new geometries and boundary conditions and efficient sweeps of
parameter space. Looking forward, the work presented here lays the groundwork
for a dialogue between Toner-Tu theory and data on collective motion in
biologically-relevant geometries, from drone footage of migrating animal herds
to movies of microscopic cytoskeletal flows within cells.
