Blockstructured Adaptive Mesh Refinement in object-oriented C++
c c ========================================================== subroutine flg1eu(q,mx,lb,ub,qf,mxo,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, mxo dimension q(meqn,mx), qf(mxo) c integer lb(1), ub(1), lbo(1), ubo(1), lbr(1), ubr(1), shaper(1), & mresult, stride, imin(1), imax(1), i, getindx, d c stride = (ub(1) - lb(1))/(mx-1) imin(1) = max(lb(1), lbr(1)) imax(1) = min(ub(1), ubr(1)) if (mod(imin(1)-lb(1),stride) .ne. 0) then imin(1) = imin(1) + stride - mod(imin(1)-lb(1),stride) endif imin(1) = getindx(imin(1), lb(1), stride) if (mod(imax(1)-lb(1),stride) .ne. 0) then imax(1) = imax(1) - mod(imax(1)-lb(1),stride) endif imax(1) = getindx(imax(1), lb(1), stride) c do 10 i = imin(1), imax(1) c Compute pressure qf(i) = 0.d0 if (mcomp.eq.1) qf(i) = gamma1*(q(3,i) - & 0.5d0*q(2,i)**2/q(1,i)) 10 continue return end
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04