R. Correll, M. Huq, S. Klasky

The evolution equations that the TCODE solves are as follows:

∂_{t}g_{ij} = −2αK_{ij} + D_{i}β_{j} + D_{j}β_{i}  (1)
∂_{t}K_{j}^{i} = L_{β}K_{j}^{i} − D^{i}D_{j}α + α (R_{j}^{i} + KK_{j}^{i})  (2)

where g_{ij} is the 3-metric, K_{j}^{i} is the extrinsic curvature, D_{i} is the covariant derivative compatible with g_{ij}, α is the lapse function, β^{i} is the shift vector and L_{β} is the Lie derivative along the vector field β. L_{β}K_{j}^{i} is given by the following equation:

L_{β}K_{j}^{i} = β^{k}D_{k}K_{j}^{i} − K_{j}^{k}D_{k}β^{i} + K_{k}^{i}D_{j}β_{k}  (3)

In order to eliminate redundant variables we examine the structure of the equations to see which quantities can be computed with the use of temporary arrays/functions. The variables that will be stored in the tcode are as follows:

Grid Function Number of independent components
g_{ij}  6 × 2 independent components(multiply by two for n+1 timestep)
g^{ij}  6 independent components(required for various stages)
K_{j}^{i}  9 × 2 components (multiply by two for n+1 timestep)
Γ_{jk}^{i}  18 components (stored instead of g_{ij,k})
R_{ij}  6 components (Raised when needed in eqn. (2))
α  scalar function
β^{i}  3 components (β_{i} can be obtained using g_{ij})

Hence the lower limit on required variables for the solution to the evolution is 64 grid variables. For a 65^{3} grid at one word a point for each grid function this comes to a minimum of ∼ 18Mwords of memory. Of course in the real code this number will be higher once additional variables temporary variables are figured in.

For the solution of the evolution equations we examine eqns (1,2) to see what sort of temporary variables we can use to evaluate the right-hand-sides. We can reuse a set of 9 temporary grid functions throughout the code. We shall proceed with first calculation of the connection coefficients, the Ricci tensor and then term by term in the evolution equations.

A. Connection coefficients

The calculation of the connection coefficients can be broken up into several stages. This obviates the necessity for storing the first derivatives of the 3-metric which saves us 18 grid functions.

The connection coefficients are given by

Γ_{jk}^{i} = \frac{1}{2}g^{il} (g_{lj,k} + g_{lk,j} − g_{jk,l})  (4)

The calculation can be broken up into three separate sets using 9 temporary variables. The choice of 9 will be more apparent as we deal with each of the terms in eqns. (1,2). For each of the 18 connection coefficients we calculate using the following steps: For the first term in eqn. (4)

Γ_{jk}^{i} = \frac{1}{2}g^{il}g_{lj,k}
= \frac{1}{2} (g^{i1}g_{1j,k} + g^{i2}g_{2j,k} + g^{i3}g_{3j,k})  (5)

(6)

For the second term in eqn. (4)

Γ_{jk}^{i} = Γ_{jk}^{i} + \frac{1}{2}g^{il}g_{lk,j}
= Γ_{jk}^{i} + \frac{1}{2} (g^{i1}g_{1k,j} + g^{i2}g_{2k,j} + g^{i3}g_{3k,j})  (7)

(8)

For the third term in eqn. (4)

Γ_{jk}^{i} = Γ_{jk}^{i} − \frac{1}{2}g^{il}g_{jk,l}
= Γ_{jk}^{i} − \frac{1}{2} (g^{i1}g_{jk,1} + g^{i2}g_{jk,2} + g^{i3}g_{jk,3})  (9)

(10)

The derivatives of the 3-metric in each of the three steps is stored in 9 different temporary grid functions and is used to calculate each term as given by eqns. (5,7,9). These temporary variables will be reused in other parts of the evolution program. One can make use of equivalence statements to make the code more easily readable. 9 additional variables amounts to 2.5Mwords of additional storage for a 65^{3} run.

B. Ricci tensor

The calculation of the Ricci tensor can be similarly broken up into several segments with the use of 9 temporary grid functions once more. The Ricci tensor is given by

R_{ij} = Γ_{ij,a}^{a} − Γ_{ia,j}^{a} + Γ_{ab}^{a}Γ_{ij}^{b} − Γ_{bj}^{a}Γ_{ia}^{b}  (11)

The last two terms in eqn. (11) are simple combinations of the Γ’s. The first two terms can be evaluated with the use of temporary grid functions without storing derivatives of the connection coefficients throughout the program. This saves us a total of 54 grid functions which is a total of 15Mwords for a 65^{3} grid. The evaluation of the Ricci tensor is broken as follows:

R_{ij} = Γ_{ij,a}^{a}
= Γ_{ij,1}^{1} + Γ_{ij,2}^{2} + Γ_{ij,3}^{3}  (12)
R_{ij} = R_{ij} − Γ_{ia,j}^{a}
= R_{ij} − (Γ_{i1,j}^{1} + Γ_{i2,j}^{2} + Γ_{i3,j}^{3})  (13)
R_{ij} = R_{ij} + Γ_{ab}^{a}Γ_{ij}^{b} − Γ_{bj}^{a}Γ_{ia}^{b}  (14)

where in eqns. (11,12) terms like Γ_{ij,1}^{1} and Γ_{i1,j}^{1} are calculating using temporary arrays.

C. Evolution equation for 3-metric

The evolution equation for the 3-metric is given as before,

∂_{t}g_{ij} = −2αK_{ij} + D_{i}β_{j} + D_{j}β_{i}.

(15)

The evaluation of the second and third terms is carried out by once again using 9 temporary grid functions. Recall that β^{i}, the contravariant form of the shift, is stored. Since g_{ij} is compatible with D_{i} we can rewrite D_{i}β_{j} = g_{jk}D_{i}β^{k}. Hence we are left with calculating

D_{i}β_{j} = g_{jk} (∂_{i}β^{k} − Γ_{il}^{k}β^{l}) .  (16)

Here once again we use a 9 grid functions to store the components of ∂_{i}β^{k} first and then add Γ_{il}^{k}β^{l} to form eqn. (16). Then evaluating eqn. (1) becomes a matter of using the temporary variables for D_{i}β_{j}.

D. Evolution equation for extrinsic curvature

∂_{t}K_{j}^{i} = L_{β}K_{j}^{i} − D^{i}D_{j}α + α (R_{j}^{i} + KK_{j}^{i})