From 2fed2ab5ecc633aa287d3143be040c15a9e33353 Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Thu, 21 Sep 2023 13:59:21 +0200 Subject: [PATCH] src/gray_core.f90: remove unused variables in rhs --- src/gray_core.f90 | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/gray_core.f90 b/src/gray_core.f90 index b7ef3b8..93009a7 100644 --- a/src/gray_core.f90 +++ b/src/gray_core.f90 @@ -979,38 +979,33 @@ contains integer, intent(in) :: igrad,sox real(wp_), dimension(6) :: yy,fk1,fk2,fk3,fk4 - real(wp_) :: gr2 - real(wp_), dimension(3) :: dgr2 - - gr2 = dot_product(dgr, dgr) - dgr2 = 2 * matmul(ddgr, dgr) - fk1 = yp + fk1 = yp yy = y + fk1*hh - call rhs(sox,bres,xgcn,yy,gr2,dgr2,dgr,ddgr,fk2,igrad) + call rhs(sox,bres,xgcn,yy,dgr,ddgr,fk2,igrad) yy = y + fk2*hh - call rhs(sox,bres,xgcn,yy,gr2,dgr2,dgr,ddgr,fk3,igrad) + call rhs(sox,bres,xgcn,yy,dgr,ddgr,fk3,igrad) yy = y + fk3*h - call rhs(sox,bres,xgcn,yy,gr2,dgr2,dgr,ddgr,fk4,igrad) + call rhs(sox,bres,xgcn,yy,dgr,ddgr,fk4,igrad) y = y + h6*(fk1 + 2*fk2 + 2*fk3 + fk4) end subroutine rkstep - subroutine rhs(sox,bres,xgcn,y,gr2,dgr2,dgr,ddgr,dery,igrad) + subroutine rhs(sox,bres,xgcn,y,dgr,ddgr,dery,igrad) ! Compute right-hand side terms of the ray equations (dery) ! used in R-K integrator implicit none ! arguments real(wp_), dimension(6), intent(in) :: y - real(wp_), intent(in) :: bres,xgcn,gr2 - real(wp_), dimension(3), intent(in) :: dgr2,dgr + real(wp_), intent(in) :: bres,xgcn + real(wp_), dimension(3), intent(in) :: dgr real(wp_), dimension(3,3), intent(in) :: ddgr real(wp_), dimension(6), intent(out) :: dery integer, intent(in) :: igrad,sox ! local variables - real(wp_) :: psinv,dens,btot,xg,yg + real(wp_) :: dens,btot,xg,yg real(wp_), dimension(3) :: xv,anv,bv,derxg,deryg real(wp_), dimension(3,3) :: derbv