24 double local_pressure_left, local_pressure_right;
27 int counter_mean_pressure;
30 double perfect_sinus_emitter;
32 perfect_sinus_emitter = 1.0 / sqrt(2);
35 counter_mean_pressure = 0;
39 #pragma omp parallel default(none) \
40 private(j, i, k, local_pressure_left, \
41 local_pressure_right, one_boundary, \
43 shared(x, y, z, pre, dom, \
44 pressure_integrated, mean_pressure, counter_mean_pressure)
48 for (i = 0; i <
x; i++) {
50 #pragma omp for schedule(static)
52 for (j = 0; j <
y; j++) {
53 for (k = 0; k <
z; k++) {
55 if (
dom[i][j][k] == 0) {
62 #pragma omp end critical
68 counter_mean_pressure++;
70 #pragma omp end critical
97 #pragma omp parallel default(none) \
99 shared(x, y, z, pre_old, pre, \
100 soundemitter, dom, pressure, \
101 pressure_on_solid, with_one_pulse, counter)
104 for (i = 1; i < x - 1; i++) {
107 #pragma omp for schedule(static)
110 for (j = 1; j < y - 1; j++) {
111 for (k = 1; k < z - 1; k++) {
218 local_pressure_right = 0.0;
219 local_pressure_left = 0.0;
222 #pragma omp parallel default(none) \
223 private(j, i, k, local_pressure_left, \
224 local_pressure_right, one_boundary, \
226 shared(x, y, z, pre_old, pre, \
227 soundemitter, dom, pressure, \
228 pressure_on_solid, obstalce_absorption_coefficient, \
229 pressure_integrated, mean_pressure, counter, \
234 for (i = 1; i < x - 1; i++) {
236 #pragma omp for schedule(static)
238 for (j = 1; j < y - 1; j++) {
239 for (k = 1; k < z - 1; k++) {
244 if (
dom[i - 1][j][k] != 1) {
248 if ((
dom[i + 1][j][k] != 1) && (left > 0)) {
251 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
255 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
265 for (i = 1; i < x - 1; i++) {
267 #pragma omp for schedule(static)
269 for (j = 1; j < y - 1; j++) {
270 for (k = 1; k < z - 1; k++) {
274 if (
dom[i][j - 1][k] != 1) {
279 if ((
dom[i][j + 1][k] != 1) && (left > 0)) {
282 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
287 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
297 for (i = 1; i < x - 1; i++) {
299 #pragma omp for schedule(static)
301 for (j = 1; j < y - 1; j++) {
302 for (k = 1; k < z - 1; k++) {
306 if (
dom[i][j][k - 1] != 1) {
310 if ((
dom[i][j][k + 1] != 1) && (left > 0)) {
313 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
317 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
339 #pragma omp parallel default(none) \
341 shared(x, y, z, pre_old, pre, \
342 soundemitter, dom, pressure, \
343 pressure_on_solid, mean_pressure, \
344 with_one_pulse, counter)
349 #pragma omp for schedule(static)
351 for (i = 1; i < x - 1; i++) {
352 for (j = 1; j < y - 1; j++) {
388 if (
dom[i - 1][j + 1][k] != 1)
pressure_on_solid[i - 1][j + 1][k] =
pre[i - 1][j + 1][k] - pre_old[i - 1][j + 1][k];
394 if (
dom[i + 1][j - 1][k] != 1)
pressure_on_solid[i + 1][j - 1][k] =
pre[i + 1][j - 1][k] - pre_old[i + 1][j - 1][k];
396 if (
dom[i + 1][j + 1][k] != 1)
pressure_on_solid[i + 1][j + 1][k] =
pre[i + 1][j + 1][k] - pre_old[i + 1][j + 1][k];
411 local_pressure_right = 0.0;
412 local_pressure_left = 0.0;
417 #pragma omp parallel default(none) \
418 private(j, i, k, local_pressure_left, \
419 local_pressure_right, \
421 shared(x, y, z, pre_old, pre, \
422 soundemitter, dom, pressure_on_solid, \
423 obstalce_absorption_coefficient, \
429 #pragma omp for schedule(static)
431 for (i = 1; i < x - 1; i++) {
432 for (j = 1; j < y - 1; j++) {
436 if (
dom[i - 1][j][k] != 1) {
441 if ((
dom[i + 1][j][k] != 1) && (left > 0)) {
445 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
449 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
461 local_pressure_right = 0.0;
462 local_pressure_left = 0.0;
466 #pragma omp parallel default(none) \
467 private(j, i, k, local_pressure_left, \
468 local_pressure_right, \
470 shared(x, y, z, pre_old, pre, \
471 soundemitter, dom, pressure_on_solid, \
472 obstalce_absorption_coefficient, \
478 #pragma omp for schedule(static)
480 for (i = 1; i < x - 1; i++) {
481 for (j = 1; j < y - 1; j++) {
486 if (
dom[i][j - 1][k] != 1) {
490 if ((
dom[i][j + 1][k] != 1) && (left > 0)) {
493 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
497 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
516 local_pressure_right = 0.0;
517 local_pressure_left = 0.0;
522 for (i = 1; i < x - 1; i++) {
537 for (i = 1; i < x - 1; i++) {
541 if (
dom[i - 1][j][k] != 1) {
545 if ((
dom[i + 1][j][k] != 1) && (left > 0)) {
548 if (fabs(local_pressure_left) > fabs(local_pressure_right)) {
552 if (fabs(local_pressure_left) < fabs(local_pressure_right)) {
568 #pragma omp parallel default(none) \
569 private(j, i, k, local_pressure_left, \
570 local_pressure_right, one_boundary, \
572 shared(x, y, z, pre, dom, \
573 pressure_integrated, mean_pressure, dt)
577 for (i = 0; i <
x; i++) {
579 #pragma omp for schedule(static)
581 for (j = 0; j <
y; j++) {
582 for (k = 0; k <
z; k++) {
584 if (
dom[i][j][k] == 0) {
600 #pragma omp parallel default(none) \
601 private(j, i, k, local_pressure_left, \
602 local_pressure_right, one_boundary, \
604 shared(x, y, z, pre, pre_old, dom, \
605 pressure_integrated, mean_pressure, dt, \
606 perfect_sinus_emitter)
610 for (i = 0; i <
x; i++) {
612 #pragma omp for schedule(static)
614 for (j = 0; j <
y; j++) {
615 for (k = 0; k <
z; k++) {
616 if (
dom[i][j][k] == 0) {
618 tmp = fabs(
pre_old[i][j][k] -
pre[i][j][k]) * perfect_sinus_emitter;
619 if (tmp < 2.0e-5) tmp = 0.0;
639 #pragma omp parallel default(none) \
641 shared(x, y, z, pressure_integrated)
645 for (i = 0; i <
x; i++) {
647 #pragma omp for schedule(static)
650 for (j = 0; j <
y; j++) {
651 for (k = 0; k <
z; k++) {
671 #pragma omp parallel default(none) \
673 shared(x, y, z, pressure_integrated, \
674 dB_map, mean_pressure, dt_integrated, \
675 with_one_pulse, dB_Map_ready)
683 #pragma omp for schedule(static)
685 for (i = 0; i <
x; i++) {
686 for (j = 0; j <
y; j++) {
687 for (k = 0; k <
z; k++) {