## 1. Introduction

[2] Convective flows govern much of the dynamics of the Earth. Examples of such flows are convection in the Earth's mantle, convection in magma chambers and the dynamics of the world oceans. The observed geochemical differences of the mid-ocean ridge basalts and the ocean island basalts imply the existence of chemically distinct reservoirs [e.g., *Zindler and Hart*, 1986]. The size and location of these reservoirs however has remained unclear. The traditional model where a depleted, well mixed upper layer is separated from an enriched lower mantle seems unlikely in the light of recent results from seismic tomography and geodynamic modeling (for a recent review see *van Keken et al.* [2003]). *Kellogg et al.* [1999] proposed a compositional stratification in the deep mantle as source region for the observed heterogeneities. While this idea has stirred much attention most investigators favor a thin, heavy layer near the core-mantle boundary. This layer could coincide with the seismologically observed D″ layer which exhibits high variations in seismic wave speed. Nowadays these time-dependent flows are often studied by means of three dimensional (3-D) numerical models which solve the equations for the transport of heat and momentum alternatingly. These flows are often driven by a temperature difference. But often there is also an active or passive chemical component that has to be considered. In magma chambers we observe partial melt zones and chemically driven flows. The dynamics of convective ocean circulation is often influenced not only by the temperature but also by the salt content, a phenomenon termed double-diffusive convection. One characteristic of these flows is that the chemical diffusivity is much lower than the thermal diffusivity. This reaches from a factor of 100 for a heat-salt system in water up to almost infinity for solid state diffusion in the Earth's mantle. The implementation of a chemical component with a very low diffusivity into a numerical model is difficult. The reason for this is theso-called numerical diffusion introduced by Eulerian discretization schemes. They artificially enhance the diffusion of an advected field. Therefore a Lagrangian method is often used to simulate the chemical component. This can be done by means of independent tracer-particles advected with the flow or by interconnected tracers forming a tracer-line (2-D) or tracer-surface (3-D). In the two dimensional case the tracer-line starts up with a small ensemble of interconnected tracers and once the distance between two neighboring tracers exceeds a threshold a new tracer is inserted into the line where the position of the new tracer is interpolated from the position of the neighboring tracers.

[3] For 2-D flows *van Keken et al.* [1997] compared three different methods: a field approach, tracer particles and a tracer line (also called marker-chain) method for a convective scenario related to the Earth's mantle. They concluded that there is no generally favorable method. While the field approach is computationally very efficient the chemical heterogeneities disappear due to numerical diffusion after some time which depends on the grid resolution and the numerical scheme chosen. The tracer approach does not suffer from artificial diffusion but needs a huge amount of tracer particles in order to give accurate results when calculating a concentration field from the tracer distribution. The tracer-line method in contrast is initially computationally very efficient and does also not suffer from artificial diffusion. Since the flow has however regions where the largest Lyapunov exponents are larger than unity (i.e., nearby tracers diverge exponentially in time) the number of tracers needed, and therefore the computational resources required, increases exponentially with time. Therefore the tracer-line method seems to be best suited when either only a calculation for a short time period is required or the chemical component has a density contrast connected with it which limits the entrainment.

[4] When applying these methods in 3-D numerical simulation the constraints imposed by the limited computational resources are even more strict. For the field approach it is almost impossible to, for example double, the spatial resolution of the computational grid since this would result in, at best, an increase of computer time by a factor of 16 (eight time as many computational nodes and the restriction on the length of the time step).

[5] For the tracer method the number of tracers required increases with the spatial resolution in the second horizontal direction. To be able to carry out tracer statistics in 3-D comparable to the 2-D calculations the number of tracers has thus to be increased in the order of 10^{3}. Apart from being computational expensive this is also often impossible due to the limited memory available. An example of this method in 3-D is given in [*Tackley*, 2002]. He applied a tracer ratio method which is described in detail in [*Tackley and King*, 2003]. They claimed to be able to avoid statistical noise and found it sufficient to use ∼5 tracers per computational cell. But even with such a low number of tracers their investigations are limited to boxes with an aspect-ratio of four. A comparison of their results with the method presented here would certainly be interesting but exceeds the scope of this paper.

[6] This makes the computationally efficient tracer-line (in 3-D tracer-surface) method very interesting, at least for the certain class of problems mentioned above. Unfortunately the transition from a tracer-line in a 2-D flow to a tracer-surface in a 3-D flow is not as straightforward as with the field approach or with the tracer methods. One has to start with a mesh of tracer with a triangular or quadrilateral connectivity. In such meshes each tracer is typically connected to 4 (quadrilateral) or 6 (triangular) neighboring tracers. This connectivity, also called valence, determines the spline function needed when interpolating the position of a new tracer. Once the new tracer has been inserted into the mesh the valence of the neighboring tracers changes. Since the interpolating spline function used in this work does depend on the valence of the mesh we thus need different interpolation functions for every different connectivity in the mesh. The refinement of polygonal meshes is a very active field of research in computer graphics called Subdivision Surfaces and has developed interpolation schemes for different connectivity.

[7] When a density difference is connected to a chemical component it can act as a restoring force. The governing flow is often spatially heterogenous and the spatial location of the heterogeneities is varying in time (e.g., the location of an upwelling plume). The restoring force of the density contrast may result in a situation where a highly deformed, and therefore highly refined region, returns to a simple geometry. In order to limit the computational expenses we also need a surface simplification algorithm which removes excess elements of the surface.

[8] We thus need two algorithms: one for grid refinement and one for grid simplification. At least the grid simplification has to be adaptive in order to account for the changing flow field.

[9] While the algorithms used for refinement [*Catmull and Clark*, 1978; *Doo*, 1978; *Dyn et al.*, 1987] are already known for more than 20 years they have only recently been used in computer graphics in fields such as movie production and computer games. They have developed a wealth of different interpolation schemes which have different properties. The research in the area of surface simplification has also been motivated by these fields (see *Heckbert and Garland* [1995] for a review). The ultimate aim of these techniques is the visual appearance of objects and their mathematical background and geometrical properties are rigorously defined.

[10] In this paper we want to show that these techniques can be successfully applied in geophysical fluid dynamics. In section 2 we give a brief introduction to the field of subdivision surfaces. Section 3 introduces a surface simplification algorithm based on a quadratic penalty method. In section 4 we will discuss a simple application to geophysical flows.