Skip to content
Snippets Groups Projects
Commit 017ef7b3 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 18/02/2019: Correction boundary REST_KHALIL

parent 39e5dedf
No related branches found
No related tags found
No related merge requests found
......@@ -426,9 +426,10 @@ contains
type(scalar3d), intent(in) :: phifine
type(scalar3d), intent(inout) :: phicoarse
integer :: ix,iy,iz
integer :: ix_min, ix_max, iy_min, iy_max
integer :: ix_min, ix_max, iy_min, iy_max, n
real(kind=rl) :: xn,xs,xw,xe
n = phicoarse%grid_param%n
ix_min = phicoarse%icompx_min
ix_max = phicoarse%icompx_max
iy_min = phicoarse%icompy_min
......@@ -447,18 +448,17 @@ contains
end do
end do
end do
elseif(mg_param%restriction == REST_KHALIL) then
! Do not coarsen in z-direction
elseif(mg_param%restriction == REST_KHALIL) then
do ix=ix_min,ix_max
xw=1.0
xe=1.0
if (ix==phicoarse%ix_min) xw=0.0
if (ix==phicoarse%ix_max) xe=0.0
if (ix==1) xw=0.0
if (ix==n) xe=0.0
do iy=iy_min,iy_max
xs=1.0
xn=1.0
if (iy==phicoarse%iy_min) xs=0.0
if (iy==phicoarse%iy_max) xn=0.0
if (iy==1) xs=0.0
if (iy==n) xn=0.0
do iz=1,phicoarse%grid_param%nz
phicoarse%s(iz,iy,ix) = 0.25_rl * ( &
phifine%s(iz,2*iy+1,2*ix-1) * xn + &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment