/***********************************************************************************
                 OpenCS Project: www.daetools.com
                 Copyright (C) Dragan Nikolic
************************************************************************************
OpenCS is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License version 3 as published by the Free Software
Foundation. OpenCS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the
OpenCS software; if not, see <http://www.gnu.org/licenses/>.
***********************************************************************************/
#include <mpi.h>
#include "diurnal_kinetics_2d.h"
#include <OpenCS/models/cs_model_builder.h>
#include <OpenCS/evaluators/cs_evaluator_sequential.h>
#include <OpenCS/simulators/cs_simulators.h>
using namespace cs;

const char* simulation_options_json =
#include "simulation_options-ode.json"
;

/* Reimplementation of CVodes cvsDiurnal_kry example.
 * 2-species diurnal kinetics advection-diffusion PDE system in 2D:
 *
 *   dc(i)/dt = Kh*(d/dx)^2 c(i) + V*dc(i)/dx + (d/dy)(Kv(y)*dc(i)/dy) + Ri(c1,c2,t), i = 1,2
 *
 * where
 *   R1(c1,c2,t) = -q1*c1*c3 - q2*c1*c2 + 2*q3(t)*c3 + q4(t)*c2
 *   R2(c1,c2,t) =  q1*c1*c3 - q2*c1*c2 - q4(t)*c2
 *   Kv(y) = Kv0*exp(y/5)
 *
 * Kh, V, Kv0, q1, q2, and c3 are constants, and q3(t) and q4(t) vary diurnally.
 * The problem is posed on the square:
 *    0 <= x <= 20 (km)
 *   30 <= y <= 50 (km)
 * with homogeneous Neumann boundary conditions, and integrated for time t in
 *   0 <= t <= 86400 sec (1 day)
 * The PDE system is discretised using the central differences on a uniform 10 x 10 mesh. */
int main(int argc, char *argv[])
{
    uint32_t Nx = 200;
    uint32_t Ny = 200;

    // Homogenous Neumann BCs at all four edges: dudz|boundary = 0.0.
    csNumber_t bc_flux_at_all_four_edges(0.0);
    DiurnalKinetics_2D dk(Nx, Ny, bc_flux_at_all_four_edges);

    uint32_t    Ndofs                         = 0;
    uint32_t    Nvariables                    = dk.Nequations;
    real_t      defaultVariableValue          = 0.0;
    real_t      defaultAbsoluteTolerance      = 1e-5;
    std::string defaultVariableName           = "x";

    printf("Nvariables: %u\n", Nvariables);

    /* 1. Initialise model builder with the number of variables/equations. */
    csModelBuilder_t mb;
    mb.Initialize_ODE_System(Nvariables,
                             Ndofs,
                             defaultVariableValue,
                             defaultAbsoluteTolerance,
                             defaultVariableName);
    printf("Model builder initialised\n");

    /* 2. Create and set model equations. */
    const csNumber_t&              time     = mb.GetTime();
    const std::vector<csNumber_t>& C_values = mb.GetVariables();

    std::vector<csNumber_t> equations(Nvariables);
    dk.CreateEquations(C_values, time, equations);
    printf("Model equations generated\n");

    mb.SetModelEquations(equations);
    printf("Model equations set\n");

    /*
    printf("Equations expresions:\n");
    for(uint32_t i = 0; i < Nvariables; i++)
    {
        std::string expression = equations[i].node->ToLatex();
        printf(" $$%5d: %s $$\n", i, expression.c_str());
    }
    */

    /* 3. Generate a sequential model. */
    // Set initial conditions
    std::vector<real_t> C0(Nvariables, 0.0);
    dk.SetInitialConditions(C0);
    mb.SetVariableValues(C0);

    real_t startTime         = 0.0;
    real_t timeHorizon       = 86400;
    real_t reportingInterval = 100;
    real_t relativeTolerance = 1e-5;

    const size_t bsize = 8192;
    char buffer[bsize];
    std::snprintf(buffer, bsize, simulation_options_json, startTime, timeHorizon, reportingInterval, relativeTolerance);
    std::string simulationOptions = buffer;

    // Use the simple graph partitioner to generate a single model for a sequential simulation.
    uint32_t Npe = 1;
    std::vector<std::string> balancingConstraints;
    std::string inputFilesDirectory = "ode_example_3-sequential";
    csGraphPartitioner_Simple partitioner;
    std::vector<csModelPtr> models_sequential = mb.PartitionSystem(Npe, &partitioner, balancingConstraints, true);
    mb.ExportModels(models_sequential, inputFilesDirectory, simulationOptions);
    printf("Generated model for the Diurnal-Kinetics model\n");

    // Use the Metis graph partitioner to generate models for 4 processing elements for a parallel simulation.
    {
        uint32_t Npe = 4;
        std::vector<std::string> balancingConstraints = {"Ncs"};
        std::string inputFilesDirectory = "ode_example_3-Npe=4-[Ncs]";
        csGraphPartitioner_Metis partitioner(PartGraphRecursive);
        std::vector<csModelPtr> models_parallel = mb.PartitionSystem(Npe, &partitioner, balancingConstraints);
        mb.ExportModels(models_parallel, inputFilesDirectory, simulationOptions);
        printf("Generated models for Npe = %u %s-[%s]\n", Npe, partitioner.GetName().c_str(), "Ncs");
    }

    /* 4. Simulate the sequential model using the libOpenCS_Simulators. */
    printf("Simulation of '%s' (using libOpenCS_Simulators)\n\n", inputFilesDirectory.c_str());
    MPI_Init(&argc, &argv);
    csSimulate_ODE(inputFilesDirectory);
    MPI_Finalize();

    return 0;
}

/* Results from CVodes cvsDiurnal_kry:
time        C1[0]       C2[0]
0       25.00E+04	25.00E+10
100    -01.70E-06	25.00E+10
200     23.33E-08	25.00E+10
300     96.15E-10	25.00E+10
400     70.01E-10	25.01E+10
500     16.32E-10	25.01E+10
600    -06.13E-10	25.01E+10
700    -11.65E-10	25.01E+10
800     01.01E-12	25.01E+10
900     04.97E-10	25.01E+10
1000	03.52E-10	25.02E+10
1100	26.23E-12	25.02E+10
1200	30.06E-12	25.02E+10
1300	22.24E-12	25.02E+10
1400	14.80E-12	25.02E+10
1500	01.91E-12	25.02E+10
1600   -05.32E-12	25.03E+10
1700   -04.33E-12	25.03E+10
1800	75.30E-14	25.03E+10
1900	01.62E-12	25.03E+10
2000	01.33E-10	25.04E+10
2100	17.32E-10	25.04E+10
2200	47.64E-10	25.04E+10
2300	95.45E-10	25.04E+10
2400	01.63E-08	25.05E+10
2500	02.54E-08	25.05E+10
2600	01.96E-06	25.05E+10
2700	05.50E-06	25.05E+10
2800	10.91E-06	25.06E+10
2900	18.64E-06	25.06E+10
3000	29.19E-06	25.06E+10
3100	02.44E-04	25.07E+10
3200	07.31E-04	25.07E+10
3300	14.84E-04	25.07E+10
3400	25.69E-04	25.08E+10
3500	40.59E-04	25.08E+10
3600	73.97E-04	25.08E+10
3700	01.59E-02	25.09E+10
3800	03.32E-02	25.09E+10
3900	06.66E-02	25.10E+10
4000	12.85E-02	25.10E+10
4100	24.09E-02	25.10E+10
4200	43.79E-02	25.11E+10
4300	77.37E-02	25.11E+10
4400	01.33E+00	25.12E+10
4500	02.24E+00	25.12E+10
4600	03.67E+00	25.12E+10
4700	05.90E+00	25.13E+10
4800	09.29E+00	25.13E+10
4900	14.35E+00	25.14E+10
5000	21.77E+00	25.14E+10
5100	32.50E+00	25.15E+10
5200	47.74E+00	25.15E+10
5300	69.10E+00	25.16E+10
5400	98.63E+00	25.16E+10
5500	01.39E+02	25.17E+10
5600	01.93E+02	25.17E+10
5700	02.65E+02	25.18E+10
5800	03.61E+02	25.18E+10
5900	04.85E+02	25.19E+10
6000	06.45E+02	25.19E+10
6100	08.50E+02	25.20E+10
6200	11.10E+02	25.21E+10
6300	14.37E+02	25.21E+10
6400	18.44E+02	25.22E+10
6500	23.48E+02	25.22E+10
6600	29.67E+02	25.23E+10
6700	37.21E+02	25.24E+10
6800	46.35E+02	25.24E+10
6900	57.36E+02	25.25E+10
7000	70.52E+02	25.25E+10
7100	86.17E+02	25.26E+10
7200	01.05E+04	25.27E+10
7300	01.26E+04	25.27E+10
7400	01.52E+04	25.28E+10
7500	01.82E+04	25.29E+10
7600	02.16E+04	25.29E+10
7700	02.56E+04	25.30E+10
7800	03.01E+04	25.31E+10
7900	03.53E+04	25.31E+10
8000	04.13E+04	25.32E+10
8100	04.80E+04	25.33E+10
8200	05.56E+04	25.34E+10
8300	06.42E+04	25.34E+10
8400	07.38E+04	25.35E+10
8500	08.46E+04	25.36E+10
8600	09.66E+04	25.36E+10
8700	11.00E+04	25.37E+10
8800	12.47E+04	25.38E+10
8900	14.11E+04	25.39E+10
9000	15.91E+04	25.39E+10
9100	17.89E+04	25.40E+10
9200	20.05E+04	25.41E+10
9300	22.42E+04	25.42E+10
9400	25.01E+04	25.42E+10
9500	27.82E+04	25.43E+10
9600	30.87E+04	25.44E+10
9700	34.17E+04	25.45E+10
9800	37.73E+04	25.45E+10
9900	41.58E+04	25.46E+10
10000	45.71E+04	25.47E+10
10100	50.15E+04	25.48E+10
10200	54.91E+04	25.49E+10
10300	60.00E+04	25.49E+10
10400	65.43E+04	25.50E+10
10500	71.22E+04	25.51E+10
10600	77.37E+04	25.52E+10
10700	83.91E+04	25.52E+10
10800	90.84E+04	25.53E+10
10900	98.18E+04	25.54E+10
11000	01.06E+06	25.55E+10
11100	01.14E+06	25.56E+10
11200	01.23E+06	25.56E+10
11300	01.32E+06	25.57E+10
11400	01.41E+06	25.58E+10
11500	01.51E+06	25.59E+10
11600	01.62E+06	25.59E+10
11700	01.73E+06	25.60E+10
11800	01.84E+06	25.61E+10
11900	01.96E+06	25.62E+10
12000	02.09E+06	25.63E+10
12100	02.22E+06	25.63E+10
12200	02.35E+06	25.64E+10
12300	02.49E+06	25.65E+10
12400	02.64E+06	25.66E+10
12500	02.79E+06	25.66E+10
12600	02.94E+06	25.67E+10
12700	03.10E+06	25.68E+10
12800	03.27E+06	25.69E+10
12900	03.44E+06	25.69E+10
13000	03.62E+06	25.70E+10
13100	03.80E+06	25.71E+10
13200	03.99E+06	25.72E+10
13300	04.19E+06	25.73E+10
13400	04.39E+06	25.73E+10
13500	04.59E+06	25.74E+10
13600	04.80E+06	25.75E+10
13700	05.01E+06	25.76E+10
13800	05.23E+06	25.77E+10
13900	05.46E+06	25.77E+10
14000	05.69E+06	25.78E+10
14100	05.92E+06	25.79E+10
14200	06.16E+06	25.80E+10
14300	06.41E+06	25.81E+10
14400	06.66E+06	25.82E+10
14500	06.91E+06	25.83E+10
14600	07.17E+06	25.84E+10
14700	07.44E+06	25.85E+10
14800	07.70E+06	25.86E+10
14900	07.97E+06	25.87E+10
15000	08.25E+06	25.88E+10
15100	08.53E+06	25.90E+10
15200	08.81E+06	25.91E+10
15300	09.10E+06	25.92E+10
15400	09.39E+06	25.94E+10
15500	09.69E+06	25.95E+10
15600	09.99E+06	25.97E+10
15700	10.29E+06	25.98E+10
15800	10.59E+06	26.00E+10
15900	10.90E+06	26.02E+10
16000	11.21E+06	26.04E+10
16100	11.53E+06	26.06E+10
16200	11.84E+06	26.08E+10
16300	12.16E+06	26.10E+10
16400	12.48E+06	26.12E+10
16500	12.80E+06	26.15E+10
16600	13.13E+06	26.18E+10
16700	13.45E+06	26.20E+10
16800	13.78E+06	26.23E+10
16900	14.11E+06	26.26E+10
17000	14.44E+06	26.30E+10
17100	14.77E+06	26.33E+10
17200	15.11E+06	26.37E+10
17300	15.44E+06	26.40E+10
17400	15.77E+06	26.44E+10
17500	16.11E+06	26.48E+10
17600	16.44E+06	26.53E+10
17700	16.77E+06	26.57E+10
17800	17.11E+06	26.62E+10
17900	17.44E+06	26.67E+10
18000	17.77E+06	26.72E+10
18100	18.10E+06	26.78E+10
18200	18.43E+06	26.83E+10
18300	18.76E+06	26.89E+10
18400	19.08E+06	26.95E+10
18500	19.41E+06	27.01E+10
18600	19.73E+06	27.08E+10
18700	20.05E+06	27.15E+10
18800	20.36E+06	27.22E+10
18900	20.67E+06	27.29E+10
19000	20.98E+06	27.36E+10
19100	21.29E+06	27.44E+10
19200	21.59E+06	27.52E+10
19300	21.88E+06	27.60E+10
19400	22.17E+06	27.68E+10
19500	22.46E+06	27.77E+10
19600	22.74E+06	27.86E+10
19700	23.01E+06	27.95E+10
19800	23.28E+06	28.04E+10
19900	23.54E+06	28.13E+10
20000	23.80E+06	28.23E+10
20100	24.04E+06	28.33E+10
20200	24.28E+06	28.42E+10
20300	24.52E+06	28.52E+10
20400	24.74E+06	28.63E+10
20500	24.95E+06	28.73E+10
20600	25.16E+06	28.83E+10
20700	25.36E+06	28.94E+10
20800	25.54E+06	29.05E+10
20900	25.72E+06	29.16E+10
21000	25.89E+06	29.26E+10
21100	26.04E+06	29.37E+10
21200	26.19E+06	29.48E+10
21300	26.32E+06	29.59E+10
21400	26.44E+06	29.71E+10
21500	26.55E+06	29.82E+10
21600	26.65E+06	29.93E+10
21700	26.74E+06	30.04E+10
21800	26.81E+06	30.15E+10
21900	26.87E+06	30.26E+10
22000	26.92E+06	30.37E+10
22100	26.95E+06	30.48E+10
22200	26.98E+06	30.59E+10
22300	26.99E+06	30.70E+10
22400	26.98E+06	30.81E+10
22500	26.96E+06	30.91E+10
22600	26.93E+06	31.02E+10
22700	26.89E+06	31.12E+10
22800	26.83E+06	31.22E+10
22900	26.76E+06	31.32E+10
23000	26.67E+06	31.42E+10
23100	26.58E+06	31.52E+10
23200	26.46E+06	31.62E+10
23300	26.34E+06	31.71E+10
23400	26.20E+06	31.80E+10
23500	26.05E+06	31.89E+10
23600	25.89E+06	31.98E+10
23700	25.72E+06	32.06E+10
23800	25.53E+06	32.15E+10
23900	25.33E+06	32.23E+10
24000	25.12E+06	32.31E+10
24100	24.90E+06	32.39E+10
24200	24.66E+06	32.46E+10
24300	24.42E+06	32.53E+10
24400	24.16E+06	32.60E+10
24500	23.90E+06	32.67E+10
24600	23.63E+06	32.73E+10
24700	23.34E+06	32.80E+10
24800	23.05E+06	32.86E+10
24900	22.75E+06	32.91E+10
25000	22.44E+06	32.97E+10
25100	22.12E+06	33.02E+10
25200	21.80E+06	33.07E+10
25300	21.47E+06	33.12E+10
25400	21.13E+06	33.17E+10
25500	20.78E+06	33.21E+10
25600	20.43E+06	33.25E+10
25700	20.08E+06	33.29E+10
25800	19.72E+06	33.33E+10
25900	19.36E+06	33.37E+10
26000	18.99E+06	33.40E+10
26100	18.62E+06	33.43E+10
26200	18.24E+06	33.46E+10
26300	17.87E+06	33.49E+10
26400	17.49E+06	33.52E+10
26500	17.11E+06	33.54E+10
26600	16.73E+06	33.56E+10
26700	16.34E+06	33.59E+10
26800	15.96E+06	33.61E+10
26900	15.58E+06	33.63E+10
27000	15.19E+06	33.64E+10
27100	14.81E+06	33.66E+10
27200	14.43E+06	33.67E+10
27300	14.05E+06	33.69E+10
27400	13.67E+06	33.70E+10
27500	13.29E+06	33.71E+10
27600	12.92E+06	33.72E+10
27700	12.55E+06	33.73E+10
27800	12.18E+06	33.74E+10
27900	11.81E+06	33.75E+10
28000	11.45E+06	33.76E+10
28100	11.09E+06	33.77E+10
28200	10.74E+06	33.77E+10
28300	10.39E+06	33.78E+10
28400	10.04E+06	33.79E+10
28500	09.70E+06	33.79E+10
28600	09.36E+06	33.80E+10
28700	09.03E+06	33.80E+10
28800	08.70E+06	33.80E+10
28900	08.38E+06	33.81E+10
29000	08.07E+06	33.81E+10
29100	07.76E+06	33.81E+10
29200	07.45E+06	33.82E+10
29300	07.15E+06	33.82E+10
29400	06.86E+06	33.82E+10
29500	06.58E+06	33.82E+10
29600	06.30E+06	33.82E+10
29700	06.03E+06	33.82E+10
29800	05.76E+06	33.83E+10
29900	05.50E+06	33.83E+10
30000	05.25E+06	33.83E+10
30100	05.00E+06	33.83E+10
30200	04.76E+06	33.83E+10
30300	04.53E+06	33.83E+10
30400	04.31E+06	33.83E+10
30500	04.09E+06	33.83E+10
30600	03.88E+06	33.83E+10
30700	03.67E+06	33.84E+10
30800	03.48E+06	33.84E+10
30900	03.29E+06	33.84E+10
31000	03.10E+06	33.84E+10
31100	02.93E+06	33.84E+10
31200	02.75E+06	33.84E+10
31300	02.59E+06	33.84E+10
31400	02.43E+06	33.84E+10
31500	02.28E+06	33.84E+10
31600	02.14E+06	33.84E+10
31700	02.00E+06	33.84E+10
31800	01.87E+06	33.84E+10
31900	01.74E+06	33.84E+10
32000	01.63E+06	33.84E+10
32100	01.51E+06	33.85E+10
32200	01.40E+06	33.85E+10
32300	01.30E+06	33.85E+10
32400	01.20E+06	33.85E+10
32500	01.11E+06	33.85E+10
32600	01.03E+06	33.85E+10
32700	94.53E+04	33.85E+10
32800	86.87E+04	33.85E+10
32900	79.69E+04	33.85E+10
33000	72.96E+04	33.85E+10
33100	66.66E+04	33.85E+10
33200	60.78E+04	33.85E+10
33300	55.30E+04	33.85E+10
33400	50.20E+04	33.85E+10
33500	45.47E+04	33.86E+10
33600	41.09E+04	33.86E+10
33700	37.04E+04	33.86E+10
33800	33.31E+04	33.86E+10
33900	29.88E+04	33.86E+10
34000	26.73E+04	33.86E+10
34100	23.85E+04	33.86E+10
34200	21.22E+04	33.86E+10
34300	18.83E+04	33.86E+10
34400	16.65E+04	33.86E+10
34500	14.68E+04	33.86E+10
34600	12.90E+04	33.86E+10
34700	11.30E+04	33.86E+10
34800	09.87E+04	33.86E+10
34900	08.58E+04	33.86E+10
35000	07.44E+04	33.86E+10
35100	06.42E+04	33.86E+10
35200	05.52E+04	33.86E+10
35300	04.73E+04	33.87E+10
35400	04.03E+04	33.87E+10
35500	03.42E+04	33.87E+10
35600	02.89E+04	33.87E+10
35700	02.43E+04	33.87E+10
35800	02.04E+04	33.87E+10
35900	01.70E+04	33.87E+10
36000	01.40E+04	33.87E+10
36100	01.16E+04	33.87E+10
36200	94.63E+02	33.87E+10
36300	76.99E+02	33.87E+10
36400	62.24E+02	33.87E+10
36500	49.98E+02	33.87E+10
36600	39.86E+02	33.87E+10
36700	31.55E+02	33.87E+10
36800	24.79E+02	33.87E+10
36900	19.32E+02	33.87E+10
37000	14.93E+02	33.87E+10
37100	11.44E+02	33.87E+10
37200	08.68E+02	33.87E+10
37300	06.53E+02	33.87E+10
37400	04.86E+02	33.87E+10
37500	03.57E+02	33.87E+10
37600	02.60E+02	33.87E+10
37700	01.87E+02	33.87E+10
37800	01.33E+02	33.87E+10
37900	93.15E+00	33.87E+10
38000	64.37E+00	33.87E+10
38100	43.83E+00	33.87E+10
38200	29.37E+00	33.87E+10
38300	19.36E+00	33.87E+10
38400	12.53E+00	33.87E+10
38500	07.96E+00	33.87E+10
38600	04.96E+00	33.87E+10
38700	03.02E+00	33.87E+10
38800	01.80E+00	33.87E+10
38900	01.05E+00	33.87E+10
39000	59.16E-02	33.87E+10
39100	32.55E-02	33.87E+10
39200	17.38E-02	33.87E+10
39300	08.98E-02	33.87E+10
39400	04.48E-02	33.87E+10
39500	02.15E-02	33.86E+10
39600	99.33E-04	33.86E+10
39700	44.24E-04	33.86E+10
39800	18.72E-04	33.86E+10
39900	07.47E-04	33.86E+10
40000	02.83E-04	33.86E+10
40100	01.01E-04	33.86E+10
40200	34.08E-06	33.86E+10
40300	11.24E-06	33.86E+10
40400	06.23E-06	33.86E+10
40500	45.64E-08	33.86E+10
40600	-01.49E-06	33.86E+10
40700	-01.13E-06	33.86E+10
40800	-12.16E-06	33.86E+10
40900	-37.13E-06	33.85E+10
41000	-57.04E-06	33.85E+10
41100	-52.75E-06	33.85E+10
41200	01.24E-06	33.85E+10
41300	-19.78E-06	33.85E+10
41400	-38.64E-06	33.85E+10
41500	-45.44E-06	33.85E+10
41600	-27.36E-06	33.85E+10
41700	04.41E-06	33.85E+10
41800	02.64E-06	33.84E+10
41900	01.24E-06	33.84E+10
42000	01.24E-06	33.84E+10
42100	03.91E-06	33.84E+10
42200	05.09E-06	33.84E+10
42300	04.32E-06	33.84E+10
42400	03.29E-06	33.84E+10
42500	02.03E-06	33.83E+10
42600	58.03E-08	33.83E+10
42700	-45.32E-08	33.83E+10
42800	-01.16E-06	33.83E+10
42900	-01.36E-06	33.83E+10
43000	-83.13E-08	33.83E+10
43100	07.62E-08	33.82E+10
43200	40.46E-08	33.82E+10
43300	65.93E-08	33.82E+10
43400	69.22E-08	33.82E+10
43500	32.77E-08	33.82E+10
43600	13.44E-08	33.82E+10
43700	10.53E-08	33.81E+10
43800	05.24E-08	33.81E+10
43900	-01.70E-08	33.81E+10
44000	-09.14E-08	33.81E+10
44100	-15.97E-08	33.81E+10
44200	-20.03E-08	33.80E+10
44300	-18.96E-08	33.80E+10
44400	-09.97E-08	33.80E+10
44500	01.88E-08	33.80E+10
44600	05.94E-08	33.79E+10
44700	08.54E-08	33.79E+10
44800	08.33E-08	33.79E+10
44900	03.71E-08	33.79E+10
45000	01.07E-08	33.79E+10
45100	-06.33E-10	33.78E+10
45200	-01.03E-08	33.78E+10
45300	-01.42E-08	33.78E+10
45400	-95.53E-10	33.77E+10
45500	-01.42E-08	33.77E+10
45600	-01.60E-08	33.77E+10
45700	-01.35E-08	33.77E+10
45800	-53.75E-10	33.76E+10
45900	43.52E-10	33.76E+10
46000	89.40E-10	33.76E+10
46100	01.15E-08	33.76E+10
46200	01.03E-08	33.75E+10
46300	33.36E-10	33.75E+10
46400	-03.34E-10	33.75E+10
46500	-20.76E-10	33.74E+10
46600	-31.76E-10	33.74E+10
46700	-29.42E-10	33.74E+10
46800	-11.21E-10	33.73E+10
46900	-11.70E-10	33.73E+10
47000	-10.08E-10	33.73E+10
47100	-06.27E-10	33.72E+10
47200	-27.67E-12	33.72E+10
47300	05.96E-10	33.72E+10
47400	09.99E-10	33.71E+10
47500	11.74E-10	33.71E+10
47600	09.69E-10	33.70E+10
47700	02.11E-10	33.70E+10
47800	-01.82E-10	33.70E+10
47900	-03.97E-10	33.69E+10
48000	-04.99E-10	33.69E+10
48100	-03.93E-10	33.69E+10
48200	-74.44E-12	33.68E+10
48300	-30.01E-12	33.68E+10
48400	17.92E-12	33.67E+10
48500	52.78E-12	33.67E+10
48600	53.88E-12	33.66E+10
48700	32.27E-12	33.66E+10
48800	18.72E-12	33.66E+10
48900	03.62E-12	33.65E+10
49000	-10.06E-12	33.65E+10
49100	-21.00E-12	33.64E+10
49200	-16.78E-12	33.64E+10
49300	-04.70E-12	33.63E+10
49400	-56.40E-14	33.63E+10
49500	-02.00E-12	33.63E+10
49600	-05.02E-12	33.62E+10
49700	-01.63E-12	33.62E+10
49800	04.63E-12	33.61E+10
49900	10.33E-12	33.61E+10
50000	10.10E-12	33.60E+10
50100	03.01E-12	33.60E+10
50200	-05.60E-12	33.59E+10
50300	-07.32E-12	33.59E+10
50400	-01.18E-12	33.58E+10
50500	06.73E-12	33.58E+10
50600	07.27E-12	33.57E+10
50700	75.10E-14	33.57E+10
50800	-06.77E-12	33.56E+10
50900	-08.56E-12	33.56E+10
51000	-08.14E-12	33.55E+10
51100	-05.79E-12	33.55E+10
51200	-03.09E-12	33.54E+10
51300	-03.23E-12	33.54E+10
51400	05.75E-12	33.53E+10
51500	22.44E-12	33.52E+10
51600	38.00E-12	33.52E+10
51700	46.54E-12	33.51E+10
51800	39.75E-12	33.51E+10
51900	06.58E-12	33.50E+10
52000	-01.53E-12	33.50E+10
52100	02.25E-12	33.49E+10
52200	05.14E-12	33.49E+10
52300	05.42E-12	33.48E+10
52400	69.70E-14	33.48E+10
52500	-12.11E-12	33.47E+10
52600	-14.66E-12	33.46E+10
52700	-14.68E-12	33.46E+10
52800	-13.78E-12	33.45E+10
52900	-11.82E-12	33.45E+10
53000	-08.64E-12	33.44E+10
53100	-04.14E-12	33.44E+10
53200	-61.90E-14	33.43E+10
53300	02.66E-12	33.42E+10
53400	05.13E-12	33.42E+10
53500	06.08E-12	33.41E+10
53600	04.64E-12	33.41E+10
53700	33.00E-14	33.40E+10
53800	-62.30E-14	33.40E+10
53900	-01.78E-12	33.39E+10
54000	-02.82E-12	33.38E+10
54100	-03.37E-12	33.38E+10
54200	-02.87E-12	33.37E+10
54300	-01.32E-12	33.37E+10
54400	-01.52E-12	33.36E+10
54500	-01.54E-12	33.36E+10
54600	-01.33E-12	33.35E+10
54700	-84.90E-14	33.35E+10
54800	-06.40E-14	33.34E+10
54900	89.30E-14	33.33E+10
55000	01.53E-12	33.33E+10
55100	01.98E-12	33.32E+10
55200	02.04E-12	33.32E+10
55300	01.48E-12	33.31E+10
55400	02.60E-14	33.31E+10
55500	-01.72E-12	33.30E+10
55600	-02.30E-12	33.30E+10
55700	-02.59E-12	33.29E+10
55800	-02.35E-12	33.29E+10
55900	-01.31E-12	33.28E+10
56000	88.00E-14	33.28E+10
56100	03.02E-12	33.27E+10
56200	03.62E-12	33.27E+10
56300	03.60E-12	33.26E+10
56400	02.59E-12	33.26E+10
56500	14.40E-14	33.25E+10
56600	-04.28E-12	33.25E+10
56700	-08.79E-12	33.24E+10
56800	-10.76E-12	33.24E+10
56900	-09.42E-12	33.23E+10
57000	-02.35E-12	33.23E+10
57100	06.14E-12	33.22E+10
57200	15.95E-12	33.22E+10
57300	27.43E-12	33.22E+10
57400	39.29E-12	33.21E+10
57500	50.65E-12	33.21E+10
57600	58.75E-12	33.20E+10
57700	60.46E-12	33.20E+10
57800	51.80E-12	33.20E+10
57900	27.87E-12	33.19E+10
58000	-06.34E-12	33.19E+10
58100	-28.11E-12	33.18E+10
58200	-51.19E-12	33.18E+10
58300	-73.52E-12	33.18E+10
58400	-92.62E-12	33.17E+10
58500	-01.05E-10	33.17E+10
58600	-01.14E-10	33.17E+10
58700	-01.16E-10	33.16E+10
58800	-01.08E-10	33.16E+10
58900	-86.27E-12	33.16E+10
59000	-48.97E-12	33.15E+10
59100	07.30E-12	33.15E+10
59200	45.74E-12	33.15E+10
59300	76.77E-12	33.14E+10
59400	94.78E-12	33.14E+10
59500	90.58E-12	33.14E+10
59600	53.03E-12	33.14E+10
59700	-10.90E-12	33.13E+10
59800	-35.10E-12	33.13E+10
59900	-56.22E-12	33.13E+10
60000	-67.09E-12	33.13E+10
60100	-58.43E-12	33.13E+10
60200	-18.70E-12	33.12E+10
60300	22.56E-12	33.12E+10
60400	43.84E-12	33.12E+10
60500	67.68E-12	33.12E+10
60600	91.53E-12	33.12E+10
60700	01.12E-10	33.12E+10
60800	01.24E-10	33.11E+10
60900	01.37E-10	33.11E+10
61000	01.42E-10	33.11E+10
61100	01.35E-10	33.11E+10
61200	01.10E-10	33.11E+10
61300	60.64E-12	33.11E+10
61400	-10.09E-12	33.11E+10
61500	-53.46E-12	33.11E+10
61600	-91.67E-12	33.11E+10
61700	-01.17E-10	33.11E+10
61800	-01.19E-10	33.11E+10
61900	-86.07E-12	33.11E+10
62000	-39.98E-12	33.10E+10
62100	-10.75E-12	33.10E+10
62200	27.90E-12	33.10E+10
62300	73.69E-12	33.10E+10
62400	01.23E-10	33.10E+10
62500	01.72E-10	33.10E+10
62600	02.13E-10	33.11E+10
62700	02.40E-10	33.11E+10
62800	02.43E-10	33.11E+10
62900	02.10E-10	33.11E+10
63000	01.29E-10	33.11E+10
63100	-07.37E-12	33.11E+10
63200	-93.99E-12	33.11E+10
63300	-01.82E-10	33.11E+10
63400	-02.60E-10	33.11E+10
63500	-03.13E-10	33.11E+10
63600	-03.23E-10	33.11E+10
63700	-03.30E-10	33.11E+10
63800	-04.14E-10	33.11E+10
63900	-04.96E-10	33.12E+10
64000	-05.67E-10	33.12E+10
64100	-06.12E-10	33.12E+10
64200	-06.14E-10	33.12E+10
64300	-05.50E-10	33.12E+10
64400	-03.90E-10	33.12E+10
64500	-01.02E-10	33.12E+10
64600	01.63E-10	33.13E+10
64700	01.96E-10	33.13E+10
64800	02.17E-10	33.13E+10
64900	02.27E-10	33.13E+10
65000	02.30E-10	33.13E+10
65100	02.30E-10	33.14E+10
65200	02.36E-10	33.14E+10
65300	02.57E-10	33.14E+10
65400	03.06E-10	33.14E+10
65500	03.31E-10	33.14E+10
65600	02.64E-10	33.15E+10
65700	01.89E-10	33.15E+10
65800	01.10E-10	33.15E+10
65900	37.10E-12	33.15E+10
66000	-19.76E-12	33.16E+10
66100	-48.15E-12	33.16E+10
66200	-33.31E-12	33.16E+10
66300	41.97E-12	33.16E+10
66400	01.30E-10	33.17E+10
66500	01.56E-10	33.17E+10
66600	01.82E-10	33.17E+10
66700	01.99E-10	33.17E+10
66800	01.96E-10	33.18E+10
66900	01.61E-10	33.18E+10
67000	75.00E-12	33.18E+10
67100	30.97E-12	33.18E+10
67200	11.32E-12	33.19E+10
67300	-08.49E-12	33.19E+10
67400	-26.48E-12	33.19E+10
67500	-39.89E-12	33.19E+10
67600	-45.11E-12	33.20E+10
67700	-40.23E-12	33.20E+10
67800	-49.77E-12	33.20E+10
67900	-55.91E-12	33.21E+10
68000	-57.16E-12	33.21E+10
68100	-51.73E-12	33.21E+10
68200	-37.52E-12	33.21E+10
68300	-12.12E-12	33.22E+10
68400	15.04E-12	33.22E+10
68500	30.72E-12	33.22E+10
68600	44.13E-12	33.22E+10
68700	52.75E-12	33.23E+10
68800	53.52E-12	33.23E+10
68900	42.82E-12	33.23E+10
69000	16.37E-12	33.23E+10
69100	88.80E-14	33.24E+10
69200	-09.10E-12	33.24E+10
69300	-18.63E-12	33.24E+10
69400	-25.87E-12	33.24E+10
69500	-28.50E-12	33.25E+10
69600	-23.67E-12	33.25E+10
69700	-10.69E-12	33.25E+10
69800	-10.44E-12	33.25E+10
69900	-09.06E-12	33.26E+10
70000	-06.60E-12	33.26E+10
70100	-03.23E-12	33.26E+10
70200	75.70E-14	33.26E+10
70300	04.95E-12	33.27E+10
70400	09.33E-12	33.27E+10
70500	13.83E-12	33.27E+10
70600	17.31E-12	33.27E+10
70700	18.98E-12	33.27E+10
70800	17.85E-12	33.28E+10
70900	12.78E-12	33.28E+10
71000	02.44E-12	33.28E+10
71100	-03.81E-12	33.28E+10
71200	-08.18E-12	33.28E+10
71300	-11.95E-12	33.29E+10
71400	-14.31E-12	33.29E+10
71500	-14.23E-12	33.29E+10
71600	-10.47E-12	33.29E+10
71700	-03.07E-12	33.29E+10
71800	-01.50E-12	33.29E+10
71900	35.30E-14	33.30E+10
72000	02.22E-12	33.30E+10
72100	03.76E-12	33.30E+10
72200	04.53E-12	33.30E+10
72300	03.98E-12	33.30E+10
72400	03.42E-12	33.30E+10
72500	04.13E-12	33.30E+10
72600	04.48E-12	33.31E+10
72700	04.34E-12	33.31E+10
72800	03.56E-12	33.31E+10
72900	02.00E-12	33.31E+10
73000	-51.90E-14	33.31E+10
73100	-02.31E-12	33.31E+10
73200	-03.75E-12	33.31E+10
73300	-04.87E-12	33.31E+10
73400	-05.42E-12	33.31E+10
73500	-05.03E-12	33.32E+10
73600	-03.32E-12	33.32E+10
73700	-39.40E-14	33.32E+10
73800	55.50E-14	33.32E+10
73900	01.53E-12	33.32E+10
74000	02.38E-12	33.32E+10
74100	02.90E-12	33.32E+10
74200	02.85E-12	33.32E+10
74300	01.92E-12	33.32E+10
74400	01.02E-12	33.32E+10
74500	89.80E-14	33.32E+10
74600	67.60E-14	33.32E+10
74700	37.60E-14	33.33E+10
74800	02.60E-14	33.33E+10
74900	-33.00E-14	33.33E+10
75000	-63.50E-14	33.33E+10
75100	-01.03E-12	33.33E+10
75200	-01.38E-12	33.33E+10
75300	-01.62E-12	33.33E+10
75400	-01.66E-12	33.33E+10
75500	-01.42E-12	33.33E+10
75600	-80.10E-14	33.33E+10
75700	13.70E-14	33.33E+10
75800	55.00E-14	33.33E+10
75900	94.30E-14	33.33E+10
76000	01.25E-12	33.33E+10
76100	01.39E-12	33.33E+10
76200	01.25E-12	33.33E+10
76300	72.10E-14	33.33E+10
76400	22.00E-14	33.33E+10
76500	04.70E-14	33.33E+10
76600	-14.20E-14	33.33E+10
76700	-31.80E-14	33.33E+10
76800	-44.30E-14	33.33E+10
76900	-46.70E-14	33.33E+10
77000	-33.20E-14	33.33E+10
77100	-36.50E-14	33.33E+10
77200	-41.30E-14	33.33E+10
77300	-42.20E-14	33.33E+10
77400	-37.90E-14	33.34E+10
77500	-27.30E-14	33.34E+10
77600	-09.10E-14	33.34E+10
77700	14.70E-14	33.34E+10
77800	29.40E-14	33.34E+10
77900	42.30E-14	33.34E+10
78000	51.20E-14	33.34E+10
78100	53.20E-14	33.34E+10
78200	44.60E-14	33.34E+10
78300	21.40E-14	33.34E+10
78400	-0.00E+00	33.34E+10
78500	-09.90E-14	33.34E+10
78600	-19.50E-14	33.34E+10
78700	-27.00E-14	33.34E+10
78800	-30.30E-14	33.34E+10
78900	-26.70E-14	33.34E+10
79000	-12.80E-14	33.34E+10
79100	-09.90E-14	33.34E+10
79200	-08.00E-14	33.34E+10
79300	-05.30E-14	33.34E+10
79400	-01.90E-14	33.35E+10
79500	01.80E-14	33.35E+10
79600	05.10E-14	33.35E+10
79700	08.00E-14	33.35E+10
79800	12.00E-14	33.35E+10
79900	15.20E-14	33.35E+10
80000	16.80E-14	33.35E+10
80100	16.20E-14	33.35E+10
80200	12.30E-14	33.35E+10
80300	04.20E-14	33.35E+10
80400	-03.20E-14	33.36E+10
80500	-07.40E-14	33.36E+10
80600	-11.20E-14	33.36E+10
80700	-13.70E-14	33.36E+10
80800	-14.10E-14	33.36E+10
80900	-11.30E-14	33.36E+10
81000	-03.80E-14	33.36E+10
81100	-01.50E-14	33.36E+10
81200	40.00E-16	33.37E+10
81300	02.30E-14	33.37E+10
81400	03.80E-14	33.37E+10
81500	04.60E-14	33.37E+10
81600	04.00E-14	33.37E+10
81700	02.50E-14	33.37E+10
81800	03.00E-14	33.38E+10
81900	03.20E-14	33.38E+10
82000	03.10E-14	33.38E+10
82100	02.50E-14	33.38E+10
82200	01.40E-14	33.38E+10
82300	-40.00E-16	33.39E+10
82400	-02.10E-14	33.39E+10
82500	-03.30E-14	33.39E+10
82600	-04.20E-14	33.39E+10
82700	-04.80E-14	33.40E+10
82800	-04.50E-14	33.40E+10
82900	-03.30E-14	33.40E+10
83000	-50.00E-16	33.40E+10
83100	60.00E-16	33.40E+10
83200	01.50E-14	33.41E+10
83300	02.30E-14	33.41E+10
83400	02.90E-14	33.41E+10
83500	02.90E-14	33.42E+10
83600	02.20E-14	33.42E+10
83700	90.00E-16	33.42E+10
83800	70.00E-16	33.42E+10
83900	40.00E-16	33.43E+10
84000	00.00E+00	33.43E+10
84100	-40.00E-16	33.43E+10
84200	-80.00E-16	33.44E+10
84300	-01.20E-14	33.44E+10
84400	-01.60E-14	33.44E+10
84500	-01.90E-14	33.45E+10
84600	-02.20E-14	33.45E+10
84700	-02.20E-14	33.45E+10
84800	-01.90E-14	33.46E+10
84900	-01.20E-14	33.46E+10
85000	00.00E+00	33.46E+10
85100	60.00E-16	33.47E+10
85200	01.20E-14	33.47E+10
85300	01.70E-14	33.47E+10
85400	02.00E-14	33.48E+10
85500	02.00E-14	33.48E+10
85600	01.50E-14	33.49E+10
85700	70.00E-16	33.49E+10
85800	50.00E-16	33.49E+10
85900	30.00E-16	33.50E+10
86000	-0.00E+00	33.50E+10
86100	-30.00E-16	33.51E+10
86200	-40.00E-16	33.51E+10
86300	-40.00E-16	33.51E+10
86400	-50.00E-16	33.52E+10
*/