# Introduction to Brian part 2: Synapses

If you haven't yet read part 1: Neurons, go read that now.

As before we start by importing the Brian package and setting up matplotlib for IPython:

```python
from brian2 import *
%matplotlib inline
```

## The simplest Synapse

Once you have some neurons, the next step is to connect them up via synapses. We'll start out with doing the simplest possible type of synapse that causes an instantaneous change in a variable after a spike.

```python
start_scope()

eqs = '''
dv/dt = (I-v)/tau : 1
I : 1
tau : second
'''
G = NeuronGroup(2, eqs, threshold='v>1', reset='v = 0', method='exact')
G.I = [2, 0]
G.tau = [10, 100]*ms

# Comment these two lines out to see what happens without Synapses
S = Synapses(G, G, on_pre='v_post += 0.2')
S.connect(i=0, j=1)

M = StateMonitor(G, 'v', record=True)

run(100*ms)

plot(M.t/ms, M.v[0], label='Neuron 0')
plot(M.t/ms, M.v[1], label='Neuron 1')
xlabel('Time (ms)')
ylabel('v')
legend();
```

There are a few things going on here. First of all, let's recap what is going on with the ``NeuronGroup``. We've created two neurons, each of which has the same differential equation but different values for parameters I and tau. Neuron 0 has ``I=2`` and ``tau=10*ms`` which means that is driven to repeatedly spike at a fairly high rate. Neuron 1 has ``I=0`` and ``tau=100*ms`` which means that on its own - without the synapses - it won't spike at all (the driving current I is 0). You can prove this to yourself by commenting out the two lines that define the synapse.

Next we define the synapses: ``Synapses(source, target, ...)`` means that we are defining a synaptic model that goes from ``source`` to ``target``. In this case, the source and target are both the same, the group ``G``. The syntax ``on_pre='v_post += 0.2'`` means that when a spike occurs in the presynaptic neuron (hence ``on_pre``) it causes an instantaneous change to happen ``v_post += 0.2``. The ``_post`` means that the value of ``v`` referred to is the post-synaptic value, and it is increased by 0.2. So in total, what this model says is that whenever two neurons in G are connected by a synapse, when the source neuron fires a spike the target neuron will have its value of ``v`` increased by 0.2.

However, at this point we have only defined the synapse model, we haven't actually created any synapses. The next line ``S.connect(i=0, j=1)`` creates a synapse from neuron 0 to neuron 1.

## Adding a weight

In the previous section, we hard coded the weight of the synapse to be the value 0.2, but often we would to allow this to be different for different synapses. We do that by introducing synapse equations.

```python
start_scope()

eqs = '''
dv/dt = (I-v)/tau : 1
I : 1
tau : second
'''
G = NeuronGroup(3, eqs, threshold='v>1', reset='v = 0', method='exact')
G.I = [2, 0, 0]
G.tau = [10, 100, 100]*ms

# Comment these two lines out to see what happens without Synapses
S = Synapses(G, G, 'w : 1', on_pre='v_post += w')
S.connect(i=0, j=[1, 2])
S.w = 'j*0.2'

M = StateMonitor(G, 'v', record=True)

run(50*ms)

plot(M.t/ms, M.v[0], label='Neuron 0')
plot(M.t/ms, M.v[1], label='Neuron 1')
plot(M.t/ms, M.v[2], label='Neuron 2')
xlabel('Time (ms)')
ylabel('v')
legend();
```

This example behaves very similarly to the previous example, but now there's a synaptic weight variable ``w``. The string ``'w : 1'`` is an equation string, precisely the same as for neurons, that defines a single dimensionless parameter ``w``. We changed the behaviour on a spike to ``on_pre='v_post += w'`` now, so that each synapse can behave differently depending on the value of ``w``. To illustrate this, we've made a third neuron which behaves precisely the same as the second neuron, and connected neuron 0 to both neurons 1 and 2. We've also set the weights via ``S.w = 'j*0.2'``. When ``i`` and ``j`` occur in the context of synapses, ``i`` refers to the source neuron index, and ``j`` to the target neuron index. So this will give a synaptic connection from 0 to 1 with weight ``0.2=0.2*1`` and from 0 to 2 with weight ``0.4=0.2*2``.

## Introducing a delay

So far, the synapses have been instantaneous, but we can also make them act with a certain delay.

```python
start_scope()

eqs = '''
dv/dt = (I-v)/tau : 1
I : 1
tau : second
'''
G = NeuronGroup(3, eqs, threshold='v>1', reset='v = 0', method='exact')
G.I = [2, 0, 0]
G.tau = [10, 100, 100]*ms

S = Synapses(G, G, 'w : 1', on_pre='v_post += w')
S.connect(i=0, j=[1, 2])
S.w = 'j*0.2'
S.delay = 'j*2*ms'

M = StateMonitor(G, 'v', record=True)

run(50*ms)

plot(M.t/ms, M.v[0], label='Neuron 0')
plot(M.t/ms, M.v[1], label='Neuron 1')
plot(M.t/ms, M.v[2], label='Neuron 2')
xlabel('Time (ms)')
ylabel('v')
legend();
```

As you can see, that's as simple as adding a line ``S.delay = 'j*2*ms'`` so that the synapse from 0 to 1 has a delay of 2 ms, and from 0 to 2 has a delay of 4 ms.

## More complex connectivity

So far, we specified the synaptic connectivity explicitly, but for larger networks this isn't usually possible. For that, we usually want to specify some condition.

```python
start_scope()

N = 10
G = NeuronGroup(N, 'v:1')
S = Synapses(G, G)
S.connect(condition='i!=j', p=0.2)
```

Here we've created a dummy neuron group of N neurons and a dummy synapses model that doens't actually do anything just to demonstrate the connectivity. The line ``S.connect(condition='i!=j', p=0.2)`` will connect all pairs of neurons ``i`` and ``j`` with probability 0.2 as long as the condition ``i!=j`` holds. So, how can we see that connectivity? Here's a little function that will let us visualise it.

```python
def visualise_connectivity(S):
    Ns = len(S.source)
    Nt = len(S.target)
    figure(figsize=(10, 4))
    subplot(121)
    plot(zeros(Ns), arange(Ns), 'ok', ms=10)
    plot(ones(Nt), arange(Nt), 'ok', ms=10)
    for i, j in zip(S.i, S.j):
        plot([0, 1], [i, j], '-k')
    xticks([0, 1], ['Source', 'Target'])
    ylabel('Neuron index')
    xlim(-0.1, 1.1)
    ylim(-1, max(Ns, Nt))
    subplot(122)
    plot(S.i, S.j, 'ok')
    xlim(-1, Ns)
    ylim(-1, Nt)
    xlabel('Source neuron index')
    ylabel('Target neuron index')

visualise_connectivity(S)
```

There are two plots here. On the left hand side, you see a vertical line of circles indicating source neurons on the left, and a vertical line indicating target neurons on the right, and a line between two neurons that have a synapse. On the right hand side is another way of visualising the same thing. Here each black dot is a synapse, with x value the source neuron index, and y value the target neuron index.

Let's see how these figures change as we change the probability of a connection:

```python
start_scope()

N = 10
G = NeuronGroup(N, 'v:1')

for p in [0.1, 0.5, 1.0]:
    S = Synapses(G, G)
    S.connect(condition='i!=j', p=p)
    visualise_connectivity(S)
    suptitle('p = '+str(p))
```

And let's see what another connectivity condition looks like. This one will only connect neighbouring neurons.

```python
start_scope()

N = 10
G = NeuronGroup(N, 'v:1')

S = Synapses(G, G)
S.connect(condition='abs(i-j)<4 and i!=j')
visualise_connectivity(S)
```

Try using that cell to see how other connectivity conditions look like.

You can also use the generator syntax to create connections like this more efficiently. In small examples like this, it doesn't matter, but for large numbers of neurons it can be much more efficient to specify directly which neurons should be connected than to specify just a condition. Note that the following example uses `skip_if_invalid` to avoid errors at the boundaries (e.g. do not try to connect the neuron with index 1 to a neuron with index -2).

```python
start_scope()

N = 10
G = NeuronGroup(N, 'v:1')

S = Synapses(G, G)
S.connect(j='k for k in range(i-3, i+4) if i!=k', skip_if_invalid=True)
visualise_connectivity(S)
```

If each source neuron is connected to precisely one target neuron (which would be normally used with two separate groups of the same size, not with identical source and target groups as in this example), there is a special syntax that is extremely efficient. For example, 1-to-1 connectivity looks like this:

```python
start_scope()

N = 10
G = NeuronGroup(N, 'v:1')

S = Synapses(G, G)
S.connect(j='i')
visualise_connectivity(S)
```

You can also do things like specifying the value of weights with a string. Let's see an example where we assign each neuron a spatial location and have a distance-dependent connectivity function. We visualise the weight of a synapse by the size of the marker.

```python
start_scope()

N = 30
neuron_spacing = 50*umetre
width = N/4.0*neuron_spacing

# Neuron has one variable x, its position
G = NeuronGroup(N, 'x : metre')
G.x = 'i*neuron_spacing'

# All synapses are connected (excluding self-connections)
S = Synapses(G, G, 'w : 1')
S.connect(condition='i!=j')
# Weight varies with distance
S.w = 'exp(-(x_pre-x_post)**2/(2*width**2))'

scatter(S.x_pre/um, S.x_post/um, S.w*20)
xlabel('Source neuron position (um)')
ylabel('Target neuron position (um)');
```

Now try changing that function and seeing how the plot changes.

## More complex synapse models: STDP

Brian's synapse framework is very general and can do things like short-term plasticity (STP) or spike-timing dependent plasticity (STDP). Let's see how that works for STDP.

STDP is normally defined by an equation something like this:

$$\Delta w = \sum_{t_{pre}} \sum_{t_{post}} W(t_{post}-t_{pre})$$

That is, the change in synaptic weight w is the sum over all presynaptic spike times $t_{pre}$ and postsynaptic spike times $t_{post}$ of some function $W$ of the difference in these spike times. A commonly used function $W$ is:

$$W(\Delta t) = \begin{cases}
A_{pre} e^{-\Delta t/\tau_{pre}} & \Delta t>0 \\
A_{post} e^{\Delta t/\tau_{post}} & \Delta t<0
\end{cases}$$

This function looks like this:

```python
tau_pre = tau_post = 20*ms
A_pre = 0.01
A_post = -A_pre*1.05
delta_t = linspace(-50, 50, 100)*ms
W = where(delta_t>0, A_pre*exp(-delta_t/tau_pre), A_post*exp(delta_t/tau_post))
plot(delta_t/ms, W)
xlabel(r'$\Delta t$ (ms)')
ylabel('W')
axhline(0, ls='-', c='k');
```

Simulating it directly using this equation though would be very inefficient, because we would have to sum over all pairs of spikes. That would also be physiologically unrealistic because the neuron cannot remember all its previous spike times. It turns out there is a more efficient and physiologically more plausible way to get the same effect.

We define two new variables $a_{pre}$ and $a_{post}$ which are "traces" of pre- and post-synaptic activity, governed by the differential equations:
$$
\begin{align}
\tau_{pre}\frac{\mathrm{d}}{\mathrm{d}t} a_{pre} &= -a_{pre}\\
\tau_{post}\frac{\mathrm{d}}{\mathrm{d}t} a_{post} &= -a_{post}
\end{align}
$$

When a presynaptic spike occurs, the presynaptic trace is updated and the weight is modified according to the rule:

$$
\begin{align}
a_{pre} &\rightarrow a_{pre}+A_{pre}\\
w &\rightarrow w+a_{post}
\end{align}
$$

When a postsynaptic spike occurs:

$$
\begin{align}
a_{post} &\rightarrow a_{post}+A_{post}\\
w &\rightarrow w+a_{pre}
\end{align}
$$

To see that this formulation is equivalent, you just have to check that the equations sum linearly, and consider two cases: what happens if the presynaptic spike occurs before the postsynaptic spike, and vice versa. Try drawing a picture of it.

Now that we have a formulation that relies only on differential equations and spike events, we can turn that into Brian code.

```python
start_scope()

taupre = taupost = 20*ms
wmax = 0.01
Apre = 0.01
Apost = -Apre*taupre/taupost*1.05

G = NeuronGroup(1, 'v:1', threshold='v>1')

S = Synapses(G, G,
             '''
             w : 1
             dapre/dt = -apre/taupre : 1 (event-driven)
             dapost/dt = -apost/taupost : 1 (event-driven)
             ''',
             on_pre='''
             v_post += w
             apre += Apre
             w = clip(w+apost, 0, wmax)
             ''',
             on_post='''
             apost += Apost
             w = clip(w+apre, 0, wmax)
             ''')
```

There are a few things to see there. Firstly, when defining the synapses we've given a more complicated multi-line string defining three synaptic variables (``w``, ``apre`` and ``apost``). We've also got a new bit of syntax there, ``(event-driven)`` after the definitions of ``apre`` and ``apost``. What this means is that although these two variables evolve continuously over time, Brian should only update them at the time of an event (a spike). This is because we don't need the values of ``apre`` and ``apost`` except at spike times, and it is more efficient to only update them when needed.

Next we have a ``on_pre=...`` argument. The first line is ``v_post += w``: this is the line that actually applies the synaptic weight to the target neuron. The second line is ``apre += Apre`` which encodes the rule above. In the third line, we're also encoding the rule above but we've added one extra feature: we've clamped the synaptic weights between a minimum of 0 and a maximum of ``wmax`` so that the weights can't get too large or negative. The function ``clip(x, low, high)`` does this.

Finally, we have a ``on_post=...`` argument. This gives the statements to calculate when a post-synaptic neuron fires. Note that we do not modify ``v`` in this case, only the synaptic variables.

Now let's see how all the variables behave when a presynaptic spike arrives some time before a postsynaptic spike.

```python
start_scope()

taupre = taupost = 20*ms
wmax = 0.01
Apre = 0.01
Apost = -Apre*taupre/taupost*1.05

G = NeuronGroup(2, 'v:1', threshold='t>(1+i)*10*ms', refractory=100*ms)

S = Synapses(G, G,
             '''
             w : 1
             dapre/dt = -apre/taupre : 1 (clock-driven)
             dapost/dt = -apost/taupost : 1 (clock-driven)
             ''',
             on_pre='''
             v_post += w
             apre += Apre
             w = clip(w+apost, 0, wmax)
             ''',
             on_post='''
             apost += Apost
             w = clip(w+apre, 0, wmax)
             ''', method='linear')
S.connect(i=0, j=1)
M = StateMonitor(S, ['w', 'apre', 'apost'], record=True)

run(30*ms)

figure(figsize=(4, 8))
subplot(211)
plot(M.t/ms, M.apre[0], label='apre')
plot(M.t/ms, M.apost[0], label='apost')
legend()
subplot(212)
plot(M.t/ms, M.w[0], label='w')
legend(loc='best')
xlabel('Time (ms)');
```

A couple of things to note here. First of all, we've used a trick to make neuron 0 fire a spike at time 10 ms, and neuron 1 at time 20 ms. Can you see how that works?

Secondly, we've replaced the ``(event-driven)`` by ``(clock-driven)`` so you can see how ``apre`` and ``apost`` evolve over time. Try reverting this change and see what happens.

Try changing the times of the spikes to see what happens.

Finally, let's verify that this formulation is equivalent to the original one.

```python
start_scope()

taupre = taupost = 20*ms
Apre = 0.01
Apost = -Apre*taupre/taupost*1.05
tmax = 50*ms
N = 100

# Presynaptic neurons G spike at times from 0 to tmax
# Postsynaptic neurons G spike at times from tmax to 0
# So difference in spike times will vary from -tmax to +tmax
G = NeuronGroup(N, 'tspike:second', threshold='t>tspike', refractory=100*ms)
H = NeuronGroup(N, 'tspike:second', threshold='t>tspike', refractory=100*ms)
G.tspike = 'i*tmax/(N-1)'
H.tspike = '(N-1-i)*tmax/(N-1)'

S = Synapses(G, H,
             '''
             w : 1
             dapre/dt = -apre/taupre : 1 (event-driven)
             dapost/dt = -apost/taupost : 1 (event-driven)
             ''',
             on_pre='''
             apre += Apre
             w = w+apost
             ''',
             on_post='''
             apost += Apost
             w = w+apre
             ''')
S.connect(j='i')

run(tmax+1*ms)

plot((H.tspike-G.tspike)/ms, S.w)
xlabel(r'$\Delta t$ (ms)')
ylabel(r'$\Delta w$')
axhline(0, ls='-', c='k');
```

Can you see how this works?

## End of tutorial


```python
import numpy as np
import tt
import tt.cross.rectcross as rect_cross
#import rect_cross
import time
import scipy.special
```

## Problem setting

This code solves multicomponent Smoluchowski equation with source and sink terms

$$\frac{\partial n(\overline{v}, t)}{\partial t} = \frac{1}{2}\int_0^{v_1} ... \int_0^{v_d} K(\overline{v}-\overline{u}; \overline{u}) n(\overline{v} - \overline{u}, t) n(\overline{u}, t) du_1 ... du_d - \\
\\ - n(\overline{v},t) \int_0^{V_{\max}} ... \int_0^{V_{\max}} K(\overline{u}; \overline{v}) n(\overline{u},t) du_1 ... du_d ~ + ~ q(v_1, \ldots, v_d)$$

details about the numerical scheme can be found in papers:$$\\$$
1. Matveev SA, DA Zheltkov, EE Tyrtyshnikov, AP Smirnov, $$\\$$
Tensor train versus Monte Carlo for the multicomponent Smoluchowski coagulation equation, Journal of Computational Physics (2016) 316, 164-179$$\\$$

2. Smirnov AP, Matveev SA, Zheltkov DA, Tyrtyshnikov EE, $$\\$$
Fast and accurate finite-difference method solving multicomponent Smoluchowski coagulation equation with source and sink terms, Procedia Computer Science  (2016) pp. 2141-2146

## Setup the parameters

```python
d = 2
N = 800
r = 1
h = 0.125
tau = 0.025
N_steps = 10
tolerance = 1e-6
print_res = 0
T = N_steps * tau
check_error = 0
```

```python
def Coag_K(x):#Coagulation kernel
    if (x.size % 2) != 0:
        print "Kernel must depend on even number of indeces!"
        exit()

    u = (x[:, :d ] + 1e-2) * h
    v = (x[:, d: ] + 1e-2) * h
    # Ballistic kernel
    # (u^(1/3) + v^(1/3))^2 * sqrt(1/u + 1/v)
    return (np.power(u.sum(axis = 1), 1.0 / 3.0) + np.power(v.sum(axis = 1), 1.0 / 3.0))**2.0 *  np.power( 1.0 / u.sum(axis = 1) + 1.0 / v.sum(axis = 1), 0.5)
    # Generalized multiplication a = 0.1
    #return np.power(u.sum(axis = 1), 0.1) * np.power(v.sum(axis = 1), -0.1) + np.power(u.sum(axis = 1), -0.1) * np.power(v.sum(axis = 1), 0.1)

def q(x):#Source
    return np.exp(-x.sum(axis = 1) * h)
```

```python
def Check_n(x):
    return np.exp(-x.sum(axis = 1) * h)

def Check_Mass(x):
    return (x.sum(axis = 1)) * h

def Start_Cond(x):
    return np.exp(-x.sum(axis = 1) * h)

def Analytical(x):
    return np.exp(-h * x.sum(axis=1)) / (1.0 + T / 2.0)**2 * scipy.special.i0(  2.0 * np.sqrt( h**d * np.prod(x, axis = 1)  * T / (2.0 + T)))
```

## TT-representation of operators

the following cell contains implementation of TT-integration via trapezoids rule for the following integrals:

$$\int_0^{v_1} ... \int_0^{v_d} K(\overline{v}-\overline{u}; \overline{u}) n(\overline{v}) du_1 ... du_d$$

How to perform its simplified version:

\begin{align*}\notag
&q(v_1, \ldots, v_d) =\int_0^{v_1} \ldots\int_0^{v_d} f(v_1 - u_1, \ldots, v_d - u_d) g(u_1, \ldots, u_d) du_1 \ldots du_d \\ \notag
 &=\sum_{\alpha_0, \ldots, \alpha_d} \sum_{\beta_0, \ldots, \beta_d} \int_0^{v_1} \ldots\int_0^{v_d} f_1(\alpha_0, v_1 - u_1, \alpha_1) \ldots f_d(\alpha_{d-1}, v_d - u_d, \alpha_d) g_1(\beta_1, u_1, \beta_2) \ldots g_d(\beta_{d-1}, u_d, \beta_d) du_1 \ldots du_d\\ \notag
&=\sum_{\alpha_1, \ldots, \alpha_d} \sum_{\beta_0, \ldots, \beta_d} \int_0^{v_1} f_1(\alpha_0, v_1 - u_1, \alpha_1)\ g_1(\beta_1, u_1, \beta_2) du_1 \ldots \int_0^{v_d}  f_d(\alpha_{d-1}, v_d - u_d, \alpha_d)  \ldots g_d(\beta_{d-1}, u_d, \beta_d) du_d.
\end{align*}

One-dimensional convolutions will stand as:

\begin{equation}\notag
 h \begin{bmatrix}
\frac{1}{2}f_k(\alpha_{k-1}, v_{k_0}, \alpha_k) &  0  & 0 & 0 & 0 \\
f_k(\alpha_{k-1}, v_{k_1}, \alpha_k) &  \frac{1}{2}f_k(\alpha_{k-1}, v_{k_0}, \alpha_k) & 0 & 0 & 0 \\
f_k(\alpha_{k-1}, v_{k_2}, \alpha_k) &  f(\alpha_{k-1}, v_1, \alpha_k) & \frac{1}{2}f_k(\alpha_{k-1}, v_{k_0}, \alpha_k) & 0 & 0 \\
\ldots & \ldots & \ldots& \ldots & \ldots\\
f_k(\alpha_{k-1}, v_{k_N}, \alpha_k) &  f_k(\alpha_{k-1}, v_{k_{N-1}}, \alpha_k)& \ldots & \ldots & \frac{1}{2}f_k(\alpha_{k-1}, v_{k_0}, \alpha_k)\\
\end{bmatrix} \times
\begin{bmatrix}
\frac{1}{2}g_k(\beta_{k-1}, v_{k_0}, \beta_k)  \\
g_k(\beta_{k-1}, v_{k_1}, \beta_k) \\
g_k(\beta_{k-1}, v_{k_2}, \beta_k)  \\
\ldots \\
g_k(\beta_{k-1}, v_{k_N}, \beta_k) \\
\end{bmatrix}.
\end{equation}

```python
def First_Integral(TT_solution, Coag_Kernel):
    carriages = tt.tensor.to_list(Coag_Kernel)

    #list of last d - 1 carriages
    list_u = carriages[d + 1  :]
    #list of first d - 1 carriages
    list_v = carriages[ : d - 1]

    for alpha in xrange(Coag_Kernel.r[d]):#Loop along the middle index of kernel
        #print 'alpha', alpha
        #insert one slice from d+1-th carriage and create TT
        list_u.insert(0, carriages[d] [alpha : alpha + 1, :, :])
        #append one slice from d-th carriage and create TT
        list_v.append(carriages[d - 1][:, :, alpha : alpha + 1])
        #get tensor trains from the lists
        K_u_part = tt.tensor.from_list(list_u)
        K_v_part = tt.tensor.from_list(list_v)

        #compute Integrands

        K_u_part = tt.multifuncrs([K_u_part, TT_solution], lambda x: x.prod(axis = 1), eps = tolerance) # K_alpha (u) * n(u)
        K_v_part = tt.multifuncrs([K_v_part, TT_solution], lambda x: x.prod(axis = 1), eps = tolerance) # K_alpha(v) * n(v)
        K_u_part = tt.tensor.to_list(K_u_part)
        K_v_part = tt.tensor.to_list(K_v_part)

        for i in xrange(d):
            # add the required zeros, multiply by the integration mesh step
            K_u_part[i][:, 0, :] = K_u_part[i][:, 0, :] / 2.0
            K_v_part[i][:, 0, :] = K_v_part[i][:, 0, :] / 2.0
            K_u_part[i] = np.concatenate( (K_u_part[i], np.zeros([K_u_part[i].shape[0], N - 1, K_u_part[i].shape[2]])), axis = 1)
            # do the first FFT
            K_u_part[i] = np.fft.fft(K_u_part[i], axis = 1, n = 2 * N - 1)
            # add the required zeros and multiply by the integration mesh step
            K_v_part[i] = np.concatenate( (K_v_part[i], np.zeros([K_v_part[i].shape[0], N - 1, K_v_part[i].shape[2]])), axis = 1)
            # do the first FFT
            K_v_part[i] = np.fft.fft(K_v_part[i], axis = 1, n = 2 * N - 1)

        # Build tensor trains after the axis-wide FFTs
        K_u_part = tt.tensor.from_list(K_u_part)
        K_v_part = tt.tensor.from_list(K_v_part)

        # Elementwise product of 2 TTs; Store the results in K_u_part(allows us not to make new TT but replase the old one)
        K_u_part = tt.multifuncrs([K_u_part, K_v_part], lambda x: x.prod(axis = 1), eps = tolerance)

        # Back to list of TT-cores
        K_u_part = tt.tensor.to_list(K_u_part)

        for i in xrange(d):
            # Inverse FFT along each phase-spase axis
            K_u_part[i] = np.fft.ifft(K_u_part[i], axis = 1, n = 2 * N - 1)
            # Truncation. Here we delete the additional (n-1)-zeros
            K_u_part[i] = h *  np.abs(K_u_part[i][:, : N, :]) * np.sign(K_u_part[i][:, : N, :])
            K_u_part[i][:,0,:] *= 0.0;
        # Restore the TT
        K_u_part = tt.tensor.from_list(K_u_part)
        # Save the results in I1
        if alpha == 0:
            I1 = K_u_part
        else:
            I1 = tt.multifuncrs([I1, K_u_part], lambda x: x.sum(axis = 1), eps = tolerance)
        #delete used slices before addition of the new ones
        list_v.pop(d - 1)
        list_u.pop(0)
        #print 'I1'
        #print I1
    #============================================================================================
    I1 = tt.multifuncrs([I1], lambda x: x.real, eps = tolerance)
    return I1
```

## More integrals
The following cell contains implementation of TT-integration via trapezoids rule for the following integrals
$$q(\overline{v}) = \int_0^{V_{\max}} ... \int_0^{V_{\max}} K(\overline{u}; \overline{v}) f(\overline{u}) du_1 ... du_d$$

$$\\$$
How to perform it:
\begin{align*}
& q(\overline{v}) = \int_0^{V_{\max}} ... \int_0^{V_{\max}} K(\overline{u}; \overline{v}) f(\overline{u}) du_1 ... du_d = \sum_{\overline{\alpha}, \overline{\beta}} K_1^v(\alpha_0, v_1, \alpha_1) \ldots K_d^v(\alpha_{d-1}, v_d, \alpha_{d})
\times
\\ & \times \int_0^{V_{\max}} K_1^u(\alpha_{d}, u_1, \alpha_{d+1}) f_1(\beta_0, u_1, \beta_1) du_1 \ldots \int_0^{V_{\max}} K_d^u(\alpha_{2d-1}, u_d, \alpha_{2d}) f_d(\beta_{d-1}, u_d, \beta_d) du_d =
\\ & \sum_{\overline{\alpha}} K_1^v(\alpha_0, v_1, \alpha_1) \ldots K_d^v(\alpha_{d-1}, v_d, \alpha_{d}) \sum_{\overline{\beta}} \int_0^{V_{\max}} K_1^u(\alpha_{d}, u_1, \alpha_{d+1}) f_1(\beta_0, u_1, \beta_1) du_1 \times
\\ &\ldots  \times \int_0^{V_{\max}} K_d^u(\alpha_{2d-1}, u_d, \alpha_{2d}) f_d(\beta_{d-1}, u_d, \beta_d) du_d = \sum_{\alpha_d = 1}^{R_d} \widetilde{K^v_{\alpha_d}}(\overline{v}) I_{\alpha_d},
\end{align*}

```python
def Second_Integral(TT_solution, Coag_Kernel):
    # create weights of rectangular quadrature like tt.ones * h**d;
    # we multiply each carriage by h to avoid the machine zero
    weights = tt.ones(N, d)
    carriages = tt.tensor.to_list(weights)
    for i in xrange(d):
        carriages[i] = carriages[i] * h
        carriages[i][:,0,:] /= 2
        carriages[i][:,N-1,:] /= 2
    weights = tt.tensor.from_list(carriages)
    #create list of carriages of coagulation kernel

    carriages = tt.tensor.to_list(Coag_Kernel)

    #list of first d carriages
    list_v = carriages[ : d]
    #list if last d - 1 carriages
    list_u = carriages[ d + 1 :]
    Integral = np.zeros(Coag_Kernel.r[d])
    #print 'Coagulation kernel in TT format'
    #print Coag_Kernel
    #print '============================================================'
    for alpha in xrange(carriages[d - 1 ].shape[2]):
        #print 'alpha', alpha
        #insert one slice from d+1-th carriage to create TT
        list_u.insert(0, carriages[d] [alpha : alpha + 1, :, :])
        #get tensor trains from the lists
        #K_v_part = tt.tensor.from_list(list_v)
        K_u_part = tt.tensor.from_list(list_u)
        #compute Integrand (u) = K_u(u) * n(u)
        K_u_part = tt.multifuncrs([K_u_part, TT_solution], lambda x: np.prod(x, axis=1), eps = tolerance)
        #compute I[alpha] = \int_0^{v_{max}} Integrand[alpha](u) du will be a vector of size r_d
        # sum of results over the middle d-th index
        Integral[alpha] = tt.dot(K_u_part, weights)
        list_u.pop(0)
    #============================================================================================
    list_v[d - 1] = list_v[d - 1].reshape(list_v[d - 1].shape[0] * list_v[d - 1].shape[1], list_v[d - 1].shape[2])
    list_v[d - 1] = list_v[d - 1].dot(Integral)
    list_v[d - 1] = list_v[d - 1].reshape(carriages[d - 1].shape[0], carriages[d - 1].shape[1], 1)
    I2 = tt.tensor.from_list(list_v)
    I2 = tt.multifuncrs([I2, TT_solution], lambda x: np.prod(x, axis = 1), eps = tolerance)

    #print '============================================================'
    #print 'Coagulation Kernel'
    #print Coag_Kernel
    return I2
```

## Finally

The last cell contains implementation of predictor-corrector scheme solving the Cauchy problem for Smoluchowski coagulation equation
$$
\begin{matrix}
n^{k+\frac{1}{2}}(\overline{i})  =
\frac{\tau}{2} \left( L_{1}(\overline{i}) (n^{k}) - n^{k}(\overline{i})
L_{2}(\overline{i}) (n^{k}) + q^k(\overline{i})  \right) + n^{k}(\overline{i})  \\
n^{k+1 }(\overline{i}) = \tau \left( L_1(\overline{i}) (n^{k+\frac{1}{2}}) -
                                    n^{k+\frac{1}{2}}(\overline{i}) L_{2}(\overline{i}) (n^{k+\frac{1}{2}}) +
                                    q^{k+\frac{1}{2}}(\overline{i})\right) + n^{k}(\overline{i}).
\end{matrix}
$$

```python
#approximate starting condition
print 'Approximate starting condition'
x0 = tt.rand(N, d, r)
TT_Solution = rect_cross.cross(Start_Cond, x0, nswp = 6, kickrank = 1, rf = 2)
#TT_Solution = TT_Solution.round(tolerance)
print 'Approximate TT for check of total mass'
Check_mass  = rect_cross.cross(Check_Mass, x0, nswp = 6, kickrank = 1, rf = 2)
#TT_Analyt   = rect_cross.cross(Analytical, x0, nswp = 6, kickrank = 1, rf = 2)
#print TT_Analyt

print 'Approximate source'
source = rect_cross.cross(q, x0, nswp = 6, kickrank = 1, rf = 2)
weights = tt.ones(N, d)
carriages = tt.tensor.to_list(weights)
for i in xrange(d):
    carriages[i] = carriages[i] * h
    carriages[i][:, 0, :] /= 2
    carriages[i][:, N - 1, :] /= 2
weights = tt.tensor.from_list(carriages)

Mass_tt = tt.multifuncrs([TT_Solution, Check_mass], lambda x: np.prod(x, axis = 1 ), eps = tolerance)
#Mass_tt = Mass_tt.round(tolerance/1e2)
print 'Starting mass = ', tt.dot(Mass_tt, weights)
print 'Approximate kernel'
#test with ballistic kernel
#
#x0 = tt.rand(N, 2 * d, r)
#Coag_Kernel = rect_cross.cross(Coag_K, x0, nswp = 6, kickrank = 1, rf = 2)
#print Coag_Kernel
#print '============================================================'
#
#test with K(u,v) = 1
#
Coag_Kernel = tt.ones(N, 2 * d)
#Coag_Kernel = Coag_Kernel.round(tolerance)

t1 = time.clock()
print 'alpha = ', Coag_Kernel.r[d]
density_file = open('density_time.log', 'w')
for t in xrange(N_steps):
    print '=============================================================='
    print 'Step', t + 1
    print '=============================================================='

    First_integral = 0.25 * tau * First_Integral(TT_Solution, Coag_Kernel)

    Second_integral = - tau * 0.5 * Second_Integral(TT_Solution, Coag_Kernel)
    print 'First integral predictor'
    print First_integral
    print 'Second integral predictor'
    print Second_integral

    TT_Solution_predictor = tt.multifuncrs([TT_Solution, First_integral, Second_integral, 0.5 * tau * source], lambda x: np.sum(x, axis = 1) , eps = tolerance)

    First_integral = 0.5 * tau * First_Integral(TT_Solution_predictor, Coag_Kernel)

    Second_integral = - tau * Second_Integral(TT_Solution_predictor, Coag_Kernel)

    print 'First integral corrector'
    print First_integral
    print 'Second integral corrector'
    print Second_integral

    TT_Solution = tt.multifuncrs([TT_Solution, First_integral, Second_integral, tau * source], lambda x:  np.sum(x, axis = 1), eps = tolerance)

    Mass_tt = tt.multifuncrs([TT_Solution, Check_mass], lambda x: np.prod(x, axis = 1), eps = tolerance)
    print 'mass = ', tt.dot(Mass_tt, weights)
    print 'density =', tt.dot(TT_Solution, weights)
    density_file.write("%f %f\n"%((t + 1) * tau, tt.dot(TT_Solution, weights)))
    print 'Solution'
    print TT_Solution
    print '=============================================================='

    if print_res and (N <= 20000):
        print 'saving results into file %s.dat'%(t)
        res = open("%s.dat"%(t), 'w')
        for x in xrange(N):
            res.writelines("\n")
            for y in xrange(N):
                #print x*h, ' ', y*h, ' ', (x + y) * h * TT_Solution[x,y]
                res.writelines("%s %s %s\n"%(y * h, x * h, np.abs((x + y) * h * TT_Solution[y,x].real)))
        res.close()
t2 = time.clock()
print 'time = ', t2 - t1

```

    Approximate starting condition
    swp: 0/5 er_rel = 1.7e+02 er_abs = 7.9e+02 erank = 3.0 fun_eval: 6400
    swp: 1/5 er_rel = 3.5e-16 er_abs = 1.6e-15 erank = 5.0 fun_eval: 19200
    Approximate TT for check of total mass
    swp: 0/5 er_rel = 1.0e+00 er_abs = 8.6e+04 erank = 3.0 fun_eval: 6400
    swp: 1/5 er_rel = 2.4e-12 er_abs = 2.1e-07 erank = 5.0 fun_eval: 19200
    Approximate source
    swp: 0/5 er_rel = 1.7e+02 er_abs = 7.9e+02 erank = 3.0 fun_eval: 6400
    swp: 1/5 er_rel = 3.5e-16 er_abs = 1.6e-15 erank = 5.0 fun_eval: 19200
    =multifuncrs= sweep 1{2}, max_dy: 1.136e+13, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.056e-14, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.056e-14, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    Starting mass =  1.99999796802
    Approximate kernel
    alpha =  1
    ==============================================================
    Step 1
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 4.419e+36, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.107e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 3.425e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    =multifuncrs= sweep 1{2}, max_dy: 3.560e+43, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.370e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 5.370e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    =multifuncrs= sweep 1{2}, max_dy: 1.010e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.819e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 4.819e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    =multifuncrs= sweep 1{2}, max_dy: 1.487e+09, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.681e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 1.765e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    =multifuncrs= sweep 1{2}, max_dy: 8.127e+25, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.601e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 3.394e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    =multifuncrs= sweep 1{2}, max_dy: 6.233e+10, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.900e-16, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 4.054e-16, erank: 2
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=1, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=1, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 9.334e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.114e-16, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.114e-16, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    =multifuncrs= sweep 1{2}, max_dy: 5.004e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.056e-16, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.056e-16, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    =multifuncrs= sweep 1{2}, max_dy: 5.818e+06, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.377e-16, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.377e-16, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    =multifuncrs= sweep 1{2}, max_dy: 5.606e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.781e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.781e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.838e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 5.838e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 3.858e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.063e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.063e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.279e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 2.296e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.907e+20, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.555e-10, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.555e-10, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    =multifuncrs= sweep 1{2}, max_dy: 2.925e+06, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.112e-16, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.112e-16, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 0.000e+00, erank: 1.41421
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=2, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 3.098e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.457e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.457e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 7.446e-09, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 7.446e-09, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.224e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.951e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.951e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.876e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.876e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    mass =  2.04980249602
    density = 1.0148514638
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 2
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 2.217e+07, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.161e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.161e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.834e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.834e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.071e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.221e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.221e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 8.148e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 8.148e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.211e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.321e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.321e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.022e-08, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.787e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 2.385e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.348e-02, erank: 1.73205
    =multifuncrs= sweep 2{2}, max_dy: 1.348e-02, erank: 2.44949
    =multifuncrs= sweep 3{1}, max_dy: 6.006e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 6.006e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.122e+14, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.542e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.542e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.225e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.225e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 2.948e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.461e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.461e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.188e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.255e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 1.943e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.624e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.624e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.514e-08, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.514e-08, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 6.855e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.748e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.748e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.948e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 5.948e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.241e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.208e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.208e+00, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.961e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.961e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.078e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.978e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.978e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.221e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.785e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 6.651e+05, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.080e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.080e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 7.298e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 7.298e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.267e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.079e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.079e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.685e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.685e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 9.232e+03, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.564e-04, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.564e-04, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.485e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.786e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 3.518e+14, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.089e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.089e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.881e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.881e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 2.258e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.817e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.817e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.254e-14, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.254e-14, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    mass =  2.09960415223
    density = 1.02679080751
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 3
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 6.997e+08, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.289e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.289e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.026e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.026e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.665e+03, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.565e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.565e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.944e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.944e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 5.511e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.831e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.831e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.629e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.811e-06, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 1.832e-06, erank: 3
    =multifuncrs= sweep 4{2}, max_dy: 2.189e-06, erank: 2.82843
    =multifuncrs= sweep 5{1}, max_dy: 2.224e-06, erank: 3
    =multifuncrs= sweep 5{2}, max_dy: 2.224e-06, erank: 2.82843
    =multifuncrs= sweep 6{1}, max_dy: 1.331e-06, erank: 3
    =multifuncrs= sweep 6{2}, max_dy: 1.331e-06, erank: 2.82843
    =multifuncrs= sweep 7{1}, max_dy: 3.802e-07, erank: 2.82843
    =multifuncrs= sweep 7{2}, max_dy: 5.828e-07, erank: 2.82843
    =multifuncrs= sweep 8{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.525e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.783e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.783e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.974e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.636e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 9.725e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.338e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.338e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.743e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.743e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.172e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.331e-04, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.331e-04, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.297e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.297e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 8.765e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.246e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.246e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.810e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.810e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 2.956e+08, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.045e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.045e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 6.203e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 6.203e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.666e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.474e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.474e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.392e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.392e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.292e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.468e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.468e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 6.652e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.522e-06, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 1.589e-06, erank: 3
    =multifuncrs= sweep 4{2}, max_dy: 2.303e-06, erank: 2.82843
    =multifuncrs= sweep 5{1}, max_dy: 2.377e-06, erank: 3
    =multifuncrs= sweep 5{2}, max_dy: 2.500e-06, erank: 2.82843
    =multifuncrs= sweep 6{1}, max_dy: 2.574e-06, erank: 3
    =multifuncrs= sweep 6{2}, max_dy: 2.574e-06, erank: 2.82843
    =multifuncrs= sweep 7{1}, max_dy: 1.393e-06, erank: 3
    =multifuncrs= sweep 7{2}, max_dy: 2.432e-06, erank: 2.82843
    =multifuncrs= sweep 8{1}, max_dy: 2.498e-06, erank: 3
    =multifuncrs= sweep 8{2}, max_dy: 2.498e-06, erank: 2.82843
    =multifuncrs= sweep 9{1}, max_dy: 1.213e-06, erank: 3
    =multifuncrs= sweep 9{2}, max_dy: 2.877e-06, erank: 2.82843
    =multifuncrs= sweep 10{1}, max_dy: 2.957e-06, erank: 3
    =multifuncrs= sweep 10{2}, max_dy: 2.957e-06, erank: 2.82843
    =multifuncrs= sweep 11{1}, max_dy: 2.946e-06, erank: 3
    =multifuncrs= sweep 1{2}, max_dy: 8.956e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 9.375e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 9.375e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.522e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 5.522e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.086e+04, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 9.884e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 9.884e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 1.327e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 1.327e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 4.594e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.386e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.386e-03, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.041e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 5.041e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 5.023e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.613e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.613e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 5.514e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 5.514e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 7.882e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.709e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.709e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.999e-14, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.999e-14, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    mass =  2.14939980131
    density = 1.03842725406
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 4
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 6.984e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.200e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.200e+00, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.939e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.435e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 5.410e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.782e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.782e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 9.225e-15, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 9.225e-15, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.027e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.949e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.949e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 8.920e-09, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 8.920e-09, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.691e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.397e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.397e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.742e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.742e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.127e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.549e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.549e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.390e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.815e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 5.870e+14, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.032e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.032e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.920e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 2.920e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 5.062e+06, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.352e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.352e-02, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 4.085e-07, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 4.085e-07, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.029e+11, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.233e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.233e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.122e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 2.570e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.677e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.865e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.865e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.986e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.395e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.076e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.142e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.142e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.283e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.283e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 6.357e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.734e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.734e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 8.862e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 8.862e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.189e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.015e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.015e+00, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 2.633e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.470e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    =multifuncrs= sweep 1{2}, max_dy: 1.237e+14, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.584e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.584e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.726e-16, erank: 2.82843
    =multifuncrs= sweep 3{2}, max_dy: 3.726e-16, erank: 2.82843
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 1.73205
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=3, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 1.370e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.511e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.511e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 7.764e-09, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 7.764e-09, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.991e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.462e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.462e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.465e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.465e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    mass =  2.19920484084
    density = 1.04976637808
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 5
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 9.601e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.666e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.666e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.860e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.860e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.221e+08, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.446e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.446e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.138e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.566e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.726e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.452e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.452e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 7.151e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 7.438e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 5.823e+04, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.278e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.278e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 7.302e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 7.302e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.578e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.227e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.227e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.239e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.239e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.099e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.215e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.215e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.437e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.221e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 3.234e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.160e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.160e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 9.498e-09, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 9.498e-09, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.361e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.064e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.064e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.318e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.318e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.511e+05, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.216e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.216e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.522e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.178e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.208e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.909e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.909e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.221e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.221e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 9.117e+07, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.032e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.032e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.322e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.322e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.169e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.025e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.025e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.251e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.251e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.901e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.346e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.346e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.294e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.294e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 8.434e+09, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.922e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.922e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.850e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.850e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 8.405e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.721e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.721e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.003e-13, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.003e-13, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.24901031613
    density = 1.0608119911
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 6
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 9.187e+03, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.703e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.703e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.521e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.521e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.335e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.866e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.866e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.201e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.201e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.317e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.512e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.512e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.574e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.574e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 9.974e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.374e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.374e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.112e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.112e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 4.439e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.564e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.564e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.824e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.824e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.460e+09, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.771e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.771e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.601e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.601e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 4.518e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.807e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.807e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.107e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.107e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 9.964e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.054e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.054e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 6.802e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 6.802e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.546e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.524e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.524e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.016e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.016e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.176e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.106e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.106e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.005e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.085e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.163e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.802e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.802e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.842e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.842e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.104e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.134e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.134e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.297e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.297e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.095e+10, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.815e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.815e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.858e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.858e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 7.903e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.849e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.849e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.702e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.702e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 5.737e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.787e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.787e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.748e-13, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.748e-13, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.29881549398
    density = 1.07156877549
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 7
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 5.076e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.498e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.498e-03, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.291e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.291e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.267e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.736e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.736e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.580e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.580e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.623e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.469e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.469e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.066e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.066e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.746e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.164e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.164e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.614e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.614e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.021e+08, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.702e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.702e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 7.353e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 7.353e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 9.606e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.263e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.263e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.007e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.007e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 1.155e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.083e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.083e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.840e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.840e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.634e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.221e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.221e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.121e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.763e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 4.180e+05, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.048e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.048e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.482e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.482e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.354e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.450e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.450e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.413e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.413e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.612e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.844e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.844e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.880e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.880e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.199e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.305e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.305e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 7.130e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 7.130e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.091e+05, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.475e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.475e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.768e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.768e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 8.344e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.324e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.324e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 9.822e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 9.822e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 4.397e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.379e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.379e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.750e-13, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.750e-13, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.34862036667
    density = 1.08204150277
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 8
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 1.381e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.470e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.470e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.026e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.026e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.121e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 2.013e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 2.013e-03, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.876e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.876e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.046e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 9.253e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 9.253e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 9.705e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 9.705e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 4.420e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.465e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.465e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.366e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.366e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.098e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.514e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.514e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.711e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.900e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.610e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.518e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.518e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.976e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.976e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 2.715e+06, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.469e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.469e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 6.269e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 6.269e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.363e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.764e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.764e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.201e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.201e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 6.177e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.361e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.361e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.528e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.528e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.026e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 9.806e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 9.806e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.381e-06, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.381e-06, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 6.617e-07, erank: 3
    =multifuncrs= sweep 4{2}, max_dy: 1.058e-06, erank: 3
    =multifuncrs= sweep 5{1}, max_dy: 1.158e-06, erank: 3.16228
    =multifuncrs= sweep 5{2}, max_dy: 1.158e-06, erank: 3
    =multifuncrs= sweep 6{1}, max_dy: 1.106e-06, erank: 3.16228
    =multifuncrs= sweep 6{2}, max_dy: 1.106e-06, erank: 3
    =multifuncrs= sweep 7{1}, max_dy: 6.539e-07, erank: 3
    =multifuncrs= sweep 7{2}, max_dy: 8.886e-07, erank: 3
    =multifuncrs= sweep 8{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 2.675e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.304e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.304e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 8.167e-12, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 8.168e-12, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.102e+19, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.899e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.899e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.096e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.096e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.371e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.462e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.462e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.069e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.069e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 1.430e+03, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.752e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.752e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.547e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.547e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 8.124e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.291e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.291e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.145e-13, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.145e-13, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.3984246333
    density = 1.09223503476
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 9
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 2.238e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.929e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.929e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.418e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.744e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.849e+01, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.023e-03, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.023e-03, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.443e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.248e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.007e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.042e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.042e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.488e-06, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.488e-06, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 1.214e-06, erank: 3.16228
    =multifuncrs= sweep 4{2}, max_dy: 1.214e-06, erank: 3
    =multifuncrs= sweep 5{1}, max_dy: 1.349e-06, erank: 3.16228
    =multifuncrs= sweep 5{2}, max_dy: 1.349e-06, erank: 3
    =multifuncrs= sweep 6{1}, max_dy: 1.168e-06, erank: 3.16228
    =multifuncrs= sweep 6{2}, max_dy: 1.301e-06, erank: 3
    =multifuncrs= sweep 7{1}, max_dy: 1.439e-06, erank: 3.16228
    =multifuncrs= sweep 7{2}, max_dy: 1.439e-06, erank: 3
    =multifuncrs= sweep 8{1}, max_dy: 1.236e-06, erank: 3.16228
    =multifuncrs= sweep 8{2}, max_dy: 1.236e-06, erank: 3
    =multifuncrs= sweep 9{1}, max_dy: 1.220e-06, erank: 3.16228
    =multifuncrs= sweep 9{2}, max_dy: 1.676e-06, erank: 3
    =multifuncrs= sweep 10{1}, max_dy: 1.791e-06, erank: 3.16228
    =multifuncrs= sweep 10{2}, max_dy: 1.791e-06, erank: 3
    =multifuncrs= sweep 11{1}, max_dy: 1.486e-06, erank: 3.16228
    =multifuncrs= sweep 1{2}, max_dy: 1.941e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 3.299e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 3.299e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 6.356e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 6.356e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 5.941e+07, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.102e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.102e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.450e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.826e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 5.601e+10, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.458e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.458e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.220e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.220e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 6.378e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.011e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.011e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 9.497e-08, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 9.497e-08, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 5.850e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.058e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.058e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.218e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.218e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.353e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.505e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.505e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.762e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.391e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.135e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.112e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.112e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.741e-06, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.741e-06, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 1.911e-08, erank: 3.16228
    =multifuncrs= sweep 4{2}, max_dy: 2.290e-08, erank: 3.16228
    =multifuncrs= sweep 5{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 4.518e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 5.202e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 5.202e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.754e-16, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 5.754e-16, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 3.322e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.739e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.739e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.727e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.817e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.037e+02, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.846e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.846e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 5.374e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 5.374e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=5, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 5.582e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.473e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.473e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.282e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.282e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.473e+15, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.188e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.188e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.945e-13, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.945e-13, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.44822794007
    density = 1.10215431315
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    ==============================================================
    Step 10
    ==============================================================
    =multifuncrs= sweep 1{2}, max_dy: 1.109e+04, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.202e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.202e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.958e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.065e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 3.450e+12, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.522e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.522e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.934e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.934e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.095e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.159e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.159e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.752e-06, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 2.752e-06, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 4.291e-08, erank: 3.16228
    =multifuncrs= sweep 4{2}, max_dy: 4.291e-08, erank: 3.16228
    =multifuncrs= sweep 5{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 2.555e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.825e-02, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.825e-02, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.222e-15, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 4.222e-15, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 1.695e+12, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.184e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.184e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 4.244e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 4.244e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.586e+14, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.372e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.372e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 2.044e-15, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 2.044e-15, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=5, n(1)=800
    r(2)=1

    Second integral predictor
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 7.680e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 6.938e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 6.938e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.366e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 1.366e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.186e+16, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.901e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.901e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.669e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.669e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.222e+09, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 8.817e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 8.817e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.376e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.376e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.005e+00, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.226e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.226e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.800e-06, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 3.800e-06, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 3.588e-08, erank: 3.16228
    =multifuncrs= sweep 4{2}, max_dy: 4.245e-08, erank: 3.16228
    =multifuncrs= sweep 5{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 1.067e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.264e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.264e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 1.707e-15, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 1.707e-15, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    =multifuncrs= sweep 1{2}, max_dy: 8.721e+05, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.345e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.345e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.565e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.565e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 1.043e+18, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 7.183e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 7.183e-01, erank: 2.64575
    =multifuncrs= sweep 3{1}, max_dy: 3.023e-16, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.023e-16, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    First integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=5, n(1)=800
    r(2)=1

    Second integral corrector
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    =multifuncrs= sweep 1{2}, max_dy: 7.497e+17, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 1.224e+00, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 1.224e+00, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 3.217e-07, erank: 3
    =multifuncrs= sweep 3{2}, max_dy: 3.217e-07, erank: 3
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2
    =multifuncrs= sweep 1{2}, max_dy: 2.574e+12, erank: 1.41421
    =multifuncrs= sweep 2{1}, max_dy: 4.190e-01, erank: 2
    =multifuncrs= sweep 2{2}, max_dy: 4.190e-01, erank: 2.82843
    =multifuncrs= sweep 3{1}, max_dy: 6.352e-14, erank: 3.16228
    =multifuncrs= sweep 3{2}, max_dy: 6.352e-14, erank: 3.16228
    =multifuncrs= sweep 4{1}, max_dy: 0.000e+00, erank: 2.23607
    mass =  2.49802980483
    density = 1.11180434054
    Solution
    This is a 2-dimensional tensor
    r(0)=1, n(0)=800
    r(1)=4, n(1)=800
    r(2)=1

    ==============================================================
    time =  34.464517

```python

```