24 fd = fopen(filename,
"wb");
26 printf(
"-----------------------------------\n");
27 printf(
"The output directory does not exist\n");
28 printf(
"-----------------------------------\n");
32 fseek(fd, 200, SEEK_SET);
33 for (i = 0; i <
x; i++) {
34 for (j = 0; j <
y; j++) {
35 for (k = 0; k <
z; k++) {
37 fwrite(&tmp, 1,
sizeof (
double), fd);
45 sprintf(filename,
"%stemp_ic.tyc",
output_dir);
46 fd = fopen(filename,
"wb");
48 fseek(fd, 200, SEEK_SET);
49 for (i = 0; i <
x; i++) {
50 for (j = 0; j <
y; j++) {
51 for (k = 0; k <
z; k++) {
53 fwrite(&tmp, 1,
sizeof (
double), fd);
59 sprintf(filename,
"%spressure_ic.tyc",
output_dir);
60 fd = fopen(filename,
"wb");
62 fseek(fd, 200, SEEK_SET);
63 for (i = 0; i <
x; i++) {
64 for (j = 0; j <
y; j++) {
65 for (k = 0; k <
z; k++) {
66 if (
dom[i][j][k] == 0) tmp =
pre[i][j][k];
67 if (
dom[i][j][k] == 1) tmp = 0.0;
68 fwrite(&tmp, 1,
sizeof (
double), fd);
75 fd = fopen(filename,
"wb");
77 fseek(fd, 200, SEEK_SET);
78 for (i = 0; i <
x; i++) {
79 for (j = 0; j <
y; j++) {
80 for (k = 0; k <
z; k++) {
82 fwrite(&tmp, 1,
sizeof (
double), fd);
84 fwrite(&tmp, 1,
sizeof (
double), fd);
86 fwrite(&tmp, 1,
sizeof (
double), fd);
93 sprintf(filename,
"%spressure_on_solid_ic.tyc",
output_dir);
94 fd = fopen(filename,
"wb");
96 fseek(fd, 200, SEEK_SET);
97 for (i = 0; i <
x; i++) {
98 for (j = 0; j <
y; j++) {
99 for (k = 0; k <
z; k++) {
101 fwrite(&tmp, 1,
sizeof (
double), fd);
109 fd = fopen(filename,
"wb");
110 fprintf(fd,
"TYCHO dba_map\n%g\n%i\n%i\n%i\n%i\n",
time_sim, x, y, z,
counter);
111 fseek(fd, 200, SEEK_SET);
112 for (i = 0; i <
x; i++) {
113 for (j = 0; j <
y; j++) {
114 for (k = 0; k <
z; k++) {
117 printf(
"NaN in dB_map array %i %i %i\n", i, j, k);
121 fwrite(&tmp, 1,
sizeof (
double), fd);
131 sprintf(filename,
"%smarker_ic.tyc",
output_dir);
132 fd = fopen(filename,
"wb");
134 fseek(fd, 200, SEEK_SET);
135 for (i = 0; i <
x; i++) {
136 for (j = 0; j <
y; j++) {
137 for (k = 0; k <
z; k++) {
140 printf(
"NaN in marker array %i %i %i\n", i, j, k);
143 fwrite(&tmp, 1,
sizeof (
double), fd);