@@ -1635,27 +1635,36 @@ contains
16351635 @:DEALLOCATE(vel_in, vel_out, pres_in, pres_out, Del_in, Del_out, alpha_rho_in, alpha_in)
16361636
16371637 ! Deallocating CBC Coefficients in x-direction
1638- if (any((/bc_x%beg, bc_x%end/) <= -5) .and. any((/bc_x%beg, bc_x%end/) >= -13)) then
1638+ if (all((/bc_x%beg, bc_x%end/) <= -5) .and. all((/bc_x%beg, bc_x%end/) >= -13) .or. &
1639+ bc_x%beg <= -5 .and. bc_x%beg >= -13 .or. &
1640+ bc_x%end <= -5 .and. bc_x%end >= -13) then
16391641 @:DEALLOCATE(fd_coef_x)
16401642 if (weno_order > 1 .or. muscl_order > 1) then
16411643 @:DEALLOCATE(pi_coef_x)
16421644 end if
16431645 end if
16441646
16451647 ! Deallocating CBC Coefficients in y-direction
1646- if (n > 0 .and. any((/bc_y%beg, bc_y%end/) <= -5) .and. &
1647- any((/bc_y%beg, bc_y%end/) >= -13 .and. bc_y%beg /= -14)) then
1648- @:DEALLOCATE(fd_coef_y)
1649- if (weno_order > 1 .or. muscl_order > 1) then
1650- @:DEALLOCATE(pi_coef_y)
1648+ if (n > 0) then
1649+ if (all((/bc_y%beg, bc_y%end/) <= -5) .and. all((/bc_y%beg, bc_y%end/) >= -13) .or. &
1650+ bc_y%beg <= -5 .and. bc_y%beg >= -13 .or. &
1651+ bc_y%end <= -5 .and. bc_y%end >= -13) then
1652+ @:DEALLOCATE(fd_coef_y)
1653+ if (weno_order > 1) then
1654+ @:DEALLOCATE(pi_coef_y)
1655+ end if
16511656 end if
16521657 end if
16531658
16541659 ! Deallocating CBC Coefficients in z-direction
1655- if (p > 0 .and. any((/bc_z%beg, bc_z%end/) <= -5) .and. any((/bc_z%beg, bc_z%end/) >= -13)) then
1656- @:DEALLOCATE(fd_coef_z)
1657- if (weno_order > 1 .or. muscl_order > 1) then
1658- @:DEALLOCATE(pi_coef_z)
1660+ if (p > 0) then
1661+ if (all((/bc_z%beg, bc_z%end/) <= -5) .and. all((/bc_z%beg, bc_z%end/) >= -13) .or. &
1662+ bc_z%beg <= -5 .and. bc_z%beg >= -13 .or. &
1663+ bc_z%end <= -5 .and. bc_z%end >= -13) then
1664+ @:DEALLOCATE(fd_coef_z)
1665+ if (weno_order > 1) then
1666+ @:DEALLOCATE(pi_coef_z)
1667+ end if
16591668 end if
16601669 end if
16611670
0 commit comments