subroutine paraset( para, dx, xa, nmin, nmax, ngeom ) C C Colella and Woodward, JCompPhys 54, 174-201 (1984) eq 1.6, 1.7 C C paraset sets up constants which are re-used each time we want to C interpolate a parabola on a quantity. First pull out constants C A, B, and C, and then compute all the equations in terms of those C quantities. C C the quantities calculated here are stored in a array para, C to be read by parabola() C include 'sweepsize.h' C real para( 9, maxsweep ) real dx(maxsweep), xa(maxsweep) C real a(maxsweep), b(maxsweep), c(maxsweep), d(maxsweep) real ai(maxsweep), bi(maxsweep), ci(maxsweep) integer n, nmin, nmax, ngeom C C------------------------------------------------------------------------------ C A = dX_j + dX_j+1 C B = 2dX_j + dX_j+1 C C = dX_j + 2dX_j+1 C C ai, bi, and ci are inverse quantities do 100 n = nmin-2, nmax+1 a(n) = dx(n) + dx(n+1) ai(n) = 1./a(n) b(n) = a(n) + dx(n) bi(n) = 1./b(n) c(n) = a(n) + dx(n+1) ci(n) = 1./c(n) 100 continue C C constants for equation 1.6 C a(j+.5) = a(j) + C1 * (a(j+1)-a(j)) + C2 * da(j+1) + C3 * da(j) C do 200 n = nmin-1, nmax d(n) = 1. / (a(n-1) + a(n+1)) para(1,n) = dx(n) * ai(n) + 2. * dx(n+1) * dx(n) * & d(n) * ai(n) * ( a(n-1) * bi(n) - a(n+1) * ci(n) ) para(2,n) = - d(n) * dx(n) * a(n-1) * bi(n) para(3,n) = d(n) * dx(n+1) * a(n+1) * ci(n) 200 continue C C constants for equation 1.7 C da(j) = D1 * (a(j+1) - a(j)) + D2 * (a(j) - a(j-1)) C do 300 n = nmin-1, nmax+1 d(n) = dx(n) / ( a(n-1) + dx(n+1) ) para(4,n) = d(n) * b(n-1) * ai(n) para(5,n) = d(n) * c(n) * ai(n-1) 300 continue C return end