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 numpy as np
    import matplotlib

    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(3, 2, 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.surrogate_models import RMTB
from smt.examples.rans_crm_wing.rans_crm_wing import (
    get_rans_crm_wing,
    plot_rans_crm_wing,
)

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.0000026
         Initializing Hessian ...
         Initializing Hessian - done. Time (sec):  0.0004532
         Computing energy terms ...
         Computing energy terms - done. Time (sec):  0.0047638
         Computing approximation terms ...
         Computing approximation terms - done. Time (sec):  0.0005383
      Pre-computing matrices - done. Time (sec):  0.0058136
      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 1.143986917e-08 1.793039631e-10
            Solving for output 0 - done. Time (sec):  0.0112951
            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.384072909e-06 4.568551517e-08
            Solving for output 1 - done. Time (sec):  0.0114489
         Solving initial startup problem (n=400) - done. Time (sec):  0.0228059
         Solving nonlinear problem (n=400) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 6.652690767e-09 1.793037175e-10
               Iteration (num., iy, grad. norm, func.) :   0   0 5.849579371e-09 1.703954904e-10
               Iteration (num., iy, grad. norm, func.) :   1   0 3.029765479e-08 1.034424518e-10
               Iteration (num., iy, grad. norm, func.) :   2   0 1.126327726e-08 2.505953287e-11
               Iteration (num., iy, grad. norm, func.) :   3   0 3.684480315e-09 1.065597406e-11
               Iteration (num., iy, grad. norm, func.) :   4   0 2.264648657e-09 9.297031284e-12
               Iteration (num., iy, grad. norm, func.) :   5   0 6.433274344e-10 7.375855307e-12
               Iteration (num., iy, grad. norm, func.) :   6   0 1.745403314e-10 6.524960110e-12
               Iteration (num., iy, grad. norm, func.) :   7   0 3.524002458e-11 6.261442433e-12
               Iteration (num., iy, grad. norm, func.) :   8   0 2.248690871e-11 6.261266615e-12
               Iteration (num., iy, grad. norm, func.) :   9   0 1.390908023e-11 6.260515341e-12
               Iteration (num., iy, grad. norm, func.) :  10   0 9.863609127e-12 6.260241753e-12
               Iteration (num., iy, grad. norm, func.) :  11   0 4.745498751e-12 6.256621620e-12
               Iteration (num., iy, grad. norm, func.) :  12   0 5.194090622e-13 6.255685807e-12
            Solving for output 0 - done. Time (sec):  0.1453168
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 9.721474920e-08 4.567635024e-08
               Iteration (num., iy, grad. norm, func.) :   0   1 9.329075021e-08 4.538184815e-08
               Iteration (num., iy, grad. norm, func.) :   1   1 2.915771512e-06 3.263822593e-08
               Iteration (num., iy, grad. norm, func.) :   2   1 8.640091715e-07 4.653851041e-09
               Iteration (num., iy, grad. norm, func.) :   3   1 3.744485513e-07 2.548911362e-09
               Iteration (num., iy, grad. norm, func.) :   4   1 3.391955543e-07 2.376502583e-09
               Iteration (num., iy, grad. norm, func.) :   5   1 1.016090263e-07 7.618800206e-10
               Iteration (num., iy, grad. norm, func.) :   6   1 2.957548963e-08 5.076140245e-10
               Iteration (num., iy, grad. norm, func.) :   7   1 1.082588507e-08 4.988353868e-10
               Iteration (num., iy, grad. norm, func.) :   8   1 1.414989864e-08 4.403798271e-10
               Iteration (num., iy, grad. norm, func.) :   9   1 4.106328565e-09 3.207987666e-10
               Iteration (num., iy, grad. norm, func.) :  10   1 1.178023949e-09 2.725806442e-10
               Iteration (num., iy, grad. norm, func.) :  11   1 9.728908036e-10 2.723042428e-10
               Iteration (num., iy, grad. norm, func.) :  12   1 7.528888176e-10 2.721156157e-10
               Iteration (num., iy, grad. norm, func.) :  13   1 4.464694320e-10 2.720696105e-10
               Iteration (num., iy, grad. norm, func.) :  14   1 1.341240625e-10 2.717469340e-10
               Iteration (num., iy, grad. norm, func.) :  15   1 6.590040459e-11 2.715375308e-10
               Iteration (num., iy, grad. norm, func.) :  16   1 2.180492612e-11 2.713875774e-10
               Iteration (num., iy, grad. norm, func.) :  17   1 2.847338929e-11 2.713730719e-10
               Iteration (num., iy, grad. norm, func.) :  18   1 2.073051759e-11 2.713700776e-10
               Iteration (num., iy, grad. norm, func.) :  19   1 3.005205764e-11 2.713681220e-10
               Iteration (num., iy, grad. norm, func.) :  20   1 2.005055255e-11 2.713537493e-10
               Iteration (num., iy, grad. norm, func.) :  21   1 2.763352839e-12 2.713462112e-10
               Iteration (num., iy, grad. norm, func.) :  22   1 2.218501034e-12 2.713461926e-10
               Iteration (num., iy, grad. norm, func.) :  23   1 7.653740480e-12 2.713461800e-10
               Iteration (num., iy, grad. norm, func.) :  24   1 3.699064554e-12 2.713457468e-10
               Iteration (num., iy, grad. norm, func.) :  25   1 3.141516186e-12 2.713452623e-10
               Iteration (num., iy, grad. norm, func.) :  26   1 1.536813934e-12 2.713450397e-10
               Iteration (num., iy, grad. norm, func.) :  27   1 2.749790739e-12 2.713450113e-10
               Iteration (num., iy, grad. norm, func.) :  28   1 6.496098764e-13 2.713449801e-10
            Solving for output 1 - done. Time (sec):  0.3223901
         Solving nonlinear problem (n=400) - done. Time (sec):  0.4677677
      Solving for degrees of freedom - done. Time (sec):  0.4906218
   Training - done. Time (sec):  0.4967644
___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000012

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000011

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

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

   Prediction time/pt. (sec) :  0.0000006

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

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

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

RMTC

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

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.0027974
         Initializing Hessian ...
         Initializing Hessian - done. Time (sec):  0.0004127
         Computing energy terms ...
         Computing energy terms - done. Time (sec):  0.0133660
         Computing approximation terms ...
         Computing approximation terms - done. Time (sec):  0.0009699
      Pre-computing matrices - done. Time (sec):  0.0176098
      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.892260075e-05 2.158606140e-08
            Solving for output 0 - done. Time (sec):  0.0258362
            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 2.577030681e-04 6.438878057e-06
            Solving for output 1 - done. Time (sec):  0.0259404
         Solving initial startup problem (n=1764) - done. Time (sec):  0.0518465
         Solving nonlinear problem (n=1764) ...
            Solving for output 0 ...
               Iteration (num., iy, grad. norm, func.) :   0   0 7.702060163e-07 2.130719039e-08
               Iteration (num., iy, grad. norm, func.) :   0   0 8.828496717e-07 1.695743786e-08
               Iteration (num., iy, grad. norm, func.) :   1   0 3.480009880e-07 3.230274515e-09
               Iteration (num., iy, grad. norm, func.) :   2   0 1.147855651e-07 1.039649991e-09
               Iteration (num., iy, grad. norm, func.) :   3   0 6.174786868e-08 5.309471405e-10
               Iteration (num., iy, grad. norm, func.) :   4   0 3.455593760e-08 4.118404972e-10
               Iteration (num., iy, grad. norm, func.) :   5   0 2.266947966e-08 3.769645615e-10
               Iteration (num., iy, grad. norm, func.) :   6   0 2.014457758e-08 3.726536483e-10
               Iteration (num., iy, grad. norm, func.) :   7   0 2.062330624e-08 3.720494065e-10
               Iteration (num., iy, grad. norm, func.) :   8   0 1.381296471e-08 3.609653111e-10
               Iteration (num., iy, grad. norm, func.) :   9   0 1.506017697e-08 3.419689514e-10
               Iteration (num., iy, grad. norm, func.) :  10   0 7.062492269e-09 3.064514419e-10
               Iteration (num., iy, grad. norm, func.) :  11   0 2.380029319e-09 2.894188546e-10
               Iteration (num., iy, grad. norm, func.) :  12   0 2.069095742e-09 2.893749129e-10
               Iteration (num., iy, grad. norm, func.) :  13   0 3.378089318e-09 2.892327518e-10
               Iteration (num., iy, grad. norm, func.) :  14   0 1.226570259e-09 2.876975386e-10
               Iteration (num., iy, grad. norm, func.) :  15   0 1.422487571e-09 2.871370363e-10
               Iteration (num., iy, grad. norm, func.) :  16   0 9.650973772e-10 2.870092820e-10
               Iteration (num., iy, grad. norm, func.) :  17   0 1.293018053e-09 2.869726451e-10
               Iteration (num., iy, grad. norm, func.) :  18   0 8.107957803e-10 2.869185409e-10
               Iteration (num., iy, grad. norm, func.) :  19   0 1.313927988e-09 2.866658413e-10
               Iteration (num., iy, grad. norm, func.) :  20   0 2.635834787e-10 2.865497160e-10
               Iteration (num., iy, grad. norm, func.) :  21   0 2.635834680e-10 2.865497160e-10
               Iteration (num., iy, grad. norm, func.) :  22   0 2.578774044e-10 2.865496490e-10
               Iteration (num., iy, grad. norm, func.) :  23   0 4.117384480e-10 2.865446029e-10
               Iteration (num., iy, grad. norm, func.) :  24   0 2.938743458e-10 2.865417065e-10
               Iteration (num., iy, grad. norm, func.) :  25   0 5.384594503e-10 2.865323547e-10
               Iteration (num., iy, grad. norm, func.) :  26   0 1.419599951e-10 2.865160822e-10
               Iteration (num., iy, grad. norm, func.) :  27   0 2.269368593e-10 2.865093719e-10
               Iteration (num., iy, grad. norm, func.) :  28   0 1.389025203e-10 2.865048956e-10
               Iteration (num., iy, grad. norm, func.) :  29   0 1.707359769e-10 2.865042830e-10
               Iteration (num., iy, grad. norm, func.) :  30   0 1.363223844e-10 2.865028080e-10
               Iteration (num., iy, grad. norm, func.) :  31   0 2.464558224e-10 2.864983462e-10
               Iteration (num., iy, grad. norm, func.) :  32   0 5.047774047e-11 2.864939811e-10
               Iteration (num., iy, grad. norm, func.) :  33   0 3.304236539e-11 2.864939139e-10
               Iteration (num., iy, grad. norm, func.) :  34   0 4.818695623e-11 2.864938652e-10
               Iteration (num., iy, grad. norm, func.) :  35   0 4.519100393e-11 2.864937224e-10
               Iteration (num., iy, grad. norm, func.) :  36   0 5.347793220e-11 2.864935884e-10
               Iteration (num., iy, grad. norm, func.) :  37   0 9.066399917e-11 2.864933993e-10
               Iteration (num., iy, grad. norm, func.) :  38   0 3.049721433e-11 2.864931818e-10
               Iteration (num., iy, grad. norm, func.) :  39   0 3.563941321e-11 2.864930777e-10
               Iteration (num., iy, grad. norm, func.) :  40   0 3.265938779e-11 2.864928292e-10
               Iteration (num., iy, grad. norm, func.) :  41   0 1.840962940e-11 2.864925965e-10
               Iteration (num., iy, grad. norm, func.) :  42   0 1.806661613e-11 2.864925807e-10
               Iteration (num., iy, grad. norm, func.) :  43   0 2.420332887e-11 2.864925725e-10
               Iteration (num., iy, grad. norm, func.) :  44   0 1.917192243e-11 2.864925455e-10
               Iteration (num., iy, grad. norm, func.) :  45   0 1.577349995e-11 2.864925455e-10
               Iteration (num., iy, grad. norm, func.) :  46   0 1.789237692e-11 2.864925183e-10
               Iteration (num., iy, grad. norm, func.) :  47   0 1.389849311e-11 2.864924943e-10
               Iteration (num., iy, grad. norm, func.) :  48   0 1.298848951e-11 2.864924680e-10
               Iteration (num., iy, grad. norm, func.) :  49   0 9.021107270e-12 2.864924504e-10
               Iteration (num., iy, grad. norm, func.) :  50   0 8.876770088e-12 2.864924423e-10
               Iteration (num., iy, grad. norm, func.) :  51   0 6.716033900e-12 2.864924386e-10
               Iteration (num., iy, grad. norm, func.) :  52   0 9.052894752e-12 2.864924344e-10
               Iteration (num., iy, grad. norm, func.) :  53   0 6.262797880e-12 2.864924293e-10
               Iteration (num., iy, grad. norm, func.) :  54   0 5.813147209e-12 2.864924276e-10
               Iteration (num., iy, grad. norm, func.) :  55   0 7.256414044e-12 2.864924252e-10
               Iteration (num., iy, grad. norm, func.) :  56   0 2.555238916e-12 2.864924216e-10
               Iteration (num., iy, grad. norm, func.) :  57   0 3.739142424e-12 2.864924210e-10
               Iteration (num., iy, grad. norm, func.) :  58   0 3.395165911e-12 2.864924204e-10
               Iteration (num., iy, grad. norm, func.) :  59   0 3.831765034e-12 2.864924190e-10
               Iteration (num., iy, grad. norm, func.) :  60   0 1.592600496e-12 2.864924172e-10
               Iteration (num., iy, grad. norm, func.) :  61   0 2.046670301e-12 2.864924171e-10
               Iteration (num., iy, grad. norm, func.) :  62   0 1.622732683e-12 2.864924169e-10
               Iteration (num., iy, grad. norm, func.) :  63   0 2.006693159e-12 2.864924166e-10
               Iteration (num., iy, grad. norm, func.) :  64   0 1.734866703e-12 2.864924162e-10
               Iteration (num., iy, grad. norm, func.) :  65   0 1.304489358e-12 2.864924159e-10
               Iteration (num., iy, grad. norm, func.) :  66   0 1.084620898e-12 2.864924159e-10
               Iteration (num., iy, grad. norm, func.) :  67   0 8.307239132e-13 2.864924158e-10
            Solving for output 0 - done. Time (sec):  1.7402730
            Solving for output 1 ...
               Iteration (num., iy, grad. norm, func.) :   0   1 1.314155074e-05 6.384202420e-06
               Iteration (num., iy, grad. norm, func.) :   0   1 1.315928341e-05 6.143977713e-06
               Iteration (num., iy, grad. norm, func.) :   1   1 1.154682919e-05 7.656947029e-07
               Iteration (num., iy, grad. norm, func.) :   2   1 1.465203371e-05 2.980622274e-07
               Iteration (num., iy, grad. norm, func.) :   3   1 4.625767090e-06 1.079688836e-07
               Iteration (num., iy, grad. norm, func.) :   4   1 8.246064892e-06 9.371523682e-08
               Iteration (num., iy, grad. norm, func.) :   5   1 5.367834919e-06 6.438439692e-08
               Iteration (num., iy, grad. norm, func.) :   6   1 1.544832966e-06 3.861049851e-08
               Iteration (num., iy, grad. norm, func.) :   7   1 9.031989319e-07 3.389328335e-08
               Iteration (num., iy, grad. norm, func.) :   8   1 3.999021991e-07 3.025673984e-08
               Iteration (num., iy, grad. norm, func.) :   9   1 1.814510006e-07 2.271049772e-08
               Iteration (num., iy, grad. norm, func.) :  10   1 8.858417326e-08 1.670709375e-08
               Iteration (num., iy, grad. norm, func.) :  11   1 3.056416974e-08 1.464252693e-08
               Iteration (num., iy, grad. norm, func.) :  12   1 2.782520357e-08 1.462325742e-08
               Iteration (num., iy, grad. norm, func.) :  13   1 2.782520357e-08 1.462325742e-08
               Iteration (num., iy, grad. norm, func.) :  14   1 2.727422124e-08 1.462029725e-08
               Iteration (num., iy, grad. norm, func.) :  15   1 1.965107805e-08 1.459512623e-08
               Iteration (num., iy, grad. norm, func.) :  16   1 2.096614317e-08 1.458538175e-08
               Iteration (num., iy, grad. norm, func.) :  17   1 1.236092175e-08 1.454967165e-08
               Iteration (num., iy, grad. norm, func.) :  18   1 1.593068541e-08 1.451034172e-08
               Iteration (num., iy, grad. norm, func.) :  19   1 5.275613492e-09 1.448191845e-08
               Iteration (num., iy, grad. norm, func.) :  20   1 8.440365910e-09 1.447727819e-08
               Iteration (num., iy, grad. norm, func.) :  21   1 5.742131647e-09 1.447717235e-08
               Iteration (num., iy, grad. norm, func.) :  22   1 9.954048290e-09 1.447641380e-08
               Iteration (num., iy, grad. norm, func.) :  23   1 3.343603473e-09 1.447043541e-08
               Iteration (num., iy, grad. norm, func.) :  24   1 4.464192152e-09 1.446947735e-08
               Iteration (num., iy, grad. norm, func.) :  25   1 2.826027167e-09 1.446820216e-08
               Iteration (num., iy, grad. norm, func.) :  26   1 4.161702182e-09 1.446691431e-08
               Iteration (num., iy, grad. norm, func.) :  27   1 1.748053041e-09 1.446584543e-08
               Iteration (num., iy, grad. norm, func.) :  28   1 2.845455738e-09 1.446523563e-08
               Iteration (num., iy, grad. norm, func.) :  29   1 1.232116011e-09 1.446469173e-08
               Iteration (num., iy, grad. norm, func.) :  30   1 1.086781065e-09 1.446455345e-08
               Iteration (num., iy, grad. norm, func.) :  31   1 1.368466139e-09 1.446430399e-08
               Iteration (num., iy, grad. norm, func.) :  32   1 1.055677821e-09 1.446403720e-08
               Iteration (num., iy, grad. norm, func.) :  33   1 1.513493352e-09 1.446383873e-08
               Iteration (num., iy, grad. norm, func.) :  34   1 5.201430031e-10 1.446375455e-08
               Iteration (num., iy, grad. norm, func.) :  35   1 4.051375251e-10 1.446374741e-08
               Iteration (num., iy, grad. norm, func.) :  36   1 6.626621516e-10 1.446372958e-08
               Iteration (num., iy, grad. norm, func.) :  37   1 5.304259808e-10 1.446367918e-08
               Iteration (num., iy, grad. norm, func.) :  38   1 3.647179408e-10 1.446362945e-08
               Iteration (num., iy, grad. norm, func.) :  39   1 4.390649321e-10 1.446360112e-08
               Iteration (num., iy, grad. norm, func.) :  40   1 2.551311266e-10 1.446359078e-08
               Iteration (num., iy, grad. norm, func.) :  41   1 2.025727989e-10 1.446358914e-08
               Iteration (num., iy, grad. norm, func.) :  42   1 2.590828580e-10 1.446358635e-08
               Iteration (num., iy, grad. norm, func.) :  43   1 2.465075755e-10 1.446357854e-08
               Iteration (num., iy, grad. norm, func.) :  44   1 1.708026086e-10 1.446357145e-08
               Iteration (num., iy, grad. norm, func.) :  45   1 1.842322085e-10 1.446356736e-08
               Iteration (num., iy, grad. norm, func.) :  46   1 1.123597500e-10 1.446356547e-08
               Iteration (num., iy, grad. norm, func.) :  47   1 1.775927306e-10 1.446356518e-08
               Iteration (num., iy, grad. norm, func.) :  48   1 9.881865973e-11 1.446356399e-08
               Iteration (num., iy, grad. norm, func.) :  49   1 9.987164697e-11 1.446356318e-08
               Iteration (num., iy, grad. norm, func.) :  50   1 7.129935936e-11 1.446356175e-08
               Iteration (num., iy, grad. norm, func.) :  51   1 8.491078803e-11 1.446356074e-08
               Iteration (num., iy, grad. norm, func.) :  52   1 3.521791038e-11 1.446356015e-08
               Iteration (num., iy, grad. norm, func.) :  53   1 6.356842185e-11 1.446356014e-08
               Iteration (num., iy, grad. norm, func.) :  54   1 4.199148367e-11 1.446356003e-08
               Iteration (num., iy, grad. norm, func.) :  55   1 7.261549582e-11 1.446355987e-08
               Iteration (num., iy, grad. norm, func.) :  56   1 2.400361237e-11 1.446355951e-08
               Iteration (num., iy, grad. norm, func.) :  57   1 2.328510840e-11 1.446355939e-08
               Iteration (num., iy, grad. norm, func.) :  58   1 2.043394529e-11 1.446355936e-08
               Iteration (num., iy, grad. norm, func.) :  59   1 3.482655969e-11 1.446355935e-08
               Iteration (num., iy, grad. norm, func.) :  60   1 1.573842347e-11 1.446355931e-08
               Iteration (num., iy, grad. norm, func.) :  61   1 2.919579108e-11 1.446355925e-08
               Iteration (num., iy, grad. norm, func.) :  62   1 7.798299641e-12 1.446355918e-08
               Iteration (num., iy, grad. norm, func.) :  63   1 4.688203871e-12 1.446355917e-08
               Iteration (num., iy, grad. norm, func.) :  64   1 6.787675892e-12 1.446355917e-08
               Iteration (num., iy, grad. norm, func.) :  65   1 4.964232812e-12 1.446355916e-08
               Iteration (num., iy, grad. norm, func.) :  66   1 8.890123925e-12 1.446355916e-08
               Iteration (num., iy, grad. norm, func.) :  67   1 5.672736302e-12 1.446355916e-08
               Iteration (num., iy, grad. norm, func.) :  68   1 4.241498218e-12 1.446355916e-08
               Iteration (num., iy, grad. norm, func.) :  69   1 4.029738007e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  70   1 3.646613533e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  71   1 3.157000657e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  72   1 2.984397056e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  73   1 5.117378702e-12 1.446355915e-08
               Iteration (num., iy, grad. norm, func.) :  74   1 9.244208624e-13 1.446355915e-08
            Solving for output 1 - done. Time (sec):  1.9195404
         Solving nonlinear problem (n=1764) - done. Time (sec):  3.6598823
      Solving for degrees of freedom - done. Time (sec):  3.7117989
   Training - done. Time (sec):  3.7300661
___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000018

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000020

___________________________________________________________________________

 Evaluation

      # eval points. : 500

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

   Prediction time/pt. (sec) :  0.0000019

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

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

   Prediction time/pt. (sec) :  0.0000015

___________________________________________________________________________

 Evaluation

      # eval points. : 2500

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

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