RANS CRM wing 2-D data set

import numpy as np

raw = np.array(
    [
        [
            2.000000000000000000e00,
            4.500000000000000111e-01,
            1.536799999999999972e-02,
            3.674239999999999728e-01,
            5.592279999999999474e-01,
            -1.258039999999999992e-01,
            -1.248699999999999984e-02,
        ],
        [
            3.500000000000000000e00,
            4.500000000000000111e-01,
            1.985100000000000059e-02,
            4.904470000000000218e-01,
            7.574600000000000222e-01,
            -1.615260000000000029e-01,
            8.987000000000000197e-03,
        ],
        [
            5.000000000000000000e00,
            4.500000000000000111e-01,
            2.571000000000000021e-02,
            6.109189999999999898e-01,
            9.497949999999999449e-01,
            -1.954619999999999969e-01,
            4.090900000000000092e-02,
        ],
        [
            6.500000000000000000e00,
            4.500000000000000111e-01,
            3.304200000000000192e-02,
            7.266120000000000356e-01,
            1.131138999999999895e00,
            -2.255890000000000117e-01,
            8.185399999999999621e-02,
        ],
        [
            8.000000000000000000e00,
            4.500000000000000111e-01,
            4.318999999999999923e-02,
            8.247250000000000414e-01,
            1.271487000000000034e00,
            -2.397040000000000004e-01,
            1.217659999999999992e-01,
        ],
        [
            0.000000000000000000e00,
            5.799999999999999600e-01,
            1.136200000000000057e-02,
            2.048760000000000026e-01,
            2.950280000000000125e-01,
            -7.882100000000000217e-02,
            -2.280099999999999835e-02,
        ],
        [
            1.500000000000000000e00,
            5.799999999999999600e-01,
            1.426000000000000011e-02,
            3.375619999999999732e-01,
            5.114130000000000065e-01,
            -1.189420000000000061e-01,
            -1.588200000000000028e-02,
        ],
        [
            3.000000000000000000e00,
            5.799999999999999600e-01,
            1.866400000000000003e-02,
            4.687450000000000228e-01,
            7.240400000000000169e-01,
            -1.577669999999999906e-01,
            3.099999999999999891e-03,
        ],
        [
            4.500000000000000000e00,
            5.799999999999999600e-01,
            2.461999999999999952e-02,
            5.976639999999999731e-01,
            9.311709999999999710e-01,
            -1.944160000000000055e-01,
            3.357500000000000068e-02,
        ],
        [
            6.000000000000000000e00,
            5.799999999999999600e-01,
            3.280700000000000283e-02,
            7.142249999999999988e-01,
            1.111707999999999918e00,
            -2.205870000000000053e-01,
            7.151699999999999724e-02,
        ],
        [
            0.000000000000000000e00,
            6.800000000000000488e-01,
            1.138800000000000055e-02,
            2.099310000000000065e-01,
            3.032230000000000203e-01,
            -8.187899999999999345e-02,
            -2.172699999999999979e-02,
        ],
        [
            1.500000000000000000e00,
            6.800000000000000488e-01,
            1.458699999999999927e-02,
            3.518569999999999753e-01,
            5.356630000000000003e-01,
            -1.257649999999999879e-01,
            -1.444800000000000077e-02,
        ],
        [
            3.000000000000000000e00,
            6.800000000000000488e-01,
            1.952800000000000022e-02,
            4.924879999999999813e-01,
            7.644769999999999621e-01,
            -1.678040000000000087e-01,
            6.023999999999999841e-03,
        ],
        [
            4.500000000000000000e00,
            6.800000000000000488e-01,
            2.666699999999999973e-02,
            6.270339999999999803e-01,
            9.801630000000000065e-01,
            -2.035240000000000105e-01,
            3.810000000000000192e-02,
        ],
        [
            6.000000000000000000e00,
            6.800000000000000488e-01,
            3.891800000000000120e-02,
            7.172730000000000494e-01,
            1.097855999999999943e00,
            -2.014620000000000022e-01,
            6.640000000000000069e-02,
        ],
        [
            0.000000000000000000e00,
            7.500000000000000000e-01,
            1.150699999999999987e-02,
            2.149069999999999869e-01,
            3.115740000000000176e-01,
            -8.498999999999999611e-02,
            -2.057700000000000154e-02,
        ],
        [
            1.250000000000000000e00,
            7.500000000000000000e-01,
            1.432600000000000019e-02,
            3.415969999999999840e-01,
            5.199390000000000400e-01,
            -1.251009999999999900e-01,
            -1.515400000000000080e-02,
        ],
        [
            2.500000000000000000e00,
            7.500000000000000000e-01,
            1.856000000000000011e-02,
            4.677589999999999804e-01,
            7.262499999999999512e-01,
            -1.635169999999999957e-01,
            3.989999999999999949e-04,
        ],
        [
            3.750000000000000000e00,
            7.500000000000000000e-01,
            2.472399999999999945e-02,
            5.911459999999999493e-01,
            9.254930000000000101e-01,
            -1.966150000000000120e-01,
            2.524900000000000061e-02,
        ],
        [
            5.000000000000000000e00,
            7.500000000000000000e-01,
            3.506800000000000195e-02,
            7.047809999999999908e-01,
            1.097736000000000045e00,
            -2.143069999999999975e-01,
            5.321300000000000335e-02,
        ],
        [
            0.000000000000000000e00,
            8.000000000000000444e-01,
            1.168499999999999921e-02,
            2.196390000000000009e-01,
            3.197160000000000002e-01,
            -8.798200000000000465e-02,
            -1.926999999999999894e-02,
        ],
        [
            1.250000000000000000e00,
            8.000000000000000444e-01,
            1.481599999999999931e-02,
            3.553939999999999877e-01,
            5.435950000000000504e-01,
            -1.317419999999999980e-01,
            -1.345599999999999921e-02,
        ],
        [
            2.500000000000000000e00,
            8.000000000000000444e-01,
            1.968999999999999917e-02,
            4.918299999999999894e-01,
            7.669930000000000359e-01,
            -1.728079999999999894e-01,
            3.756999999999999923e-03,
        ],
        [
            3.750000000000000000e00,
            8.000000000000000444e-01,
            2.785599999999999882e-02,
            6.324319999999999942e-01,
            9.919249999999999456e-01,
            -2.077100000000000057e-01,
            3.159800000000000109e-02,
        ],
        [
            5.000000000000000000e00,
            8.000000000000000444e-01,
            4.394300000000000289e-02,
            7.650689999999999991e-01,
            1.188355999999999968e00,
            -2.332680000000000031e-01,
            5.645000000000000018e-02,
        ],
        [
            0.000000000000000000e00,
            8.299999999999999600e-01,
            1.186100000000000002e-02,
            2.232899999999999885e-01,
            3.261100000000000110e-01,
            -9.028400000000000314e-02,
            -1.806500000000000120e-02,
        ],
        [
            1.000000000000000000e00,
            8.299999999999999600e-01,
            1.444900000000000004e-02,
            3.383419999999999761e-01,
            5.161710000000000464e-01,
            -1.279530000000000112e-01,
            -1.402400000000000001e-02,
        ],
        [
            2.000000000000000000e00,
            8.299999999999999600e-01,
            1.836799999999999891e-02,
            4.554270000000000262e-01,
            7.082190000000000429e-01,
            -1.642339999999999911e-01,
            -1.793000000000000106e-03,
        ],
        [
            3.000000000000000000e00,
            8.299999999999999600e-01,
            2.466899999999999996e-02,
            5.798410000000000508e-01,
            9.088819999999999677e-01,
            -2.004589999999999983e-01,
            1.892900000000000138e-02,
        ],
        [
            4.000000000000000000e00,
            8.299999999999999600e-01,
            3.700400000000000217e-02,
            7.012720000000000065e-01,
            1.097366000000000064e00,
            -2.362420000000000075e-01,
            3.750699999999999867e-02,
        ],
        [
            0.000000000000000000e00,
            8.599999999999999867e-01,
            1.224300000000000041e-02,
            2.278100000000000125e-01,
            3.342720000000000136e-01,
            -9.307600000000000595e-02,
            -1.608400000000000107e-02,
        ],
        [
            1.000000000000000000e00,
            8.599999999999999867e-01,
            1.540700000000000056e-02,
            3.551839999999999997e-01,
            5.433130000000000459e-01,
            -1.364730000000000110e-01,
            -1.162200000000000039e-02,
        ],
        [
            2.000000000000000000e00,
            8.599999999999999867e-01,
            2.122699999999999934e-02,
            4.854620000000000046e-01,
            7.552919999999999634e-01,
            -1.817850000000000021e-01,
            1.070999999999999903e-03,
        ],
        [
            3.000000000000000000e00,
            8.599999999999999867e-01,
            3.178899999999999781e-02,
            6.081849999999999756e-01,
            9.510380000000000500e-01,
            -2.252020000000000133e-01,
            1.540799999999999982e-02,
        ],
        [
            4.000000000000000000e00,
            8.599999999999999867e-01,
            4.744199999999999806e-02,
            6.846989999999999466e-01,
            1.042564000000000046e00,
            -2.333600000000000119e-01,
            2.035400000000000056e-02,
        ],
    ]
)


def get_rans_crm_wing():
    # data structure:
    # alpha, mach, cd, cl, cmx, cmy, cmz

    deg2rad = np.pi / 180.0

    xt = np.array(raw[:, 0:2])
    yt = np.array(raw[:, 2:4])
    xlimits = np.array([[-3.0, 10.0], [0.4, 0.90]])

    xt[:, 0] *= deg2rad
    xlimits[0, :] *= deg2rad

    return xt, yt, xlimits


def plot_rans_crm_wing(xt, yt, limits, interp):
    import matplotlib
    import numpy as np

    matplotlib.use("Agg")
    import matplotlib.pyplot as plt

    rad2deg = 180.0 / np.pi

    num = 500
    num_a = 50
    num_M = 50

    x = np.zeros((num, 2))
    colors = ["b", "g", "r", "c", "m", "k", "y"]

    nrow = 3
    ncol = 2
    plt.close()
    fig, axs = plt.subplots(nrow, ncol, figsize=(15, 15))

    # -----------------------------------------------------------------------------

    mach_numbers = [0.45, 0.68, 0.80, 0.86]
    legend_entries = []

    alpha_sweep = np.linspace(0.0, 8.0, num)

    for ind, mach in enumerate(mach_numbers):
        x[:, 0] = alpha_sweep / rad2deg
        x[:, 1] = mach
        CD = interp.predict_values(x)[:, 0]
        CL = interp.predict_values(x)[:, 1]

        mask = np.abs(xt[:, 1] - mach) < 1e-10
        axs[0, 0].plot(xt[mask, 0] * rad2deg, yt[mask, 0], "o" + colors[ind])
        axs[0, 0].plot(alpha_sweep, CD, colors[ind])

        mask = np.abs(xt[:, 1] - mach) < 1e-10
        axs[0, 1].plot(xt[mask, 0] * rad2deg, yt[mask, 1], "o" + colors[ind])
        axs[0, 1].plot(alpha_sweep, CL, colors[ind])

        legend_entries.append("M={}".format(mach))
        legend_entries.append("exact")

    axs[0, 0].set(xlabel="alpha (deg)", ylabel="CD")
    axs[0, 0].legend(legend_entries)

    axs[0, 1].set(xlabel="alpha (deg)", ylabel="CL")
    axs[0, 1].legend(legend_entries)

    # -----------------------------------------------------------------------------

    alphas = [2.0, 4.0, 6.0]
    legend_entries = []

    mach_sweep = np.linspace(0.45, 0.86, num)

    for ind, alpha in enumerate(alphas):
        x[:, 0] = alpha / rad2deg
        x[:, 1] = mach_sweep
        CD = interp.predict_values(x)[:, 0]
        CL = interp.predict_values(x)[:, 1]

        axs[1, 0].plot(mach_sweep, CD, colors[ind])
        axs[1, 1].plot(mach_sweep, CL, colors[ind])

        legend_entries.append("alpha={}".format(alpha))

    axs[1, 0].set(xlabel="Mach number", ylabel="CD")
    axs[1, 0].legend(legend_entries)

    axs[1, 1].set(xlabel="Mach number", ylabel="CL")
    axs[1, 1].legend(legend_entries)

    # -----------------------------------------------------------------------------

    x = np.zeros((num_a, num_M, 2))
    x[:, :, 0] = np.outer(np.linspace(0.0, 8.0, num_a), np.ones(num_M)) / rad2deg
    x[:, :, 1] = np.outer(np.ones(num_a), np.linspace(0.45, 0.86, num_M))
    CD = interp.predict_values(x.reshape((num_a * num_M, 2)))[:, 0].reshape(
        (num_a, num_M)
    )
    CL = interp.predict_values(x.reshape((num_a * num_M, 2)))[:, 1].reshape(
        (num_a, num_M)
    )

    axs[2, 0].plot(xt[:, 1], xt[:, 0] * rad2deg, "o")
    axs[2, 0].contour(x[:, :, 1], x[:, :, 0] * rad2deg, CD, 20)
    pcm1 = axs[2, 0].pcolormesh(
        x[:, :, 1],
        x[:, :, 0] * rad2deg,
        CD,
        cmap=plt.get_cmap("rainbow"),
        shading="auto",
    )
    fig.colorbar(pcm1, ax=axs[2, 0])
    axs[2, 0].set(xlabel="Mach number", ylabel="alpha (deg)")
    axs[2, 0].set_title("CD")

    axs[2, 1].plot(xt[:, 1], xt[:, 0] * rad2deg, "o")
    axs[2, 1].contour(x[:, :, 1], x[:, :, 0] * rad2deg, CL, 20)
    pcm2 = axs[2, 1].pcolormesh(
        x[:, :, 1],
        x[:, :, 0] * rad2deg,
        CL,
        cmap=plt.get_cmap("rainbow"),
        shading="auto",
    )
    fig.colorbar(pcm2, ax=axs[2, 1])
    axs[2, 1].set(xlabel="Mach number", ylabel="alpha (deg)")
    axs[2, 1].set_title("CL")

    plt.show()

RMTB

from smt.examples.rans_crm_wing.rans_crm_wing import (
    get_rans_crm_wing,
    plot_rans_crm_wing,
)
from smt.surrogate_models import RMTB

xt, yt, xlimits = get_rans_crm_wing()

interp = RMTB(
    num_ctrl_pts=20, xlimits=xlimits, nonlinear_maxiter=100, energy_weight=1e-12
)
interp.set_training_values(xt, yt)
interp.train()

plot_rans_crm_wing(xt, yt, xlimits, interp)
___________________________________________________________________________

                                   RMTB
___________________________________________________________________________

 Problem size

      # training points.        : 35

___________________________________________________________________________

 Training

   Training ...
      Pre-computing matrices ...
         Computing dof2coeff ...
         Computing dof2coeff - done. Time (sec):  0.0000000
         Initializing Hessian ...
         Initializing Hessian - done. Time (sec):  0.0000000
         Computing energy terms ...
         Computing energy terms - done. Time (sec):  0.0030327
         Computing approximation terms ...
         Computing approximation terms - done. Time (sec):  0.0000000
      Pre-computing matrices - done. Time (sec):  0.0030327
      Solving for degrees of freedom ...
         Solving initial startup problem (n=400) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 9.429150220e-02 1.114942861e-02
               Iteration (num., iy, grad. norm, func.) :   0   0 6.229432982e-09 1.793038469e-10
            Solving for output 0 - done. Time (sec):  0.0061347
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 1.955493282e+00 4.799845498e+00
               Iteration (num., iy, grad. norm, func.) :   0   1 2.880003477e-07 4.567660731e-08
            Solving for output 1 - done. Time (sec):  0.0061648
         Solving initial startup problem (n=400) - done. Time (sec):  0.0122995
         Solving nonlinear problem (n=400) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 6.652713506e-09 1.793037943e-10
               Iteration (num., iy, grad. norm, func.) :   0   0 5.849717047e-09 1.703954640e-10
               Iteration (num., iy, grad. norm, func.) :   1   0 3.028427146e-08 1.034023971e-10
               Iteration (num., iy, grad. norm, func.) :   2   0 1.125871064e-08 2.505156303e-11
               Iteration (num., iy, grad. norm, func.) :   3   0 3.657654439e-09 1.062711951e-11
               Iteration (num., iy, grad. norm, func.) :   4   0 2.384395507e-09 9.420573075e-12
               Iteration (num., iy, grad. norm, func.) :   5   0 6.795760320e-10 7.398469916e-12
               Iteration (num., iy, grad. norm, func.) :   6   0 1.893580345e-10 6.530836833e-12
               Iteration (num., iy, grad. norm, func.) :   7   0 3.914693345e-11 6.262121148e-12
               Iteration (num., iy, grad. norm, func.) :   8   0 2.607684883e-11 6.261389686e-12
               Iteration (num., iy, grad. norm, func.) :   9   0 1.596473148e-11 6.260468564e-12
               Iteration (num., iy, grad. norm, func.) :  10   0 8.775713015e-12 6.260124667e-12
               Iteration (num., iy, grad. norm, func.) :  11   0 3.358656828e-12 6.256629410e-12
               Iteration (num., iy, grad. norm, func.) :  12   0 5.210392100e-13 6.255688670e-12
            Solving for output 0 - done. Time (sec):  0.0879772
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 9.729377248e-08 4.567642993e-08
               Iteration (num., iy, grad. norm, func.) :   0   1 9.338363991e-08 4.538219456e-08
               Iteration (num., iy, grad. norm, func.) :   1   1 2.891391770e-06 3.242337200e-08
               Iteration (num., iy, grad. norm, func.) :   2   1 8.605107278e-07 4.652778039e-09
               Iteration (num., iy, grad. norm, func.) :   3   1 5.067375622e-07 2.745465684e-09
               Iteration (num., iy, grad. norm, func.) :   4   1 4.513840269e-07 2.455226693e-09
               Iteration (num., iy, grad. norm, func.) :   5   1 1.339167789e-07 6.881109113e-10
               Iteration (num., iy, grad. norm, func.) :   6   1 6.591489027e-08 5.500475184e-10
               Iteration (num., iy, grad. norm, func.) :   7   1 3.839790426e-08 4.862409238e-10
               Iteration (num., iy, grad. norm, func.) :   8   1 1.327787768e-08 4.053646260e-10
               Iteration (num., iy, grad. norm, func.) :   9   1 4.178809432e-09 3.129533457e-10
               Iteration (num., iy, grad. norm, func.) :  10   1 1.162280444e-09 2.724104537e-10
               Iteration (num., iy, grad. norm, func.) :  11   1 9.071092861e-10 2.722854123e-10
               Iteration (num., iy, grad. norm, func.) :  12   1 5.267790369e-10 2.722199641e-10
               Iteration (num., iy, grad. norm, func.) :  13   1 3.128933500e-10 2.721466104e-10
               Iteration (num., iy, grad. norm, func.) :  14   1 1.223449033e-10 2.716612344e-10
               Iteration (num., iy, grad. norm, func.) :  15   1 3.662769998e-11 2.714261096e-10
               Iteration (num., iy, grad. norm, func.) :  16   1 1.874681541e-11 2.713872039e-10
               Iteration (num., iy, grad. norm, func.) :  17   1 4.264650696e-11 2.713834397e-10
               Iteration (num., iy, grad. norm, func.) :  18   1 9.492032166e-12 2.713607454e-10
               Iteration (num., iy, grad. norm, func.) :  19   1 1.706167514e-11 2.713578816e-10
               Iteration (num., iy, grad. norm, func.) :  20   1 7.138581938e-12 2.713509077e-10
               Iteration (num., iy, grad. norm, func.) :  21   1 8.869098799e-12 2.713470556e-10
               Iteration (num., iy, grad. norm, func.) :  22   1 7.413215243e-12 2.713459004e-10
               Iteration (num., iy, grad. norm, func.) :  23   1 2.698341151e-12 2.713454840e-10
               Iteration (num., iy, grad. norm, func.) :  24   1 2.260359199e-12 2.713454159e-10
               Iteration (num., iy, grad. norm, func.) :  25   1 2.987484747e-12 2.713452000e-10
               Iteration (num., iy, grad. norm, func.) :  26   1 9.299976611e-13 2.713450184e-10
            Solving for output 1 - done. Time (sec):  0.1809425
         Solving nonlinear problem (n=400) - done. Time (sec):  0.2689197
      Solving for degrees of freedom - done. Time (sec):  0.2812192
   Training - done. Time (sec):  0.2842519
___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009999

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0010023

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009973

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0010011

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009995

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

   Predicting ...
   Predicting - done. Time (sec):  0.0010035

   Prediction time/pt. (sec) :  0.0000004

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

   Predicting ...
   Predicting - done. Time (sec):  0.0009964

   Prediction time/pt. (sec) :  0.0000004
../../../_images/rans_crm_wing.png

RMTC

from smt.examples.rans_crm_wing.rans_crm_wing import (
    get_rans_crm_wing,
    plot_rans_crm_wing,
)
from smt.surrogate_models import RMTC

xt, yt, xlimits = get_rans_crm_wing()

interp = RMTC(
    num_elements=20, xlimits=xlimits, nonlinear_maxiter=100, energy_weight=1e-10
)
interp.set_training_values(xt, yt)
interp.train()

plot_rans_crm_wing(xt, yt, xlimits, interp)
___________________________________________________________________________

                                   RMTC
___________________________________________________________________________

 Problem size

      # training points.        : 35

___________________________________________________________________________

 Training

   Training ...
      Pre-computing matrices ...
         Computing dof2coeff ...
         Computing dof2coeff - done. Time (sec):  0.0019996
         Initializing Hessian ...
         Initializing Hessian - done. Time (sec):  0.0000000
         Computing energy terms ...
         Computing energy terms - done. Time (sec):  0.0075645
         Computing approximation terms ...
         Computing approximation terms - done. Time (sec):  0.0009813
      Pre-computing matrices - done. Time (sec):  0.0105455
      Solving for degrees of freedom ...
         Solving initial startup problem (n=1764) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 1.279175539e-01 1.114942861e-02
               Iteration (num., iy, grad. norm, func.) :   0   0 1.385647944e-05 2.113817982e-08
            Solving for output 0 - done. Time (sec):  0.0158331
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 2.653045755e+00 4.799845498e+00
               Iteration (num., iy, grad. norm, func.) :   0   1 1.835453629e-04 6.133814507e-06
            Solving for output 1 - done. Time (sec):  0.0182846
         Solving initial startup problem (n=1764) - done. Time (sec):  0.0341177
         Solving nonlinear problem (n=1764) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 8.170166619e-07 2.098025715e-08
               Iteration (num., iy, grad. norm, func.) :   0   0 8.847293057e-07 1.664225412e-08
               Iteration (num., iy, grad. norm, func.) :   1   0 3.427919843e-07 3.193069608e-09
               Iteration (num., iy, grad. norm, func.) :   2   0 1.137630487e-07 1.029220558e-09
               Iteration (num., iy, grad. norm, func.) :   3   0 6.109929034e-08 5.279191682e-10
               Iteration (num., iy, grad. norm, func.) :   4   0 3.605405965e-08 4.130753776e-10
               Iteration (num., iy, grad. norm, func.) :   5   0 2.318933911e-08 3.786222757e-10
               Iteration (num., iy, grad. norm, func.) :   6   0 2.055706046e-08 3.748153689e-10
               Iteration (num., iy, grad. norm, func.) :   7   0 2.080398568e-08 3.737271940e-10
               Iteration (num., iy, grad. norm, func.) :   8   0 1.400752576e-08 3.614333601e-10
               Iteration (num., iy, grad. norm, func.) :   9   0 1.535535986e-08 3.414576338e-10
               Iteration (num., iy, grad. norm, func.) :  10   0 6.286307298e-09 3.054221098e-10
               Iteration (num., iy, grad. norm, func.) :  11   0 2.173842728e-09 2.892041321e-10
               Iteration (num., iy, grad. norm, func.) :  12   0 1.644968580e-09 2.876378425e-10
               Iteration (num., iy, grad. norm, func.) :  13   0 2.166797487e-09 2.875669821e-10
               Iteration (num., iy, grad. norm, func.) :  14   0 1.418858149e-09 2.873856956e-10
               Iteration (num., iy, grad. norm, func.) :  15   0 3.264633984e-09 2.872133489e-10
               Iteration (num., iy, grad. norm, func.) :  16   0 4.864508117e-10 2.867614633e-10
               Iteration (num., iy, grad. norm, func.) :  17   0 2.452490534e-10 2.867574376e-10
               Iteration (num., iy, grad. norm, func.) :  18   0 1.146830253e-09 2.867401107e-10
               Iteration (num., iy, grad. norm, func.) :  19   0 4.901797822e-10 2.866842810e-10
               Iteration (num., iy, grad. norm, func.) :  20   0 1.120508723e-09 2.866415142e-10
               Iteration (num., iy, grad. norm, func.) :  21   0 2.628463901e-10 2.865557933e-10
               Iteration (num., iy, grad. norm, func.) :  22   0 1.994580750e-10 2.865477824e-10
               Iteration (num., iy, grad. norm, func.) :  23   0 4.252361563e-10 2.865432258e-10
               Iteration (num., iy, grad. norm, func.) :  24   0 3.400922254e-10 2.865366354e-10
               Iteration (num., iy, grad. norm, func.) :  25   0 5.721385122e-10 2.865330235e-10
               Iteration (num., iy, grad. norm, func.) :  26   0 2.467899171e-10 2.865237594e-10
               Iteration (num., iy, grad. norm, func.) :  27   0 3.784371037e-10 2.865148717e-10
               Iteration (num., iy, grad. norm, func.) :  28   0 1.432543980e-10 2.865051477e-10
               Iteration (num., iy, grad. norm, func.) :  29   0 1.922781607e-10 2.865035878e-10
               Iteration (num., iy, grad. norm, func.) :  30   0 1.470289879e-10 2.865030124e-10
               Iteration (num., iy, grad. norm, func.) :  31   0 2.154831922e-10 2.865002293e-10
               Iteration (num., iy, grad. norm, func.) :  32   0 8.372363702e-11 2.864957953e-10
               Iteration (num., iy, grad. norm, func.) :  33   0 8.643575837e-11 2.864956924e-10
               Iteration (num., iy, grad. norm, func.) :  34   0 7.524569579e-11 2.864952499e-10
               Iteration (num., iy, grad. norm, func.) :  35   0 1.191849438e-10 2.864946915e-10
               Iteration (num., iy, grad. norm, func.) :  36   0 4.733988673e-11 2.864937458e-10
               Iteration (num., iy, grad. norm, func.) :  37   0 6.836674773e-11 2.864937147e-10
               Iteration (num., iy, grad. norm, func.) :  38   0 4.576618421e-11 2.864935963e-10
               Iteration (num., iy, grad. norm, func.) :  39   0 9.062374748e-11 2.864932363e-10
               Iteration (num., iy, grad. norm, func.) :  40   0 1.865606754e-11 2.864928217e-10
               Iteration (num., iy, grad. norm, func.) :  41   0 1.208977127e-11 2.864927560e-10
               Iteration (num., iy, grad. norm, func.) :  42   0 3.060201463e-11 2.864927331e-10
               Iteration (num., iy, grad. norm, func.) :  43   0 3.318556983e-11 2.864927006e-10
               Iteration (num., iy, grad. norm, func.) :  44   0 3.527265730e-11 2.864926733e-10
               Iteration (num., iy, grad. norm, func.) :  45   0 2.543278041e-11 2.864925918e-10
               Iteration (num., iy, grad. norm, func.) :  46   0 1.064237463e-11 2.864925023e-10
               Iteration (num., iy, grad. norm, func.) :  47   0 1.365382439e-11 2.864924986e-10
               Iteration (num., iy, grad. norm, func.) :  48   0 1.253587017e-11 2.864924893e-10
               Iteration (num., iy, grad. norm, func.) :  49   0 1.272518442e-11 2.864924753e-10
               Iteration (num., iy, grad. norm, func.) :  50   0 1.320097458e-11 2.864924458e-10
               Iteration (num., iy, grad. norm, func.) :  51   0 3.345236096e-12 2.864924280e-10
               Iteration (num., iy, grad. norm, func.) :  52   0 2.951427197e-12 2.864924280e-10
               Iteration (num., iy, grad. norm, func.) :  53   0 3.888555007e-12 2.864924264e-10
               Iteration (num., iy, grad. norm, func.) :  54   0 4.615616233e-12 2.864924235e-10
               Iteration (num., iy, grad. norm, func.) :  55   0 5.283669347e-12 2.864924221e-10
               Iteration (num., iy, grad. norm, func.) :  56   0 3.999402052e-12 2.864924212e-10
               Iteration (num., iy, grad. norm, func.) :  57   0 3.932024726e-12 2.864924210e-10
               Iteration (num., iy, grad. norm, func.) :  58   0 2.974921496e-12 2.864924196e-10
               Iteration (num., iy, grad. norm, func.) :  59   0 3.312202394e-12 2.864924186e-10
               Iteration (num., iy, grad. norm, func.) :  60   0 2.042864289e-12 2.864924175e-10
               Iteration (num., iy, grad. norm, func.) :  61   0 1.978885857e-12 2.864924168e-10
               Iteration (num., iy, grad. norm, func.) :  62   0 1.498977956e-12 2.864924164e-10
               Iteration (num., iy, grad. norm, func.) :  63   0 1.203181940e-12 2.864924163e-10
               Iteration (num., iy, grad. norm, func.) :  64   0 1.595998918e-12 2.864924161e-10
               Iteration (num., iy, grad. norm, func.) :  65   0 1.491373606e-12 2.864924159e-10
               Iteration (num., iy, grad. norm, func.) :  66   0 1.171107018e-12 2.864924158e-10
               Iteration (num., iy, grad. norm, func.) :  67   0 1.171106858e-12 2.864924157e-10
               Iteration (num., iy, grad. norm, func.) :  68   0 8.770194220e-13 2.864924156e-10
            Solving for output 0 - done. Time (sec):  1.0857100
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 1.367869966e-05 6.109564377e-06
               Iteration (num., iy, grad. norm, func.) :   0   1 1.319928369e-05 5.876221159e-06
               Iteration (num., iy, grad. norm, func.) :   1   1 1.504368857e-05 7.950689278e-07
               Iteration (num., iy, grad. norm, func.) :   2   1 1.364089388e-05 2.901411460e-07
               Iteration (num., iy, grad. norm, func.) :   3   1 4.197544968e-06 1.079803725e-07
               Iteration (num., iy, grad. norm, func.) :   4   1 3.402593983e-06 7.128625666e-08
               Iteration (num., iy, grad. norm, func.) :   5   1 3.308481787e-06 5.181131928e-08
               Iteration (num., iy, grad. norm, func.) :   6   1 8.581211358e-07 2.708426431e-08
               Iteration (num., iy, grad. norm, func.) :   7   1 6.776957242e-07 2.663613311e-08
               Iteration (num., iy, grad. norm, func.) :   8   1 3.877387000e-07 2.636493901e-08
               Iteration (num., iy, grad. norm, func.) :   9   1 2.641371191e-07 2.258562814e-08
               Iteration (num., iy, grad. norm, func.) :  10   1 9.582805345e-08 1.752736695e-08
               Iteration (num., iy, grad. norm, func.) :  11   1 5.308914871e-08 1.518155562e-08
               Iteration (num., iy, grad. norm, func.) :  12   1 3.229772740e-08 1.469802463e-08
               Iteration (num., iy, grad. norm, func.) :  13   1 3.099202869e-08 1.469636052e-08
               Iteration (num., iy, grad. norm, func.) :  14   1 3.081838250e-08 1.469633744e-08
               Iteration (num., iy, grad. norm, func.) :  15   1 3.261710449e-08 1.465395392e-08
               Iteration (num., iy, grad. norm, func.) :  16   1 1.715800143e-08 1.460280697e-08
               Iteration (num., iy, grad. norm, func.) :  17   1 2.311511246e-08 1.456621138e-08
               Iteration (num., iy, grad. norm, func.) :  18   1 7.959073619e-09 1.450261585e-08
               Iteration (num., iy, grad. norm, func.) :  19   1 5.764606503e-09 1.447723163e-08
               Iteration (num., iy, grad. norm, func.) :  20   1 4.407517861e-09 1.447458062e-08
               Iteration (num., iy, grad. norm, func.) :  21   1 4.867993231e-09 1.447400215e-08
               Iteration (num., iy, grad. norm, func.) :  22   1 4.870975676e-09 1.447261995e-08
               Iteration (num., iy, grad. norm, func.) :  23   1 7.137066415e-09 1.447070115e-08
               Iteration (num., iy, grad. norm, func.) :  24   1 2.865429197e-09 1.446781266e-08
               Iteration (num., iy, grad. norm, func.) :  25   1 3.463483123e-09 1.446681543e-08
               Iteration (num., iy, grad. norm, func.) :  26   1 2.277376624e-09 1.446607008e-08
               Iteration (num., iy, grad. norm, func.) :  27   1 3.123003298e-09 1.446538599e-08
               Iteration (num., iy, grad. norm, func.) :  28   1 1.333461211e-09 1.446468907e-08
               Iteration (num., iy, grad. norm, func.) :  29   1 1.024515958e-09 1.446456316e-08
               Iteration (num., iy, grad. norm, func.) :  30   1 1.350508181e-09 1.446436301e-08
               Iteration (num., iy, grad. norm, func.) :  31   1 1.231423744e-09 1.446411871e-08
               Iteration (num., iy, grad. norm, func.) :  32   1 1.551707725e-09 1.446376867e-08
               Iteration (num., iy, grad. norm, func.) :  33   1 4.110955742e-10 1.446366277e-08
               Iteration (num., iy, grad. norm, func.) :  34   1 4.110955742e-10 1.446366277e-08
               Iteration (num., iy, grad. norm, func.) :  35   1 3.851751924e-10 1.446366099e-08
               Iteration (num., iy, grad. norm, func.) :  36   1 3.751853101e-10 1.446362105e-08
               Iteration (num., iy, grad. norm, func.) :  37   1 1.975704793e-10 1.446358535e-08
               Iteration (num., iy, grad. norm, func.) :  38   1 4.186286142e-10 1.446357999e-08
               Iteration (num., iy, grad. norm, func.) :  39   1 2.452723922e-10 1.446357647e-08
               Iteration (num., iy, grad. norm, func.) :  40   1 3.288169801e-10 1.446357363e-08
               Iteration (num., iy, grad. norm, func.) :  41   1 1.550050582e-10 1.446356987e-08
               Iteration (num., iy, grad. norm, func.) :  42   1 1.370308197e-10 1.446356974e-08
               Iteration (num., iy, grad. norm, func.) :  43   1 1.589237931e-10 1.446356787e-08
               Iteration (num., iy, grad. norm, func.) :  44   1 1.517098286e-10 1.446356487e-08
               Iteration (num., iy, grad. norm, func.) :  45   1 7.299488554e-11 1.446356219e-08
               Iteration (num., iy, grad. norm, func.) :  46   1 8.790485467e-11 1.446356143e-08
               Iteration (num., iy, grad. norm, func.) :  47   1 7.089934327e-11 1.446356137e-08
               Iteration (num., iy, grad. norm, func.) :  48   1 5.158743812e-11 1.446356109e-08
               Iteration (num., iy, grad. norm, func.) :  49   1 6.533390375e-11 1.446356048e-08
               Iteration (num., iy, grad. norm, func.) :  50   1 3.857710486e-11 1.446355972e-08
               Iteration (num., iy, grad. norm, func.) :  51   1 2.998455911e-11 1.446355942e-08
               Iteration (num., iy, grad. norm, func.) :  52   1 2.598028591e-11 1.446355942e-08
               Iteration (num., iy, grad. norm, func.) :  53   1 2.409026670e-11 1.446355940e-08
               Iteration (num., iy, grad. norm, func.) :  54   1 2.703403194e-11 1.446355936e-08
               Iteration (num., iy, grad. norm, func.) :  55   1 2.266882361e-11 1.446355930e-08
               Iteration (num., iy, grad. norm, func.) :  56   1 2.000016567e-11 1.446355927e-08
               Iteration (num., iy, grad. norm, func.) :  57   1 1.615580154e-11 1.446355924e-08
               Iteration (num., iy, grad. norm, func.) :  58   1 9.504719926e-12 1.446355921e-08
               Iteration (num., iy, grad. norm, func.) :  59   1 1.414162368e-11 1.446355921e-08
               Iteration (num., iy, grad. norm, func.) :  60   1 1.108830579e-11 1.446355920e-08
               Iteration (num., iy, grad. norm, func.) :  61   1 1.550459948e-11 1.446355917e-08
               Iteration (num., iy, grad. norm, func.) :  62   1 2.631550598e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  63   1 2.387300428e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  64   1 2.387300440e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  65   1 5.286292800e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  66   1 1.043822052e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  67   1 2.896119839e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  68   1 1.696220169e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  69   1 2.533341849e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  70   1 9.767728234e-13 1.446355915e-08
            Solving for output 1 - done. Time (sec):  1.1297755
         Solving nonlinear problem (n=1764) - done. Time (sec):  2.2164850
      Solving for degrees of freedom - done. Time (sec):  2.2516012
   Training - done. Time (sec):  2.2621467
___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0010002

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009997

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009382

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0009942

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0010273

   Prediction time/pt. (sec) :  0.0000021

___________________________________________________________________________

 Evaluation

      # eval points. : 500

   Predicting ...
   Predicting - done. Time (sec):  0.0000000

   Prediction time/pt. (sec) :  0.0000000

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

   Predicting ...
   Predicting - done. Time (sec):  0.0020008

   Prediction time/pt. (sec) :  0.0000008

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

   Predicting ...
   Predicting - done. Time (sec):  0.0010014

   Prediction time/pt. (sec) :  0.0000004
../../../_images/rans_crm_wing.png