Skip to content

Commit

Permalink
Fix for #37 - momentum advection in advec_5th and advec_52 routines
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Jansson authored and fjansson committed Sep 11, 2018
1 parent e6e2f27 commit c1ac043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/advec_52.f90
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ subroutine advecv_52(putin, putout)
+(&
(v0(i,j+1,k)+v0(i,j,k))/60.&
*(37.*(putin(i,j+1,k)+putin(i,j,k))-8.*(putin(i,j+2,k)+putin(i,j-1,k))+(putin(i,j+3,k)+putin(i,j-2,k)))&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j+1,k))/60.&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j,k))/60.&
*(10.*(putin(i,j+1,k)-putin(i,j,k))-5.*(putin(i,j+2,k)-putin(i,j-1,k))+(putin(i,j+3,k)-putin(i,j-2,k)))&
-(v0(i,j,k)+v0(i,j-1,k))/60.&
*(37.*(putin(i,j,k)+putin(i,j-1,k))-8.*(putin(i,j+1,k)+putin(i,j-2,k))+(putin(i,j+2,k)+putin(i,j-3,k)))&
Expand Down
4 changes: 2 additions & 2 deletions src/advec_5th.f90
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ subroutine advecv_5th(putin, putout)
+(&
(v0(i,j+1,k)+v0(i,j,k))/60.&
*(37.*(putin(i,j+1,k)+putin(i,j,k))-8.*(putin(i,j+2,k)+putin(i,j-1,k))+(putin(i,j+3,k)+putin(i,j-2,k)))&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j+1,k))/60.&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j,k))/60.&
*(10.*(putin(i,j+1,k)-putin(i,j,k))-5.*(putin(i,j+2,k)-putin(i,j-1,k))+(putin(i,j+3,k)-putin(i,j-2,k)))&
-(v0(i,j,k)+v0(i,j-1,k))/60.&
*(37.*(putin(i,j,k)+putin(i,j-1,k))-8.*(putin(i,j+1,k)+putin(i,j-2,k))+(putin(i,j+2,k)+putin(i,j-3,k)))&
Expand Down Expand Up @@ -567,7 +567,7 @@ subroutine advecv_5th(putin, putout)
+(&
(v0(i,j+1,k)+v0(i,j,k))/60.&
*(37.*(putin(i,j+1,k)+putin(i,j,k))-8.*(putin(i,j+2,k)+putin(i,j-1,k))+(putin(i,j+3,k)+putin(i,j-2,k)))&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j+1,k))/60.&
-sign(1.,(v0(i,j+1,k)+v0(i,j,k)))*(v0(i,j+1,k)+v0(i,j,k))/60.&
*(10.*(putin(i,j+1,k)-putin(i,j,k))-5.*(putin(i,j+2,k)-putin(i,j-1,k))+(putin(i,j+3,k)-putin(i,j-2,k)))&
-(v0(i,j,k)+v0(i,j-1,k))/60.&
*(37.*(putin(i,j,k)+putin(i,j-1,k))-8.*(putin(i,j+1,k)+putin(i,j-2,k))+(putin(i,j+2,k)+putin(i,j-3,k)))&
Expand Down

0 comments on commit c1ac043

Please sign in to comment.