Algorithm for the new FM-BIEM

The algorithm for the new version of FMM is given as follows:

**Steps 1-3.**Same as the steps 1-3 in the algorithm described in 3.2.**Step 4.**Computation of the coefficients of the exponential expansion:Compute the coefficients of the exponential expansion at each cell using (4.13)-(4.18) and (4.19), taking the origin 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*. In the evaluation of the coefficients of the local expansion of a level*l*cell*C*, we first consider the contribution from the interaction list of*C*, to which a cell*C*' is assumed to belong. Depending on the position of*C*' relative to*C*, we use (4.20) to shift the centre of the exponential expansion of*C*' from the centroid of*C*' to that of*C*. Next convert the contributions from all the cells in the uplist, downlist, northlist, southlist, eastlist and westlist to the coefficients of the local expansion via (4.21), (4.22)-(4.27) and add them together to obtain the contributions to the coefficients of the local expansion of*C*from the interaction list of*C*. To these 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 (3.29) to obtain the coefficients of the local expansion of*C*.**Step 6.**Evaluation of the integral in (3.15): This step is the same as the step 5 in the algorithm describe in 3.2.