2D AMRCLAW
Functions/Subroutines
auxcoarsen.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine auxcoarsen (auxdub, midub, mjdub, auxbgc, mi2tot, mj2tot, naux, auxtype)
 

Function/Subroutine Documentation

◆ auxcoarsen()

subroutine auxcoarsen ( dimension(naux,midub, mjdub)  auxdub,
  midub,
  mjdub,
dimension(naux,mi2tot,mj2tot)  auxbgc,
  mi2tot,
  mj2tot,
  naux,
character*10, dimension(naux)  auxtype 
)

Coarsen the fine grid auxiliary data (with double the usual number of ghost cells to prepare coarsened data for error estimation).

Definition at line 6 of file auxcoarsen.f.

Referenced by prepbigstep().

6 
7  implicit double precision (a-h, o-z)
8 
9  dimension auxdub(naux,midub, mjdub)
10  dimension auxbgc(naux,mi2tot,mj2tot)
11  character*10 auxtype(naux)
12 
13 c :::::::::::::::::::::::: coarsen ::::::::::::::::::::::::::::::::
17 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
18 
19  do 50 iaux = 1, naux
20 
21  if (auxtype(iaux) .eq. "center" .or.
22  . auxtype(iaux) .eq. "capacity") then
23  do 20 j = 1, mj2tot
24  jfine = 2*(j-1) + 1
25  do 20 i = 1, mi2tot
26  ifine = 2*(i-1) + 1
27  auxbgc(iaux,i,j) = (auxdub(iaux,ifine,jfine) +
28  & auxdub(iaux,ifine+1,jfine)+
29  & auxdub(iaux,ifine,jfine+1) +
30  & auxdub(iaux,ifine+1,jfine+1))/4.d0
31 20 continue
32 
33  elseif (auxtype(iaux) .eq. "xleft") then
34  do 10 j = 1, mj2tot
35  jfine = 2*(j-1) + 1
36  do 10 i = 1, mi2tot
37  ifine = 2*(i-1) + 1
38  auxbgc(iaux,i,j) = (auxdub(iaux,ifine,jfine) +
39  & auxdub(iaux,ifine,jfine+1)) /2.d0
40 10 continue
41 
42  elseif (auxtype(iaux) .eq. "yleft") then
43  do 15 j = 1, mj2tot
44  jfine = 2*(j-1) + 1
45  do 15 i = 1, mi2tot
46  ifine = 2*(i-1) + 1
47  auxbgc(iaux,i,j) = (auxdub(iaux,ifine,jfine) +
48  & auxdub(iaux,ifine+1,jfine))/2.d0
49 15 continue
50 
51  endif
52 
53 50 continue
54 
55  return
subroutine coarsen(valdub, midub, mjdub, valbgc, mi2tot, mj2tot, nvar)
Definition: coarsen.f:5
character(len=10), dimension(:), allocatable auxtype
Definition: amr_module.f90:252
Here is the caller graph for this function: