~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

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 properties(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
 
#include "mafdecls.fh"
16
 
#include "global.fh"
17
 
c
18
 
c  Evaluate properties on grid
19
 
c
20
 
      double precision cspd2, ex, ey, sum(3)
21
 
      double precision rho
22
 
      integer i, j, ii, jj
23
 
c
24
 
c  Zero accumulators and hydrodynamic fields
25
 
c
26
 
      rtot = 0.0d00
27
 
      uxtot = 0.0d00
28
 
      uytot = 0.0d00
29
 
      cspd2 = cspd/sqrt(2.0d00)
30
 
c
31
 
      do jj = width(2) + 1, dims(2) - width(2)
32
 
        do i = 1, 4
33
 
          do ii = width(1) + 1, dims(1) - width(1)
34
 
            fld(ii,jj,i) = 0.0d00
35
 
          end do
36
 
        end do
37
 
      end do
38
 
c
39
 
c   Evaluate density and momentum
40
 
c
41
 
      do jj = width(2) + 1, dims(2) - width(2)
42
 
        do i = 1, 9
43
 
          j = i - 1
44
 
          if (j.ne.0) then
45
 
            ex = cspd2*ei(j,1)
46
 
            ey = cspd2*ei(j,2)
47
 
          else
48
 
            ex = 0.0d00
49
 
            ey = 0.0d00
50
 
          endif
51
 
          do ii = width(1) + 1, dims(1) - width(1)
52
 
            fld(ii,jj,1) = fld(ii,jj,1) + fg(ii,jj,i)
53
 
            fld(ii,jj,2) = fld(ii,jj,2) + ex*fg(ii,jj,i)
54
 
            fld(ii,jj,3) = fld(ii,jj,3) + ey*fg(ii,jj,i)
55
 
          end do
56
 
        end do
57
 
      end do
58
 
c
59
 
c   Evaluate pressure and accumulate values
60
 
c
61
 
      do jj = width(2) + 1, dims(2) - width(2)
62
 
        do ii = width(1) + 1, dims(1) - width(1)
63
 
          fld(ii,jj,2) = fld(ii,jj,2)/fld(ii,jj,1)
64
 
          fld(ii,jj,3) = fld(ii,jj,3)/fld(ii,jj,1)
65
 
          rtot = rtot + fld(ii,jj,1)
66
 
c          if (bc(ii,jj).eq.1) then
67
 
c            fld(ii,jj,2) = 0.0d00
68
 
c            fld(ii,jj,3) = 0.0d00
69
 
c          elseif (bc(ii,jj).eq.2) then
70
 
c            fld(ii,jj,1) = rhobc
71
 
c            fld(ii,jj,2) = uxbc
72
 
c            fld(ii,jj,3) = 0.0d00
73
 
c          endif
74
 
          uxtot = uxtot + fld(ii,jj,1)*fld(ii,jj,2)
75
 
          uytot = uytot + fld(ii,jj,1)*fld(ii,jj,3)
76
 
          rho = fld(ii,jj,1)
77
 
          fld(ii,jj,4) = rho*rgas*tmprtr0/(1.0d00-b_vdw*rho)
78
 
     +                 - a_vdw*rho**2
79
 
        end do
80
 
      end do
81
 
c
82
 
c  Sum values across processors
83
 
c
84
 
      sum(1) = rtot
85
 
      sum(2) = uxtot
86
 
      sum(3) = uytot
87
 
c
88
 
      call ga_dgop(MT_DBL,sum,3,'+')
89
 
      rtot = sum(1)
90
 
      uxtot = sum(2)
91
 
      uytot = sum(3)
92
 
c
93
 
      return
94
 
      end