USER_PROBLEM: Fix conditions for boundary fluxes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2022-11-05 18:48:36 -03:00
parent 0f8aed46a1
commit b49deb3b71

View File

@ -695,7 +695,7 @@ module user_problem
if (.not. periodic(2)) then
if (pmeta%ymin < ymin) then
if (pmeta%ymin - dh(2) < ymin) then
#if NDIMS == 3
vv(1,:) = 5.0d-01 * sum(pdata%q(ivx,i,nbm:nb,nb:ne), 1)
@ -735,7 +735,7 @@ module user_problem
end if ! resistivity
end if
if (ymax < pmeta%ymax) then
if (pmeta%ymax + dh(2) > ymax) then
#if NDIMS == 3
vv(1,:) = 5.0d-01 * sum(pdata%q(ivx,i,ne:nep,nb:ne), 1)
@ -779,7 +779,7 @@ module user_problem
#if NDIMS == 3
if (.not. periodic(3)) then
if (pmeta%zmin < zmin) then
if (pmeta%zmin - dh(3) < zmin) then
vv(1,:) = 5.0d-01 * sum(pdata%q(ivx,i,nb:ne,nbm:nb), 1)
vv(3,:) = 5.0d-01 * sum(pdata%q(ivz,i,nb:ne,nbm:nb), 1)
@ -807,7 +807,7 @@ module user_problem
end if ! resistivity
end if
if (pmeta%zmax > zmax) then
if (pmeta%zmax + dh(3) > zmax) then
vv(1,:) = 5.0d-01 * sum(pdata%q(ivx,i,nb:ne,ne:nep), 1)
vv(3,:) = 5.0d-01 * sum(pdata%q(ivz,i,nb:ne,ne:nep), 1)