diff --git a/documentation/architecture.html b/documentation/architecture.html
index e25000894..6ac4a06b7 100644
--- a/documentation/architecture.html
+++ b/documentation/architecture.html
@@ -401,7 +401,7 @@
diff --git a/post_process/m__data__output_8fpp_8f90_source.html b/post_process/m__data__output_8fpp_8f90_source.html
index 3860fe041..74b9f0d58 100644
--- a/post_process/m__data__output_8fpp_8f90_source.html
+++ b/post_process/m__data__output_8fpp_8f90_source.html
@@ -2233,7 +2233,7 @@
impure subroutine s_mpi_gather_data_extents(q_sf, data_extents)
This subroutine gathers the Silo database metadata for the flow variable's extents as to boost perfor...
Conservative-to-primitive variable conversion, mixture property evaluation, and pressure computation.
real(wp), dimension(:), allocatable, public gammas
-
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, h, adv, vel_sum, c_c, c, qv)
Computes the speed of sound from thermodynamic state variables, supporting multiple equation-of-state...
+
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, h, adv, vel_sum, c_c, c, qv)
Computes the speed of sound from thermodynamic state variables, supporting multiple equation-of-state...
real(wp), dimension(:), allocatable, public qvs
real(wp), dimension(:), allocatable, public pi_infs
Derived type annexing a scalar field (SF).
diff --git a/post_process/m__derived__variables_8fpp_8f90_source.html b/post_process/m__derived__variables_8fpp_8f90_source.html
index 4fbecfd1f..0c98fe9f9 100644
--- a/post_process/m__derived__variables_8fpp_8f90_source.html
+++ b/post_process/m__derived__variables_8fpp_8f90_source.html
@@ -1039,7 +1039,7 @@
Conservative-to-primitive variable conversion, mixture property evaluation, and pressure computation.
real(wp), dimension(:), allocatable, public gammas
real(wp), dimension(:, :, :), allocatable, public pi_inf_sf
Scalar liquid stiffness function.
-
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, h, adv, vel_sum, c_c, c, qv)
Computes the speed of sound from thermodynamic state variables, supporting multiple equation-of-state...
+
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, h, adv, vel_sum, c_c, c, qv)
Computes the speed of sound from thermodynamic state variables, supporting multiple equation-of-state...
real(wp), dimension(:, :, :), allocatable, public rho_sf
Scalar density function.
real(wp), dimension(:, :, :), allocatable, public gamma_sf
Scalar sp. heat ratio function.
real(wp), dimension(:), allocatable, public pi_infs
diff --git a/post_process/m__finite__differences_8fpp_8f90_source.html b/post_process/m__finite__differences_8fpp_8f90_source.html
index 7ab643194..bdb2090db 100644
--- a/post_process/m__finite__differences_8fpp_8f90_source.html
+++ b/post_process/m__finite__differences_8fpp_8f90_source.html
@@ -492,7 +492,7 @@
354 if (z == iz_s%beg)
then
355 divergence = divergence + (-3._wp*fields(3)%sf(x, y, z) + 4._wp*fields(3)%sf(x, y, z + 1) - fields(3)%sf(x, y, z + 2))/(
z_cc(z + 2) -
z_cc(z))
356 else if (z == iz_s%end)
then
-
357 divergence = divergence + (+3._wp*fields(3)%sf(x, y, z) - 4._wp*fields(3)%sf(x, y, z - 1) + fields(2)%sf(x, y, z - 2))/(
z_cc(z) -
z_cc(z - 2))
+
357 divergence = divergence + (+3._wp*fields(3)%sf(x, y, z) - 4._wp*fields(3)%sf(x, y, z - 1) + fields(3)%sf(x, y, z - 2))/(
z_cc(z) -
z_cc(z - 2))
359 divergence = divergence + (fields(3)%sf(x, y, z + 1) - fields(3)%sf(x, y, z - 1))/(
z_cc(z + 1) -
z_cc(z - 1))
diff --git a/post_process/m__mpi__common_8fpp_8f90_source.html b/post_process/m__mpi__common_8fpp_8f90_source.html
index d96881053..c25f1ad55 100644
--- a/post_process/m__mpi__common_8fpp_8f90_source.html
+++ b/post_process/m__mpi__common_8fpp_8f90_source.html
@@ -1975,9 +1975,9 @@
1801 (j + buff_size*((k + 1) + (n + 1)*l))
1802 q_comm(i)%sf(j + unpack_offset, k, l) = real(
buff_recv(r), kind=stp)
1803#if defined(__INTEL_COMPILER)
-
1804 if (ieee_is_nan(q_comm(i)%sf(j, k, l)))
then
+
1804 if (ieee_is_nan(q_comm(i)%sf(j + unpack_offset, k, l)))
then
1805 print *,
"Error", j, k, l, i
-
1806 error stop
"NaN(s) in recv"
+
@@ -2148,9 +2148,9 @@
1974 ((k + buff_size) + buff_size*l))
1975 q_comm(i)%sf(j, k + unpack_offset, l) = real(
buff_recv(r), kind=stp)
1976#if defined(__INTEL_COMPILER)
-
1977 if (ieee_is_nan(q_comm(i)%sf(j, k, l)))
then
+
1977 if (ieee_is_nan(q_comm(i)%sf(j, k + unpack_offset, l)))
then
1978 print *,
"Error", j, k, l, i
-
1979 error stop
"NaN(s) in recv"
+
@@ -2325,9 +2325,9 @@
2152 q_comm(i)%sf(j, k, l + unpack_offset) = real(
buff_recv(r), kind=stp)
2153#if defined(__INTEL_COMPILER)
-
2154 if (ieee_is_nan(q_comm(i)%sf(j, k, l)))
then
+
2154 if (ieee_is_nan(q_comm(i)%sf(j, k, l + unpack_offset)))
then
2155 print *,
"Error", j, k, l, i
-
2156 error stop
"NaN(s) in recv"
+
@@ -2524,699 +2524,697 @@
2350 recon_order = igr_order
-
-
2352 recon_order = weno_order
-
-
-
-
-
-
-
-
-
-
-
-
2364 num_procs_z = num_procs
-
-
-
-
2368 tmp_num_procs_y = num_procs_y
-
2369 tmp_num_procs_z = num_procs_z
-
2370 fct_min = 10._wp*abs((n + 1)/tmp_num_procs_y &
-
2371 - (p + 1)/tmp_num_procs_z)
-
-
-
-
-
2376 if (mod(num_procs, i) == 0 &
-
-
2378 (n + 1)/i >= num_stcls_min*recon_order)
then
-
-
-
2381 tmp_num_procs_z = num_procs/i
-
-
2383 if (fct_min >= abs((n + 1)/tmp_num_procs_y &
-
2384 - (p + 1)/tmp_num_procs_z) &
-
-
2386 (p + 1)/tmp_num_procs_z &
-
-
2388 num_stcls_min*recon_order)
then
-
-
-
2391 num_procs_z = num_procs/i
-
2392 fct_min = abs((n + 1)/tmp_num_procs_y &
-
2393 - (p + 1)/tmp_num_procs_z)
-
+
+
+
+
+
+
+
+
+
+
+
+
2362 num_procs_z = num_procs
+
+
+
+
2366 tmp_num_procs_y = num_procs_y
+
2367 tmp_num_procs_z = num_procs_z
+
2368 fct_min = 10._wp*abs((n + 1)/tmp_num_procs_y &
+
2369 - (p + 1)/tmp_num_procs_z)
+
+
+
+
+
2374 if (mod(num_procs, i) == 0 &
+
+
2376 (n + 1)/i >= num_stcls_min*recon_order)
then
+
+
+
2379 tmp_num_procs_z = num_procs/i
+
+
2381 if (fct_min >= abs((n + 1)/tmp_num_procs_y &
+
2382 - (p + 1)/tmp_num_procs_z) &
+
+
2384 (p + 1)/tmp_num_procs_z &
+
+
2386 num_stcls_min*recon_order)
then
+
+
+
2389 num_procs_z = num_procs/i
+
2390 fct_min = abs((n + 1)/tmp_num_procs_y &
+
2391 - (p + 1)/tmp_num_procs_z)
+
+
+
-
+
-
-
-
-
-
-
2403 if (cyl_coord .and. p > 0)
then
-
-
-
-
-
-
-
2410 num_procs_y = num_procs
-
-
-
-
-
2415 tmp_num_procs_x = num_procs_x
-
2416 tmp_num_procs_y = num_procs_y
-
2417 tmp_num_procs_z = num_procs_z
-
2418 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
-
2419 - (n + 1)/tmp_num_procs_y)
-
-
-
-
-
2424 if (mod(num_procs, i) == 0 &
-
-
2426 (m + 1)/i >= num_stcls_min*recon_order)
then
-
-
-
2429 tmp_num_procs_y = num_procs/i
-
-
2431 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
-
2432 - (n + 1)/tmp_num_procs_y) &
-
-
2434 (n + 1)/tmp_num_procs_y &
-
-
2436 num_stcls_min*recon_order)
then
-
-
-
2439 num_procs_y = num_procs/i
-
2440 fct_min = abs((m + 1)/tmp_num_procs_x &
-
2441 - (n + 1)/tmp_num_procs_y)
-
+
+
+
+
2401 if (cyl_coord .and. p > 0)
then
+
+
+
+
+
+
+
2408 num_procs_y = num_procs
+
+
+
+
+
2413 tmp_num_procs_x = num_procs_x
+
2414 tmp_num_procs_y = num_procs_y
+
2415 tmp_num_procs_z = num_procs_z
+
2416 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
+
2417 - (n + 1)/tmp_num_procs_y)
+
+
+
+
+
2422 if (mod(num_procs, i) == 0 &
+
+
2424 (m + 1)/i >= num_stcls_min*recon_order)
then
+
+
+
2427 tmp_num_procs_y = num_procs/i
+
+
2429 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
+
2430 - (n + 1)/tmp_num_procs_y) &
+
+
2432 (n + 1)/tmp_num_procs_y &
+
+
2434 num_stcls_min*recon_order)
then
+
+
+
2437 num_procs_y = num_procs/i
+
2438 fct_min = abs((m + 1)/tmp_num_procs_x &
+
2439 - (n + 1)/tmp_num_procs_y)
+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
2455 num_procs_z = num_procs
-
-
-
-
2459 tmp_num_procs_x = num_procs_x
-
2460 tmp_num_procs_y = num_procs_y
-
2461 tmp_num_procs_z = num_procs_z
-
2462 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
-
2463 - (n + 1)/tmp_num_procs_y) &
-
2464 + 10._wp*abs((n + 1)/tmp_num_procs_y &
-
2465 - (p + 1)/tmp_num_procs_z)
-
-
-
-
-
2470 if (mod(num_procs, i) == 0 &
-
-
2472 (m + 1)/i >= num_stcls_min*recon_order)
then
+
+
+
+
2453 num_procs_z = num_procs
+
+
+
+
2457 tmp_num_procs_x = num_procs_x
+
2458 tmp_num_procs_y = num_procs_y
+
2459 tmp_num_procs_z = num_procs_z
+
2460 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
+
2461 - (n + 1)/tmp_num_procs_y) &
+
2462 + 10._wp*abs((n + 1)/tmp_num_procs_y &
+
2463 - (p + 1)/tmp_num_procs_z)
+
+
+
+
+
2468 if (mod(num_procs, i) == 0 &
+
+
2470 (m + 1)/i >= num_stcls_min*recon_order)
then
+
+
2472 do j = 1, num_procs/i
-
2474 do j = 1, num_procs/i
-
-
2476 if (mod(num_procs/i, j) == 0 &
-
-
2478 (n + 1)/j >= num_stcls_min*recon_order)
then
-
-
-
-
2482 tmp_num_procs_z = num_procs/(i*j)
-
-
2484 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
-
2485 - (n + 1)/tmp_num_procs_y) &
-
2486 + abs((n + 1)/tmp_num_procs_y &
-
2487 - (p + 1)/tmp_num_procs_z) &
-
-
2489 (p + 1)/tmp_num_procs_z &
-
-
2491 num_stcls_min*recon_order) &
-
-
-
-
-
2496 num_procs_z = num_procs/(i*j)
-
2497 fct_min = abs((m + 1)/tmp_num_procs_x &
-
2498 - (n + 1)/tmp_num_procs_y) &
-
2499 + abs((n + 1)/tmp_num_procs_y &
-
2500 - (p + 1)/tmp_num_procs_z)
-
+
2474 if (mod(num_procs/i, j) == 0 &
+
+
2476 (n + 1)/j >= num_stcls_min*recon_order)
then
+
+
+
+
2480 tmp_num_procs_z = num_procs/(i*j)
+
+
2482 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
+
2483 - (n + 1)/tmp_num_procs_y) &
+
2484 + abs((n + 1)/tmp_num_procs_y &
+
2485 - (p + 1)/tmp_num_procs_z) &
+
+
2487 (p + 1)/tmp_num_procs_z &
+
+
2489 num_stcls_min*recon_order) &
+
+
+
+
+
2494 num_procs_z = num_procs/(i*j)
+
2495 fct_min = abs((m + 1)/tmp_num_procs_x &
+
2496 - (n + 1)/tmp_num_procs_y) &
+
2497 + abs((n + 1)/tmp_num_procs_y &
+
2498 - (p + 1)/tmp_num_procs_z)
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
2518 if (proc_rank == 0 .and. ierr == -1)
then
-
2519 call s_mpi_abort(
'Unsupported combination of values '// &
-
2520 'of num_procs, m, n, p and '// &
-
2521 'weno/muscl/igr_order. Exiting.')
-
-
-
-
2525 call mpi_cart_create(mpi_comm_world, 3, (/num_procs_x, &
-
2526 num_procs_y, num_procs_z/), &
-
2527 (/.true., .true., .true./), &
-
2528 .false., mpi_comm_cart, ierr)
-
-
-
2531 call mpi_cart_coords(mpi_comm_cart, proc_rank, 3, &
-
-
+
+
+
+
+
+
2516 if (proc_rank == 0 .and. ierr == -1)
then
+
2517 call s_mpi_abort(
'Unsupported combination of values '// &
+
2518 'of num_procs, m, n, p and '// &
+
2519 'weno/muscl/igr_order. Exiting.')
+
+
+
+
2523 call mpi_cart_create(mpi_comm_world, 3, (/num_procs_x, &
+
2524 num_procs_y, num_procs_z/), &
+
2525 (/.true., .true., .true./), &
+
2526 .false., mpi_comm_cart, ierr)
+
+
+
2529 call mpi_cart_coords(mpi_comm_cart, proc_rank, 3, &
+
+
+
+
-
-
-
-
2538 rem_cells = mod(p + 1, num_procs_z)
-
-
-
2541 p = (p + 1)/num_procs_z - 1
-
-
-
-
2545 if (proc_coords(3) == i - 1)
then
-
-
-
-
-
-
2551 if (proc_coords(3) > 0 .or. (bc_z%beg == bc_periodic .and. num_procs_z > 1))
then
-
2552 proc_coords(3) = proc_coords(3) - 1
-
2553 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
-
-
2555 proc_coords(3) = proc_coords(3) + 1
-
-
-
-
2559 if (proc_coords(3) < num_procs_z - 1 .or. (bc_z%end == bc_periodic .and. num_procs_z > 1))
then
-
2560 proc_coords(3) = proc_coords(3) + 1
-
2561 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
-
-
2563 proc_coords(3) = proc_coords(3) - 1
-
-
-
2566#ifdef MFC_POST_PROCESS
-
-
2568 if (proc_coords(3) > 0 .and.
format == 1)
then
-
-
-
-
-
-
-
2575 if (proc_coords(3) < num_procs_z - 1 .and.
format == 1)
then
-
-
-
-
-
-
-
-
2583 if (parallel_io)
then
-
2584 if (proc_coords(3) < rem_cells)
then
-
2585 start_idx(3) = (p + 1)*proc_coords(3)
-
-
2587 start_idx(3) = (p + 1)*proc_coords(3) + rem_cells
-
-
-
2590#ifdef MFC_PRE_PROCESS
-
2591 if (old_grid .neqv. .true.)
then
-
2592 dz = (z_domain%end - z_domain%beg)/real(p_glb + 1, wp)
-
-
2594 if (proc_coords(3) < rem_cells)
then
-
2595 z_domain%beg = z_domain%beg + dz*real((p + 1)* &
-
-
2597 z_domain%end = z_domain%end - dz*real((p + 1)* &
-
2598 (num_procs_z - proc_coords(3) - 1) &
-
2599 - (num_procs_z - rem_cells))
-
-
2601 z_domain%beg = z_domain%beg + dz*real((p + 1)* &
-
2602 proc_coords(3) + rem_cells)
-
2603 z_domain%end = z_domain%end - dz*real((p + 1)* &
-
2604 (num_procs_z - proc_coords(3) - 1))
-
-
-
-
-
-
-
-
-
-
-
2615 num_procs_y = num_procs
-
-
-
-
2619 tmp_num_procs_x = num_procs_x
-
2620 tmp_num_procs_y = num_procs_y
-
2621 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
-
2622 - (n + 1)/tmp_num_procs_y)
-
-
-
-
-
2627 if (mod(num_procs, i) == 0 &
-
-
2629 (m + 1)/i >= num_stcls_min*recon_order)
then
-
-
-
2632 tmp_num_procs_y = num_procs/i
-
-
2634 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
-
2635 - (n + 1)/tmp_num_procs_y) &
-
-
2637 (n + 1)/tmp_num_procs_y &
-
-
2639 num_stcls_min*recon_order)
then
-
-
-
2642 num_procs_y = num_procs/i
-
2643 fct_min = abs((m + 1)/tmp_num_procs_x &
-
2644 - (n + 1)/tmp_num_procs_y)
-
+
+
2536 rem_cells = mod(p + 1, num_procs_z)
+
+
+
2539 p = (p + 1)/num_procs_z - 1
+
+
+
+
2543 if (proc_coords(3) == i - 1)
then
+
+
+
+
+
+
2549 if (proc_coords(3) > 0 .or. (bc_z%beg == bc_periodic .and. num_procs_z > 1))
then
+
2550 proc_coords(3) = proc_coords(3) - 1
+
2551 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
+
+
2553 proc_coords(3) = proc_coords(3) + 1
+
+
+
+
2557 if (proc_coords(3) < num_procs_z - 1 .or. (bc_z%end == bc_periodic .and. num_procs_z > 1))
then
+
2558 proc_coords(3) = proc_coords(3) + 1
+
2559 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
+
+
2561 proc_coords(3) = proc_coords(3) - 1
+
+
+
2564#ifdef MFC_POST_PROCESS
+
+
2566 if (proc_coords(3) > 0 .and.
format == 1)
then
+
+
+
+
+
+
+
2573 if (proc_coords(3) < num_procs_z - 1 .and.
format == 1)
then
+
+
+
+
+
+
+
+
2581 if (parallel_io)
then
+
2582 if (proc_coords(3) < rem_cells)
then
+
2583 start_idx(3) = (p + 1)*proc_coords(3)
+
+
2585 start_idx(3) = (p + 1)*proc_coords(3) + rem_cells
+
+
+
2588#ifdef MFC_PRE_PROCESS
+
2589 if (old_grid .neqv. .true.)
then
+
2590 dz = (z_domain%end - z_domain%beg)/real(p_glb + 1, wp)
+
+
2592 if (proc_coords(3) < rem_cells)
then
+
2593 z_domain%beg = z_domain%beg + dz*real((p + 1)* &
+
+
2595 z_domain%end = z_domain%end - dz*real((p + 1)* &
+
2596 (num_procs_z - proc_coords(3) - 1) &
+
2597 - (num_procs_z - rem_cells))
+
+
2599 z_domain%beg = z_domain%beg + dz*real((p + 1)* &
+
2600 proc_coords(3) + rem_cells)
+
2601 z_domain%end = z_domain%end - dz*real((p + 1)* &
+
2602 (num_procs_z - proc_coords(3) - 1))
+
+
+
+
+
+
+
+
+
+
+
2613 num_procs_y = num_procs
+
+
+
+
2617 tmp_num_procs_x = num_procs_x
+
2618 tmp_num_procs_y = num_procs_y
+
2619 fct_min = 10._wp*abs((m + 1)/tmp_num_procs_x &
+
2620 - (n + 1)/tmp_num_procs_y)
+
+
+
+
+
2625 if (mod(num_procs, i) == 0 &
+
+
2627 (m + 1)/i >= num_stcls_min*recon_order)
then
+
+
+
2630 tmp_num_procs_y = num_procs/i
+
+
2632 if (fct_min >= abs((m + 1)/tmp_num_procs_x &
+
2633 - (n + 1)/tmp_num_procs_y) &
+
+
2635 (n + 1)/tmp_num_procs_y &
+
+
2637 num_stcls_min*recon_order)
then
+
+
+
2640 num_procs_y = num_procs/i
+
2641 fct_min = abs((m + 1)/tmp_num_procs_x &
+
2642 - (n + 1)/tmp_num_procs_y)
+
+
+
-
+
-
+
-
-
-
-
-
2655 if (proc_rank == 0 .and. ierr == -1)
then
-
2656 call s_mpi_abort(
'Unsupported combination of values '// &
-
2657 'of num_procs, m, n and '// &
-
2658 'weno/muscl/igr_order. Exiting.')
-
-
-
-
2662 call mpi_cart_create(mpi_comm_world, 2, (/num_procs_x, &
-
2663 num_procs_y/), (/.true., &
-
2664 .true./), .false., mpi_comm_cart, &
-
-
-
-
2668 call mpi_cart_coords(mpi_comm_cart, proc_rank, 2, &
-
-
-
-
+
+
+
2653 if (proc_rank == 0 .and. ierr == -1)
then
+
2654 call s_mpi_abort(
'Unsupported combination of values '// &
+
2655 'of num_procs, m, n and '// &
+
2656 'weno/muscl/igr_order. Exiting.')
+
+
+
+
2660 call mpi_cart_create(mpi_comm_world, 2, (/num_procs_x, &
+
2661 num_procs_y/), (/.true., &
+
2662 .true./), .false., mpi_comm_cart, &
+
+
+
+
2666 call mpi_cart_coords(mpi_comm_cart, proc_rank, 2, &
+
+
+
+
+
+
-
-
-
-
2677 rem_cells = mod(n + 1, num_procs_y)
-
-
-
2680 n = (n + 1)/num_procs_y - 1
-
-
-
-
2684 if (proc_coords(2) == i - 1)
then
-
-
-
-
-
-
2690 if (proc_coords(2) > 0 .or. (bc_y%beg == bc_periodic .and. num_procs_y > 1))
then
-
2691 proc_coords(2) = proc_coords(2) - 1
-
2692 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
-
-
2694 proc_coords(2) = proc_coords(2) + 1
-
-
-
-
2698 if (proc_coords(2) < num_procs_y - 1 .or. (bc_y%end == bc_periodic .and. num_procs_y > 1))
then
-
2699 proc_coords(2) = proc_coords(2) + 1
-
2700 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
-
-
2702 proc_coords(2) = proc_coords(2) - 1
-
-
-
2705#ifdef MFC_POST_PROCESS
-
-
2707 if (proc_coords(2) > 0 .and.
format == 1)
then
-
-
-
-
-
-
-
2714 if (proc_coords(2) < num_procs_y - 1 .and.
format == 1)
then
-
-
-
-
-
-
-
-
2722 if (parallel_io)
then
-
2723 if (proc_coords(2) < rem_cells)
then
-
2724 start_idx(2) = (n + 1)*proc_coords(2)
-
-
2726 start_idx(2) = (n + 1)*proc_coords(2) + rem_cells
-
-
-
2729#ifdef MFC_PRE_PROCESS
-
2730 if (old_grid .neqv. .true.)
then
-
2731 dy = (y_domain%end - y_domain%beg)/real(n_glb + 1, wp)
-
-
2733 if (proc_coords(2) < rem_cells)
then
-
2734 y_domain%beg = y_domain%beg + dy*real((n + 1)* &
-
-
2736 y_domain%end = y_domain%end - dy*real((n + 1)* &
-
2737 (num_procs_y - proc_coords(2) - 1) &
-
2738 - (num_procs_y - rem_cells))
-
-
2740 y_domain%beg = y_domain%beg + dy*real((n + 1)* &
-
2741 proc_coords(2) + rem_cells)
-
2742 y_domain%end = y_domain%end - dy*real((n + 1)* &
-
2743 (num_procs_y - proc_coords(2) - 1))
-
-
-
-
-
-
-
-
-
-
2753 num_procs_x = num_procs
-
-
-
2756 call mpi_cart_create(mpi_comm_world, 1, (/num_procs_x/), &
-
2757 (/.true./), .false., mpi_comm_cart, &
-
-
-
-
2761 call mpi_cart_coords(mpi_comm_cart, proc_rank, 1, &
-
+
+
2675 rem_cells = mod(n + 1, num_procs_y)
+
+
+
2678 n = (n + 1)/num_procs_y - 1
+
+
+
+
2682 if (proc_coords(2) == i - 1)
then
+
+
+
+
+
+
2688 if (proc_coords(2) > 0 .or. (bc_y%beg == bc_periodic .and. num_procs_y > 1))
then
+
2689 proc_coords(2) = proc_coords(2) - 1
+
2690 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
+
+
2692 proc_coords(2) = proc_coords(2) + 1
+
+
+
+
2696 if (proc_coords(2) < num_procs_y - 1 .or. (bc_y%end == bc_periodic .and. num_procs_y > 1))
then
+
2697 proc_coords(2) = proc_coords(2) + 1
+
2698 call mpi_cart_rank(mpi_comm_cart, proc_coords, &
+
+
2700 proc_coords(2) = proc_coords(2) - 1
+
+
+
2703#ifdef MFC_POST_PROCESS
+
+
2705 if (proc_coords(2) > 0 .and.
format == 1)
then
+
+
+
+
+
+
+
2712 if (proc_coords(2) < num_procs_y - 1 .and.
format == 1)
then
+
+
+
+
+
+
+
+
2720 if (parallel_io)
then
+
2721 if (proc_coords(2) < rem_cells)
then
+
2722 start_idx(2) = (n + 1)*proc_coords(2)
+
+
2724 start_idx(2) = (n + 1)*proc_coords(2) + rem_cells
+
+
+
2727#ifdef MFC_PRE_PROCESS
+
2728 if (old_grid .neqv. .true.)
then
+
2729 dy = (y_domain%end - y_domain%beg)/real(n_glb + 1, wp)
+
+
2731 if (proc_coords(2) < rem_cells)
then
+
2732 y_domain%beg = y_domain%beg + dy*real((n + 1)* &
+
+
2734 y_domain%end = y_domain%end - dy*real((n + 1)* &
+
2735 (num_procs_y - proc_coords(2) - 1) &
+
2736 - (num_procs_y - rem_cells))
+
+
2738 y_domain%beg = y_domain%beg + dy*real((n + 1)* &
+
2739 proc_coords(2) + rem_cells)
+
2740 y_domain%end = y_domain%end - dy*real((n + 1)* &
+
2741 (num_procs_y - proc_coords(2) - 1))
+
+
+
+
+
+
+
+
+
+
2751 num_procs_x = num_procs
+
+
+
2754 call mpi_cart_create(mpi_comm_world, 1, (/num_procs_x/), &
+
2755 (/.true./), .false., mpi_comm_cart, &
+
+
+
+
2759 call mpi_cart_coords(mpi_comm_cart, proc_rank, 1, &
+
+
+
-
+
-
-
-
-
2769 rem_cells = mod(m + 1, num_procs_x)
-
-
-
2772 m = (m + 1)/num_procs_x - 1
-
-
-
-
2776 if (proc_coords(1) == i - 1)
then
-
-
-
+
+
2767 rem_cells = mod(m + 1, num_procs_x)
+
+
+
2770 m = (m + 1)/num_procs_x - 1
+
+
+
+
2774 if (proc_coords(1) == i - 1)
then
+
+
+
+
+
2779 call s_update_cell_bounds(cells_bounds, m, n, p)
-
2781 call s_update_cell_bounds(cells_bounds, m, n, p)
-
-
-
2784 if (proc_coords(1) > 0 .or. (bc_x%beg == bc_periodic .and. num_procs_x > 1))
then
-
2785 proc_coords(1) = proc_coords(1) - 1
-
2786 call mpi_cart_rank(mpi_comm_cart, proc_coords, bc_x%beg, ierr)
-
2787 proc_coords(1) = proc_coords(1) + 1
-
-
-
-
2791 if (proc_coords(1) < num_procs_x - 1 .or. (bc_x%end == bc_periodic .and. num_procs_x > 1))
then
-
2792 proc_coords(1) = proc_coords(1) + 1
-
2793 call mpi_cart_rank(mpi_comm_cart, proc_coords, bc_x%end, ierr)
-
2794 proc_coords(1) = proc_coords(1) - 1
-
-
-
2797#ifdef MFC_POST_PROCESS
-
-
2799 if (proc_coords(1) > 0 .and.
format == 1)
then
-
-
-
-
-
-
-
2806 if (proc_coords(1) < num_procs_x - 1 .and.
format == 1)
then
-
-
-
-
-
-
-
-
2814 if (parallel_io)
then
-
2815 if (proc_coords(1) < rem_cells)
then
-
2816 start_idx(1) = (m + 1)*proc_coords(1)
-
-
2818 start_idx(1) = (m + 1)*proc_coords(1) + rem_cells
-
-
-
2821#ifdef MFC_PRE_PROCESS
-
2822 if (old_grid .neqv. .true.)
then
-
2823 dx = (x_domain%end - x_domain%beg)/real(m_glb + 1, wp)
-
-
2825 if (proc_coords(1) < rem_cells)
then
-
2826 x_domain%beg = x_domain%beg + dx*real((m + 1)* &
-
-
2828 x_domain%end = x_domain%end - dx*real((m + 1)* &
-
2829 (num_procs_x - proc_coords(1) - 1) &
-
2830 - (num_procs_x - rem_cells))
-
-
2832 x_domain%beg = x_domain%beg + dx*real((m + 1)* &
-
2833 proc_coords(1) + rem_cells)
-
2834 x_domain%end = x_domain%end - dx*real((m + 1)* &
-
2835 (num_procs_x - proc_coords(1) - 1))
-
-
+
+
2782 if (proc_coords(1) > 0 .or. (bc_x%beg == bc_periodic .and. num_procs_x > 1))
then
+
2783 proc_coords(1) = proc_coords(1) - 1
+
2784 call mpi_cart_rank(mpi_comm_cart, proc_coords, bc_x%beg, ierr)
+
2785 proc_coords(1) = proc_coords(1) + 1
+
+
+
+
2789 if (proc_coords(1) < num_procs_x - 1 .or. (bc_x%end == bc_periodic .and. num_procs_x > 1))
then
+
2790 proc_coords(1) = proc_coords(1) + 1
+
2791 call mpi_cart_rank(mpi_comm_cart, proc_coords, bc_x%end, ierr)
+
2792 proc_coords(1) = proc_coords(1) - 1
+
+
+
2795#ifdef MFC_POST_PROCESS
+
+
2797 if (proc_coords(1) > 0 .and.
format == 1)
then
+
+
+
+
+
+
+
2804 if (proc_coords(1) < num_procs_x - 1 .and.
format == 1)
then
+
+
+
+
+
+
+
+
2812 if (parallel_io)
then
+
2813 if (proc_coords(1) < rem_cells)
then
+
2814 start_idx(1) = (m + 1)*proc_coords(1)
+
+
2816 start_idx(1) = (m + 1)*proc_coords(1) + rem_cells
+
+
+
2819#ifdef MFC_PRE_PROCESS
+
2820 if (old_grid .neqv. .true.)
then
+
2821 dx = (x_domain%end - x_domain%beg)/real(m_glb + 1, wp)
+
+
2823 if (proc_coords(1) < rem_cells)
then
+
2824 x_domain%beg = x_domain%beg + dx*real((m + 1)* &
+
+
2826 x_domain%end = x_domain%end - dx*real((m + 1)* &
+
2827 (num_procs_x - proc_coords(1) - 1) &
+
2828 - (num_procs_x - rem_cells))
+
+
2830 x_domain%beg = x_domain%beg + dx*real((m + 1)* &
+
2831 proc_coords(1) + rem_cells)
+
2832 x_domain%end = x_domain%end - dx*real((m + 1)* &
+
2833 (num_procs_x - proc_coords(1) - 1))
+
+
+
+
-
-
-
+
-