1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| void loadSint4(double sint4Energies[6][6][4][4][4][4], double sint4Enthalpies[7][7][5][5][5][5], int NA, double saltCorrection, double* gArray, size_t gArraySize, double* hArray, size_t hArraySize)
{
int b, c, i1, j1, i2, j2;
if (NA)
{
gFile = openFile("sint4.DGD");
hFile = openFile("sint4.DHD");
}
else
{
gFile = openFile("sint4.DG");
hFile = openFile("sint4.DH");
}
for (b = 0; b < 7; ++b)
for (c = 0; c < 7; ++c)
for (i1 = 0; i1 < 5; ++i1)
for (j1 = 0; j1 < 5; ++j1)
for (i2 = 0; i2 < 5; ++i2)
for (j2 = 0; j2 < 5; ++j2)
if (b == 6 || c == 6)
{
sint4Enthalpies[b][c][i1][j1][i2][j2] = INFINITY;
}
else if (i1 == 4 || j1 == 4 || i2 == 4 || j2 == 4)
{
sint4Enthalpies[b][c][i1][j1][i2][j2] = 0;
}
else
{
fscanf(gFile, "%lf", &sint4Energies[b][c][i1][j1][i2][j2]);
sint4Energies[b][c][i1][j1][i2][j2] += 3.0 * saltCorrection;
fscanf(hFile, "%lf", &sint4Enthalpies[b][c][i1][j1][i2][j2]);
l++;
}
fclose(gFile);
fclose(hFile);
} |
Partager