2D AMRCLAW
Functions/Subroutines
cstore.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cstore (qc, nrow, ncol, nvar, qc1d, lenbc, naux, auxc, auxc1d)
 

Function/Subroutine Documentation

◆ cstore()

subroutine cstore ( dimension(nvar,nrow,ncol)  qc,
  nrow,
  ncol,
  nvar,
dimension(nvar,lenbc)  qc1d,
  lenbc,
  naux,
dimension(naux,nrow,ncol)  auxc,
dimension(naux,lenbc)  auxc1d 
)

store coarse perimeter worth of solution into 1d array.

Definition at line 5 of file cstore.f.

Referenced by saveqc().

5 
6  implicit double precision (a-h, o-z)
7 
8  dimension qc(nvar,nrow,ncol)
9  dimension qc1d(nvar,lenbc)
10  dimension auxc(naux,nrow,ncol)
11  dimension auxc1d(naux,lenbc)
12 c
14 c go around fine grid in following order
15 c 2
16 c __________
17 c 1 | | 3
18 c __________
19 c 4
20 c
21 c save first interior cell of enlarged grid corresponding to
22 c fine grid bordering cell. note that since fine grid is smaller,
23 c the cell is one in. coarse(temporary) grid has no ghost cells
24 
25 c side 1
26  index = 0
27  do 10 j = 2, ncol-1
28  index = index + 1
29  do 5 ivar = 1, nvar
30  5 qc1d(ivar,index) = qc(ivar,1,j)
31  do 6 iaux = 1, naux
32  6 auxc1d(iaux,index) = auxc(iaux,1,j)
33  10 continue
34 
35 c side 2
36  do 20 i = 2, nrow-1
37  index = index + 1
38  do 15 ivar = 1, nvar
39  15 qc1d(ivar,index) = qc(ivar,i,ncol)
40  do 16 iaux = 1, naux
41  16 auxc1d(iaux,index) = auxc(iaux,i,ncol)
42  20 continue
43 
44 c side 3
45  do 30 j = 2, ncol-1
46  index = index + 1
47  do 25 ivar = 1, nvar
48  25 qc1d(ivar,index) = qc(ivar,nrow,j)
49  do 26 iaux = 1, naux
50  26 auxc1d(iaux,index) = auxc(iaux,nrow,j)
51  30 continue
52 
53 c side 4
54  do 40 i = 2, nrow-1
55  index = index + 1
56  do 35 ivar = 1, nvar
57  35 qc1d(ivar,index) = qc(ivar,i,1)
58  do 36 iaux = 1, naux
59  36 auxc1d(iaux,index) = auxc(iaux,i,1)
60  40 continue
61 
62  return
Here is the caller graph for this function: