-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
0 0.000000e+00 1.000000e-06 0 single_file little rho vx1 prs tr1 | ||
1 9.999518e-02 5.170349e-06 19817 single_file little rho vx1 prs tr1 | ||
2 1.999976e-01 5.294824e-06 38884 single_file little rho vx1 prs tr1 | ||
3 2.999967e-01 5.164444e-06 57918 single_file little rho vx1 prs tr1 | ||
4 3.999968e-01 5.107502e-06 77268 single_file little rho vx1 prs tr1 | ||
5 4.999956e-01 5.011683e-06 96913 single_file little rho vx1 prs tr1 | ||
6 5.999974e-01 5.042316e-06 116760 single_file little rho vx1 prs tr1 | ||
7 6.999991e-01 5.008210e-06 136629 single_file little rho vx1 prs tr1 | ||
8 7.999984e-01 5.079595e-06 156525 single_file little rho vx1 prs tr1 | ||
9 8.999967e-01 5.014071e-06 176607 single_file little rho vx1 prs tr1 | ||
10 9.999980e-01 4.885510e-06 196912 single_file little rho vx1 prs tr1 | ||
11 1.099997e+00 4.894873e-06 217326 single_file little rho vx1 prs tr1 | ||
12 1.199996e+00 4.832899e-06 237881 single_file little rho vx1 prs tr1 | ||
13 1.299997e+00 4.841248e-06 258565 single_file little rho vx1 prs tr1 | ||
14 1.399998e+00 4.769439e-06 279367 single_file little rho vx1 prs tr1 | ||
15 1.499996e+00 4.741405e-06 300239 single_file little rho vx1 prs tr1 | ||
16 1.599996e+00 4.649981e-06 321359 single_file little rho vx1 prs tr1 | ||
17 1.699997e+00 4.551284e-06 343053 single_file little rho vx1 prs tr1 | ||
18 1.799997e+00 4.603424e-06 365055 single_file little rho vx1 prs tr1 | ||
19 1.899996e+00 4.754961e-06 386418 single_file little rho vx1 prs tr1 | ||
20 1.999998e+00 4.897244e-06 407081 single_file little rho vx1 prs tr1 | ||
21 2.099996e+00 4.961935e-06 427202 single_file little rho vx1 prs tr1 | ||
22 2.199996e+00 5.066816e-06 447038 single_file little rho vx1 prs tr1 | ||
23 2.299996e+00 5.101879e-06 466792 single_file little rho vx1 prs tr1 | ||
24 2.399998e+00 5.057374e-06 486399 single_file little rho vx1 prs tr1 | ||
25 2.499999e+00 5.121174e-06 505944 single_file little rho vx1 prs tr1 | ||
26 2.599995e+00 5.123434e-06 525556 single_file little rho vx1 prs tr1 | ||
27 2.699996e+00 4.978925e-06 545305 single_file little rho vx1 prs tr1 | ||
28 2.799999e+00 5.039993e-06 565305 single_file little rho vx1 prs tr1 | ||
29 2.899996e+00 4.926977e-06 585448 single_file little rho vx1 prs tr1 | ||
30 3.000000e+00 9.177121e-08 605752 single_file little rho vx1 prs tr1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <math.h> | ||
#include "local_pluto.h" | ||
|
||
#define MWIDTH 2 | ||
#define MHEIGHT 1001 | ||
|
||
double lambda(double T){ | ||
|
||
FILE* fp; | ||
int height, width, ii, jj; | ||
float array[MHEIGHT][MWIDTH]; | ||
|
||
if((fp = fopen("cooltable.dat", "r")) == NULL) | ||
exit(1); | ||
|
||
for(jj=0; jj<MHEIGHT; jj++) | ||
for(ii=0; ii<MWIDTH; ii++) | ||
if(fscanf(fp, "%e", &array[jj][ii])!=1) exit(1); | ||
|
||
fclose(fp); | ||
/* | ||
for(jj=0; jj<MHEIGHT; jj++){ | ||
for(ii=0; ii<MWIDTH; ii++) | ||
printf ("%e ", array[jj][ii]); | ||
printf("\n"); | ||
} | ||
*/ | ||
|
||
|
||
|
||
for(jj=1; jj<MHEIGHT; jj++){ | ||
if ((T-array[jj][0])<0 ){ | ||
if (abs(T-array[jj-1][0])>(T-array[jj][0])) return array[jj][1]; | ||
else return array[jj-1][1]; | ||
} | ||
} | ||
return array[MHEIGHT-1][1]; | ||
} |