直接看圖:
i=9和j=29代表的是物面網格兩個方向的數據點個數。
程序實現
ofstream out3("船體表面壓力系數.dat");
out3 << "Variables=\"x\" \"y\" \"z\" \"p\"" << endl;
out3 << "Zone i=" << NY << " j=" << NX << endl;
for (int i = 0; i < NB; i++)
{
out3 << fixed << setw(w_char) << setprecision(n_deci) << control_point[0][i] << fixed << setw(w_char) << setprecision(n_deci) << control_point[1][i] << fixed << setw(w_char) << setprecision(n_deci) << control_point[2][i] << fixed << setw(w_char) << setprecision(n_deci) << Cpi[i] << endl;
}
out3.close();