From: txdong <txdong@sc...>  20090216 07:34:16

Thanks a lot to many nice people.Last question about idest is totally clarifed. Yet, there is another place which I am not clear about, and even suspect a bug. In "How to Construct a Routine to Advance the Solution" of the User Guide, the codes are as following: Guardcell Strategy I (Permanent Guard cells) ........................ ! Integrate forward through a full timestep ! loop over leaf blocks on this processor if(lnblocks.gt.0) then do lb=1,lnblocks if(nodetype(lb).eq.1) then ! copy solution data for this block from amr datastructure to user's local ! variables rho(:,:,:) = unk(1,:,:,:,lb) vx(:,:,:) = unk(2,:,:,:,lb) vy(:,:,:) = unk(3,:,:,:,lb) vz(:,:,:) = unk(4,:,:,:,lb) ener(:,:,:) = unk(5,:,:,:,lb) ! Compute required source terms on this block call source(src,rho,vx,vy,vz,ener) ! Restore original solution unk(1,:,:,:,lb) = t_unk(1,:,:,:,lb) unk(2,:,:,:,lb) = t_unk(2,:,:,:,lb) unk(3,:,:,:,lb) = t_unk(3,:,:,:,lb) unk(4,:,:,:,lb) = t_unk(4,:,:,:,lb) unk(5,:,:,:,lb) = t_unk(5,:,:,:,lb) ! Advance the solution on this block through dt/2 call advance(dt,rho,vx,vy,vz,ener, & xfluxes,yfluxes,zfluxes,src) ! Capture fluxes at block boundaries flux_x(:,1,:,:,lb) = xfluxes(:,nguard,:,:) flux_x(:,2,:,:,lb) = xfluxes(:,nxb+nguard+1,:,:) flux_y(:,:,1,:,lb) = yfluxes(:,:,nguard,:) flux_y(:,:,2,:,lb) = yfluxes(:,:,nyb+nguard+1,:) flux_z(:,:,:,1,lb) = zfluxes(:,:,:,nguard) flux_z(:,:,:,2,lb) = zfluxes(:,:,:,nzb+nguard+1) endif enddo endif in the above,by unk(1,:,:,:,lb) = t_unk(1,:,:,:,lb), only unk is restored to beginning time values,but not rho,etc,,which are used by subrountine advance. Therefore, I think rho=unk should be inserted between unk=t_unk and call advance. I was wondering if anyone would be kind enough to propose a reasonable explanation to me. Any contributions will be greatly cherished. Tingxing Dong Super Computing Center Computer Network Information Center Chinese Academy of Sciences No. 4 South 4th Street, ZhongGuanCun Beijing, China Postal code: 100190 Email: txdong@... 