Вот моя матрица в файле:
Код: Выделить всё
0 0 0 0 0 0 0
0.0344828 0.323538 0.0108884 2.6302 -0.00601043 0.0019921 2.37015
0.0689655 0.315323 0.00207342 3.92065 -0.00923253 0.00402598 3.35243
0.103448 0.175781 -0.063686 4.23273 -0.00881114 0.0056472 3.79407
0.137931 0.0224418 -0.136528 4.29968 -0.00513587 0.00650649 4.04466
0.172414 -0.0932421 -0.183356 4.33218 -0.000438406 0.00697551 4.20336
0.206897 -0.148808 -0.193323 4.40354 0.00352467 0.00698478 4.31558
0.241379 -0.16686 -0.172197 4.51575 0.00628366 0.00647283 4.40149
0.275862 -0.164914 -0.129917 4.63925 0.00770706 0.00567122 4.46758
0.310345 -0.128657 -0.092887 4.73243 0.00787571 0.00482414 4.52067
0.344828 -0.0776035 -0.0664981 4.79118 0.00743055 0.00400328 4.56789
0.37931 -0.0385587 -0.05244 4.80834 0.0061065 0.00328682 4.60748
0.413793 -0.0040996 -0.0490464 4.79264 0.00462926 0.00260406 4.64237
0.448276 0.0220397 -0.0481575 4.76923 0.00303705 0.00194038 4.67413
0.482759 0.0398955 -0.0473876 4.7406 0.00182074 0.00128583 4.70189
0.517241 0.0541651 -0.0449 4.71528 0.000727833 0.000633435 4.72829
0.551724 0.0588831 -0.0362422 4.70938 8.49119e-05 -6.27609e-05 4.75152
0.586207 0.061897 -0.0272721 4.70866 -0.000363273 -0.000773489 4.77342
0.62069 0.0606852 -0.0129192 4.7187 -0.000587166 -0.00143652 4.79323
0.655172 0.0605354 -0.000346813 4.72946 -0.000544833 -0.00204383 4.81059
0.689655 0.0587716 0.0135411 4.73842 -0.0004949 -0.00264921 4.82794
0.724138 0.0639723 0.0221793 4.74228 -0.000198867 -0.0029033 4.84047
0.758621 0.0692056 0.0307559 4.746 9.95025e-05 -0.00315412 4.85295
0.793103 0.074144 0.037433 4.74651 0.000357403 -0.00325805 4.86406
0.827586 0.0841098 0.0399013 4.75459 0.000502533 -0.00296743 4.87154
0.862069 0.0937132 0.0425136 4.76246 0.000647458 -0.00267717 4.87901
0.896552 0.0997181 0.0454041 4.77419 0.000719785 -0.00227675 4.88509
0.931034 0.104461 0.0459297 4.79986 0.000615777 -0.00159462 4.88769
0.965517 0.109204 0.0464553 4.82552 0.000511769 -0.000912495 4.89028
1 0.112065 0.0491291 4.85342 0.00040813 -0.000228803 4.89288
Код: Выделить всё
#include
#include
#include
#include
#include
using namespace std;
string fn, path_str;
string root("/home/mostafa/OpenFOAM/mostafa-2.1.0/run/tutorials/incompressible/pisoFoam/channelLES/Balaras/09/postProcessing/mydata/");
string endfile("/Data0_U_UMean.xy");
float fileName, h[30][95], u[30][95], v[30][95], w[30][95], data[7][30], uMean[7], vMean[30], wMean[30];
float uPrime[30][95], vPrime[30][95], wPrime[30][95];
float uPrime2Mean[30], vPrime2Mean[30], wPrime2Mean[30];
float uPrimeMean[30], vPrimeMean[30], wPrimeMean[30];
float u2_rms[30], v2_rms[30], w2_rms[30];
int main ()
{
for (int t=0;t data[x][y];
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/25449533/terminate-called-after-throwing-an-instance-of-stdios-basefailure-what[/url]