2D AMRCLAW
coarsen.f
Go to the documentation of this file.
1 c
2 c ---------------------------------------------------
3 c
4  subroutine coarsen(valdub,midub,mjdub,valbgc,mi2tot,mj2tot,nvar)
5 
6  implicit double precision (a-h, o-z)
7 
8  dimension valdub(nvar,midub, mjdub)
9  dimension valbgc(nvar,mi2tot,mj2tot)
10 
11 c :::::::::::::::::::::::: COARSEN ::::::::::::::::::::::::::::::::
15 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
16 
17  do 10 j = 1, mj2tot
18 
19  jfine = 2*(j-1) + 1
20 
21  do 10 i = 1, mi2tot
22  ifine = 2*(i-1) + 1
23 
24  do 10 ivar = 1, nvar
25 
26  valbgc(ivar,i,j) = (valdub(ivar,ifine,jfine) +
27  & valdub(ivar,ifine+1,jfine)+
28  & valdub(ivar,ifine,jfine+1) +
29  & valdub(ivar,ifine+1,jfine+1))/4.d0
30 10 continue
31 
32  return
33  end
subroutine coarsen(valdub, midub, mjdub, valbgc, mi2tot, mj2tot, nvar)
Definition: coarsen.f:5