Statistics
| Branch: | Revision:

root / synthbench / euroben-dm / mod2f / datgen.f @ 0:839f52ef7657

History | View | Annotate | Download (1 kB)

1
      Subroutine datgen( arr, ari, m, n )
2
! ----------------------------------------------------------------------
3
! --- Routine 'datgen' generates the test data for the FFT:
4
!     one complete cosine cycle in the Real part of the data.
5
!     Zero in the imaginary part of the data.
6
! ----------------------------------------------------------------------
7
      Use              mpi_module
8
      Use              numerics
9
      Integer       :: m, n
10
      Real(l_)      :: arr(0:m-1,0:n-1), ari(0:m-1,0:n-1)
11

    
12
      Integer       :: nbase, nc
13
      Real(l_)      :: arg, fac
14
! ----------------------------------------------------------------------
15
      nc    = n*nodes
16
      fac   = 8.0_l_*Atan( 1.0_l_ )/( 1.0_l_*m*nc )
17
      nbase = me*n
18
      
19
      Do i = 0, n - 1
20
         Do j = 0, m - 1
21
            arg      = ( j*nc + nbase + i )*fac
22
            arr(j,i) = Cos( arg )
23
            ari(j,i) = 0.0_l_
24
         End Do
25
      End Do
26
! ----------------------------------------------------------------------
27
      End Subroutine datgen