The main hydro arrays allocation routine. Here density, pressure, velocities and the computational domain arrays are dynamically allocated. The size is determined from the resolution parameters x,y and z in the specified parameter file.
Definition at line 19 of file array_mallocater_global.c.
References advection, dB_map, dom, e_in, eng, marker, pre, pre_old, pressure_integrated, pressure_on_solid, rho, rho_visc, soundemitter, viscosity_on_off, vx, vx_visc, vy, vy_visc, vz, vz_visc, wind_marker, wind_on_off, with_sound_emitter, x, y, zdx, zdy, zdz, zxa, zxc, zya, zyc, zza, and zzc.
Referenced by main().
{
int i, j;
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
rho[i][j] = calloc(
z,
sizeof ***
rho);
}
}
printf("Density array memory allocated\n");
pre = calloc(x,
sizeof *
pre);
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
pre[i][j] = calloc(
z,
sizeof ***
pre);
}
}
printf("Pressure array memory allocated\n");
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
dom[i][j] = calloc(
z,
sizeof ***
dom);
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("Domain array and pressure on solid memory allocated\n");
eng = calloc(x,
sizeof *
eng);
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
eng[i][j] = calloc(
z,
sizeof ***
eng);
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("Energy and Temperature array memory allocated\n");
vx = calloc(x,
sizeof *
vx);
for (i = 0; i <
x; i++) {
vx[i] = calloc(
y,
sizeof **
vx);
for (j = 0; j <
y; j++) {
vx[i][j] = calloc(
z,
sizeof ***
vx);
}
}
vy = calloc(x,
sizeof *
vy);
for (i = 0; i <
x; i++) {
vy[i] = calloc(
y,
sizeof **
vy);
for (j = 0; j <
y; j++) {
vy[i][j] = calloc(
z,
sizeof ***
vy);
}
}
vz = calloc(x,
sizeof *
vz);
for (i = 0; i <
x; i++) {
vz[i] = calloc(
y,
sizeof **
vz);
for (j = 0; j <
y; j++) {
vz[i][j] = calloc(
z,
sizeof ***
vz);
}
}
printf("Velocities array memory allocated\n");
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("Marker array memory allocated\n");
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("Wind_marker array memory allocated\n");
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("viscosity arrays are allocated\n");
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
for (i = 0; i <
x; i++) {
for (j = 0; j <
y; j++) {
}
}
printf("dB-Map allocated\n");
printf("Soundemitter, pressure old array, pressure integrated and dB-Map memory allocated\n");
}
zxa = calloc(x,
sizeof *
zxa);
zxc = calloc(x,
sizeof *
zxc);
zdx = calloc(x,
sizeof *
zdx);
return 0;
}