Skip to content

Commit

Permalink
Merge pull request #316 from xcompact3d/fix_ibm3
Browse files Browse the repository at this point in the history
fix bug #294 (ibm out of memory problem with iibm=3)
  • Loading branch information
slaizet authored Nov 19, 2024
2 parents 14ebbad + 197f56c commit cd1f8d6
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions src/ibm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ subroutine cubsplx(u,lind)
USE decomp_2d
USE variables
USE ibm_param
USE decomp_2d_mpi, only : decomp_2d_abort
!
implicit none
!
Expand Down Expand Up @@ -521,7 +522,8 @@ subroutine cubsplx(u,lind)
endif
! Special Case
if (xi(i,j,k).eq.xf(i,j,k)) then
u(ipol,j,k)=bcimp
call decomp_2d_abort(1, "!! situation not supported by the IBM !!")
!u(ipol,j,k)=bcimp
else
! Cubic Spline Reconstruction
na=ia
Expand Down Expand Up @@ -561,6 +563,7 @@ subroutine cubsply(u,lind)
USE decomp_2d
USE variables
USE ibm_param
USE decomp_2d_mpi, only : decomp_2d_abort
!
implicit none
!
Expand Down Expand Up @@ -688,7 +691,8 @@ subroutine cubsply(u,lind)
endif
! Special Case
if (yi(j,i,k).eq.yf(j,i,k)) then
u(i,jpol,k)=bcimp
call decomp_2d_abort(1, "!! situation not supported by the IBM !!")
!u(i,jpol,k)=bcimp
else
!calcul du polynôme
na=ia
Expand Down Expand Up @@ -724,6 +728,7 @@ subroutine cubsplz(u,lind)
USE decomp_2d
USE variables
USE ibm_param
USE decomp_2d_mpi, only : decomp_2d_abort
!
implicit none
!
Expand Down Expand Up @@ -837,28 +842,29 @@ subroutine cubsplz(u,lind)
endif
enddo
endif
! ! Special Case
! if (zi(k,i,j).eq.zf(k,i,j)) then
! u(i,j,kpol)=bcimp
! else
! Special Case
if (zi(k,i,j).eq.zf(k,i,j)) then
!u(i,j,kpol)=bcimp
call decomp_2d_abort(1, "!! situation not supported by the IBM !!")
else
! Cubic Spline Reconstruction
na=ia
do kpol=kpoli,kpolf
na=ia
do kpol=kpoli,kpolf
! Special Case
if (zi(k,i,j).eq.zf(k,i,j)) then
u(i,j,kpol)=bcimp
else
if ((inxf.eq.1).and.(inxi.eq.1)) then ! If the Body Extends from the Front to the Back (Special Case)
u(i,j,kpol)=bcimp
else
xpol=dz*(kpol-1)
call cubic_spline(xa,ya,na,xpol,ypol)
u(i,j,kpol)=ypol
if (zi(k,i,j).eq.zf(k,i,j)) then
u(i,j,kpol)=bcimp
else
if ((inxf.eq.1).and.(inxi.eq.1)) then ! If the Body Extends from the Front to the Back (Special Case)
u(i,j,kpol)=bcimp
else
xpol=dz*(kpol-1)
call cubic_spline(xa,ya,na,xpol,ypol)
u(i,j,kpol)=ypol
endif
endif
endif
enddo
ia=0
! endif
enddo
ia=0
endif
enddo
endif
enddo
Expand Down

0 comments on commit cd1f8d6

Please sign in to comment.