subroutine recos_qR(q_i, q_ip1, q_ip2, & r_i, r_ip1, r_ip2, & rqR_iph ) c------------------------------------------------------------ c Calculates the reconstructed variables c from the RIGHT using a minmod slope limiter. c Note that the input coordinates are the coordinates c of the cell centres (x_(i), x_(i+1) and x_(i+2)), c the output is at the cell boundary x_(i+1/2). c------------------------------------------------------------ implicit none character*8 cdnm parameter ( cdnm = 'recos_qR' ) logical ltrace parameter ( ltrace = .false. ) real*8 q_i, q_ip1, q_ip2 real*8 r_i, r_ip1, r_ip2 real*8 rqR_iph real*8 s_iph, s_ip3h real*8 sigma_ip1 real*8 minmod c============================================================ c============================================================ if ( ltrace ) then write(0,*) cdnm,': q_i=', q_i write(0,*) cdnm,': q_ip1=', q_ip1 write(0,*) cdnm,': q_ip2=', q_ip2 write(0,*) cdnm,': ' write(0,*) cdnm,': r_i=', r_i write(0,*) cdnm,': r_ip1=', r_ip1 write(0,*) cdnm,': r_ip2=', r_ip2 write(0,*) cdnm,': ' endif s_iph = (q_ip1 - q_i) / (r_ip1 - r_i) s_ip3h = (q_ip2 - q_ip1) / (r_ip2 - r_ip1) sigma_ip1 = minmod(s_iph, s_ip3h) rqR_iph = q_ip1 + sigma_ip1 * 0.5d0 * (r_i - r_ip1) if ( ltrace ) then write(0,*) cdnm,': rqR_iph=', rqR_iph endif return end