Blockstructured Adaptive Mesh Refinement in object-oriented C++
c c ========================================================== subroutine flg2eu(q,mx,my,lb,ub,qf,mxo,myo,lbo,ubo, & lbr,ubr,shaper,meqn,mcomp,dt) c ========================================================== c c # Computes the pressure from conserved variables as an c # adaption criterium. c c # Adaption based on pressure is often more intuitive. c implicit double precision(a-h,o-z) common /param/ gamma,gamma1 c integer meqn, mx, my, mxo, myo dimension q(meqn,mx,my), qf(mxo,myo) c integer lb(2), ub(2), lbo(2), ubo(2), lbr(2), ubr(2), shaper(2), & mresult, stride, imin(2), imax(2), i, getindx, d c stride = (ub(1) - lb(1))/(mx-1) do 5 d = 1, 2 imin(d) = max(lb(d), lbr(d)) imax(d) = min(ub(d), ubr(d)) if (mod(imin(d)-lb(d),stride) .ne. 0) then imin(d) = imin(d) + stride - mod(imin(d)-lb(d),stride) endif imin(d) = getindx(imin(d), lb(d), stride) if (mod(imax(d)-lb(d),stride) .ne. 0) then imax(d) = imax(d) - mod(imax(d)-lb(d),stride) endif imax(d) = getindx(imax(d), lb(d), stride) 5 continue do 10 i = imin(1), imax(1) do 10 j = imin(2), imax(2) c Compute pressure qf(i,j) = 0.d0 if (mcomp.eq.1) qf(i,j) = gamma1*(q(4,i,j) - & 0.5d0*(q(2,i,j)**2+q(3,i,j)**2)/q(1,i,j)) 10 continue return end
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04