ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/simulation_module.F90
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/simulation_module.F90 (file contents):
Revision 290 by chuckv, Thu Feb 27 21:25:47 2003 UTC vs.
Revision 309 by gezelter, Mon Mar 10 23:19:23 2003 UTC

# Line 10 | Line 10 | module simulation
10    PRIVATE
11  
12   #define __FORTRAN90
13 < #include "../headers/fsimulation.h"
13 > #include "fSimulation.h"
14  
15    type (simtype), public :: thisSim
16  
17    logical :: setSim = .false.
18  
19 +  integer,public :: natoms
20  
20  public :: wrap
21    public :: getBox
22    public :: getRcut
23    public :: getRlist
# Line 27 | Line 27 | module simulation
27    public :: isPBC
28    public :: getStringLen
29    public :: returnMixingRules
30 +  public :: doStress
31  
32   !  public :: setRcut
32
33  interface wrap
34     module procedure wrap_1d
35     module procedure wrap_3d
36  end interface
37
33    interface getBox
34       module procedure getBox_3d
35       module procedure getBox_dim
# Line 83 | Line 78 | contains
78      thisBox = thisSim%box(dim)
79    end function getBox_dim
80    
86
87  function wrap_1d(r,dim) result(this_wrap)
88    
89    
90    real( kind = DP ) :: r
91    real( kind = DP ) :: this_wrap
92    integer           :: dim
93    
94    if (use_pbc) then
95       !     this_wrap = r - box(dim)*dsign(1.0E0_DP,r)*int(abs(r/box(dim)) + 0.5E0_DP)
96       this_wrap = r - thisSim%box(dim)*nint(r/thisSim%box(dim))
97    else
98       this_wrap = r
99    endif
100    
101    return
102  end function wrap_1d
103
104  function wrap_3d(r) result(this_wrap)
105    real( kind = dp ), dimension(3), intent(in) :: r
106    real( kind = dp ), dimension(3) :: this_wrap
107
108    
109    if (this_sim%use_pbc) then
110       !     this_wrap = r - box(dim)*dsign(1.0E0_DP,r)*int(abs(r/box(dim)) + 0.5E0_DP)
111       this_wrap = r - thisSim%box*nint(r/thisSim%box)
112    else
113       this_wrap = r
114    endif
115  end function wrap_3d
116
81    
82  
83    subroutine getRcut(thisrcut,rcut2,rcut6,status)
# Line 157 | Line 121 | contains
121  
122    end subroutine getRlist
123    
124 <  
161 <
124 >
125   pure function getNlocal() result(nlocal)
126      integer :: nlocal
127      nlocal = thisSim%nLRparticles
128    end function getNlocal
129  
130 +  function doStress() result(do_stress)
131 +    logical :: do_stress
132 +    do_stress = thisSim%do_stress
133 +  end function doStress
134  
135    function isEnsemble(this_ensemble) result(is_this_ensemble)
136      character(len = *) :: this_ensemble
137 <    logical :: is_this_enemble
137 >    logical :: is_this_ensemble
138      is_this_ensemble = .false.
139      if (this_ensemble == thisSim%ensemble) is_this_ensemble = .true.
140    end function isEnsemble
141 <
141 >  
142    function returnEnsemble() result(thisEnsemble)
143      character (len = len(thisSim%ensemble)) :: thisEnsemble
144      thisEnsemble = thisSim%ensemble
# Line 191 | Line 158 | contains
158    pure function getStringLen() result (thislen)
159      integer :: thislen    
160      thislen = string_len
161 <  end function setStringLen
161 >  end function getStringLen
162  
163   end module simulation

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines