Algorithm for the new FMM

The algorithm for the new FMM is given as follows:

**Steps 1-3.**Same as the steps 1-3 in 3.2.**Step 4.**Computation of the coefficients of the exponential expansion:Compute the coefficients of the exponential expansion at each cell using (34)-(47), taking the origin (

*O*) at the centroid of the cell.**Step 5.**Computation of the coefficients of the local expansion:We compute the coefficients of the local expansion of cells of level

*l*, starting from*l*=2 and increasing*l*. Now we consider cell*C*and cell*C*' which is contained in the interaction list of*C*. Considering the position of*C*' relative to*C*, we translate the coefficients of the exponential expansion via (48) and (49) as the centre of the exponential expansion is shifted from the centroid of*C*(*O*) to that of*C*' ( ) and then use appropriate formulae in (50)-(63) to convert the coefficients of the exponential expansion to the coefficients of the local expansion. After carrying out these conversions about all cells in the interaction list of*C*, we add them together via (64) and (65) to obtain the contribution from the interaction list of*C*to the coefficients of the local expansion. To these contributions we add the coefficients of the local expansion of the parent of*C*with the origin shifted from the centroid of the parent to that of*C*via (21) and (22) to obtain the coefficients of the local expansion associated with*C*.**Step 6.**Same as the 5th step in 3.2.