We present a new technique, the ‘Double Jacobian’, to solve problems in cylindrical or spherical geometries, for example the Stokes flow problem for convection in Earth's mantle. Our approach combines the advantages of working simultaneously in Cartesian and polar or spherical coordinates. The governing matrix equations are kept in Cartesian coordinates, thereby preserving their Cartesian symmetry. However, the element geometry is described as a linear simplex in polar or spherical coordinates, thereby preserving appropriate cylindrical or spherical surfaces and internal interfaces. Isoparametric representations can still be used to define complex surface shapes. Using linear polar or spherical elements allows search routines for triangular or tetrahedral simplexes to rapidly find arbitrary points in terms of their polar or spherical coordinates. The Double Jacobian approach becomes especially powerful when element sizes vary strongly within the mesh, while the exact cylindrical or spherical surfaces or internal interfaces have to be preserved, as happens in several geophysical applications.