1 | |
---|
2 | ! |
---|
3 | ! This program may be freely redistributed under the |
---|
4 | ! condition that the copyright notices (including this |
---|
5 | ! entire header) are not removed, and no compensation |
---|
6 | ! is received through use of the software. Private, |
---|
7 | ! research, and institutional use is free. You may |
---|
8 | ! distribute modified versions of this code UNDER THE |
---|
9 | ! CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE |
---|
10 | ! TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE |
---|
11 | ! ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE |
---|
12 | ! MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR |
---|
13 | ! NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution |
---|
14 | ! of this code as part of a commercial system is |
---|
15 | ! permissible ONLY BY DIRECT ARRANGEMENT WITH THE |
---|
16 | ! AUTHOR. (If you are not directly supplying this |
---|
17 | ! code to a customer, and you are instead telling them |
---|
18 | ! how they can obtain it for free, then you are not |
---|
19 | ! required to make any arrangement with me.) |
---|
20 | ! |
---|
21 | ! Disclaimer: Neither I nor: Columbia University, the |
---|
22 | ! National Aeronautics and Space Administration, nor |
---|
23 | ! the Massachusetts Institute of Technology warrant |
---|
24 | ! or certify this code in any way whatsoever. This |
---|
25 | ! code is provided "as-is" to be used at your own risk. |
---|
26 | ! |
---|
27 | ! |
---|
28 | |
---|
29 | ! |
---|
30 | ! PCM.h90: 1d piecewise constant reconstruction . |
---|
31 | ! |
---|
32 | ! Darren Engwirda |
---|
33 | ! 08-Sep-2016 |
---|
34 | ! de2363 [at] columbia [dot] edu |
---|
35 | ! |
---|
36 | ! |
---|
37 | |
---|
38 | pure subroutine pcm(npos,nvar,ndof,fdat, & |
---|
39 | & fhat) |
---|
40 | |
---|
41 | ! |
---|
42 | ! NPOS no. edges over grid. |
---|
43 | ! NVAR no. state variables. |
---|
44 | ! NDOF no. degrees-of-freedom per grid-cell . |
---|
45 | ! FDAT grid-cell moments array. FDAT is an array with |
---|
46 | ! SIZE = NDOF-by-NVAR-by-NPOS-1 . |
---|
47 | ! FHAT grid-cell re-con. array. FHAT is an array with |
---|
48 | ! SIZE = MDOF-by-NVAR-by-NPOS-1 . |
---|
49 | ! |
---|
50 | |
---|
51 | implicit none |
---|
52 | |
---|
53 | !------------------------------------------- arguments ! |
---|
54 | integer, intent( in) :: npos,nvar,ndof |
---|
55 | real*8 , intent(out) :: fhat(:,:,:) |
---|
56 | real*8 , intent( in) :: fdat(:,:,:) |
---|
57 | |
---|
58 | !------------------------------------------- variables ! |
---|
59 | integer:: ipos,ivar,idof |
---|
60 | |
---|
61 | do ipos = +1, npos - 1 |
---|
62 | do ivar = +1, nvar + 0 |
---|
63 | do idof = +1, ndof + 0 |
---|
64 | |
---|
65 | fhat(idof,ivar,ipos) = fdat(idof,ivar,ipos) |
---|
66 | |
---|
67 | end do |
---|
68 | end do |
---|
69 | end do |
---|
70 | |
---|
71 | return |
---|
72 | |
---|
73 | end subroutine |
---|
74 | |
---|
75 | |
---|
76 | |
---|