~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/global/examples/boltzmann/equil.F

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if HAVE_CONFIG_H
 
2
#   include "config.fh"
 
3
#endif
 
4
      subroutine equil(g_fg,  fg,  ld_fg1,  ld_fg2,
 
5
     +                 g_fld, fld, ld_fld1, ld_fld2,
 
6
     +                 g_bc,  bc,  ld_bc1)
 
7
#include "common"
 
8
c
 
9
      integer ld_fg1, ld_fg2, ld_fld1, ld_fld2, ld_bc1
 
10
      double precision fg(ld_fg1,ld_fg2, *)
 
11
      double precision fld(ld_fld1, ld_fld2, *)
 
12
      integer bc(ld_bc1, *)
 
13
      integer g_fg, g_fld, g_bc 
 
14
c
 
15
      double precision rdim, b, c2, cspdi, cspd2, ex, ey
 
16
      double precision aa0, aa
 
17
      integer i, j, ii, jj
 
18
c
 
19
c   This subroutine evaluates the equilibrium distribution
 
20
c
 
21
      rdim = 4.0d00
 
22
      b = 24.0d00
 
23
      c2 = cspd**2
 
24
      cspdi = sqrt(2.0d00)/cspd
 
25
      cspd2 = 1.0d00/cspdi
 
26
c
 
27
c   Calculate equilibrium distributions
 
28
c
 
29
      do jj = width(2) + 1, dims(2) - width(2)
 
30
        do i = 10, 18
 
31
          j = i-9
 
32
          if (j.ne.1) then
 
33
            ex = cspd2*ei(j-1,1)
 
34
            ey = cspd2*ei(j-1,2)
 
35
          else
 
36
            ex = 0.0d00
 
37
            ey = 0.0d00
 
38
          endif
 
39
          do ii = width(1) + 1, dims(1) - width(1)
 
40
            aa = (rdim/(b*c2))*fld(ii,jj,4)
 
41
            aa0 = fld(ii,jj,1) - b*aa
 
42
            if (j.eq.1) then
 
43
              ffa(j) = aa0 + 4.0d00*aa
 
44
            else if (j.le.5) then
 
45
              ffa(j) = 4.0d00*aa
 
46
            else
 
47
              ffa(j) = aa
 
48
            endif
 
49
c
 
50
c   evaluate distribution
 
51
c
 
52
            fg(ii,jj,i) = ffa(j) + fld(ii,jj,1)*(ffb(j)*(fld(ii,jj,2)*ex
 
53
     +                  + fld(ii,jj,3)*ey)
 
54
     +                  + ffc(j)*(fld(ii,jj,2)**2*ex**2
 
55
     +                  + 2.0d00*fld(ii,jj,2)*fld(ii,jj,3)*ex*ey
 
56
     +                  + fld(ii,jj,3)**2*ey**2)
 
57
     +                  + ffd(j)*(fld(ii,jj,2)**2+fld(ii,jj,3)**2))
 
58
          end do
 
59
        end do
 
60
      end do
 
61
c
 
62
      return
 
63
      end