Blockstructured Adaptive Mesh Refinement in object-oriented C++
!----------------------------------------------------------------------- ! Physical boundary conditions ! Interface: ! mx,my := shape of grid function ! ! u(,) := grid function ! ! lb(2) := lower bound for grid ! ub(2) := upper bound for grid ! lbbnd(2) := lower bound for boundary region ! ubnd(2) := upper bound for boundary region ! shapebnd(2) := shape of boundary region ! xc(2) := lower left corner of grid ! dx(2) := grid spacing ! dir := at which side of the grid is the boundary? ! bnd(,2,2) := lower left and upper right corner of global grid and ! of mb-1 internal boundary regions !----------------------------------------------------------------------- subroutine physbd(u,mx,my,lb,ub,lbbnd,ubbnd,shapebnd, & xc,dx,dir,bnd,mb,time,args,argc) implicit double precision (a-h,o-z) include "cuser.i" integer argc, args, mx, my, mb, dir integer lb(2), ub(2), lbbnd(2), ubbnd(2), shapebnd(2) real*8 u(args, mx, my), xc(2), dx(2), bnd(mb,2,2), time ! Local variables integer i, j, imin, imax, jmin, jmax, jsym integer stride, stridebnd, meqn, getindx meqn = args !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! See definition of member-function extents() in BBox.h ! for calculation of stride stride = (ub(1) - lb(1))/(mx-1) if (meqn .ne. 4) then write(0,*)'ERROR in physbd: ' else !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Find working domain imin = getindx(max(lbbnd(1), lb(1)), lb(1), stride) imax = getindx(min(ubbnd(1), ub(1)), lb(1), stride) jmin = getindx(max(lbbnd(2), lb(2)), lb(2), stride) jmax = getindx(min(ubbnd(2), ub(2)), lb(2), stride) if(imax .gt. mx .or. jmax .gt. my .or. & imin .lt. 1 .or. jmin .lt. 1) then write(0,*)'INDEX ERROR in physbd' end if ! Left Side --- periodic !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (dir.eq.0) then return end if ! Right Side --- periodic !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (dir.eq.1) then return end if ! Bottom Side --- periodic !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (dir.eq.2) then return end if ! Top Side --- periodic !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (dir.eq.3) then return end if end if return end
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04