ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/simulation_module.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/simulation_module.F90 (file contents):
Revision 491 by mmeineke, Fri Apr 11 18:46:37 2003 UTC vs.
Revision 618 by mmeineke, Tue Jul 15 21:34:56 2003 UTC

# Line 30 | Line 30 | module simulation
30    real(kind=dp), save :: rcut2 = 0.0_DP
31    real(kind=dp), save :: rcut6 = 0.0_DP
32    real(kind=dp), save :: rlist2 = 0.0_DP
33 <  real(kind=dp), public, dimension(3), save :: box
34 <
33 >  real(kind=dp), public, dimension(3,3), save :: Hmat, HmatInv
34 >  logical, public, save :: boxIsOrthorhombic
35    
36    public :: SimulationSetup
37    public :: getNlocal
38    public :: setBox
39  public :: setBox_3d
40  public :: getBox
39    public :: setRcut
40    public :: getRcut
41    public :: getRlist
# Line 54 | Line 52 | module simulation
52    public :: SimRequiresPrepairCalc
53    public :: SimRequiresPostpairCalc
54    public :: SimUsesDirectionalAtoms
57
58  interface getBox
59     module procedure getBox_3d
60     module procedure getBox_1d
61  end interface
55    
63  interface setBox
64     module procedure setBox_3d
65     module procedure setBox_1d
66  end interface
67  
56   contains
57    
58    subroutine SimulationSetup(setThisSim, CnGlobal, CnLocal, c_idents, &
# Line 103 | Line 91 | contains
91      rcut2 = thisSim%rcut * thisSim%rcut
92      rcut6 = rcut2 * rcut2 * rcut2
93      rlist2 = thisSim%rlist * thisSim%rlist
106    box = thisSim%box
94  
95      nExcludes_Global = CnGlobalExcludes
96      nExcludes_Local = CnLocalExcludes
# Line 194 | Line 181 | contains
181      
182    end subroutine SimulationSetup
183    
184 <  subroutine setBox_3d(new_box_size)
185 <    real(kind=dp), dimension(3) :: new_box_size
184 >  subroutine setBox(cHmat, cHmatInv, cBoxIsOrthorhombic)
185 >    real(kind=dp), dimension(3,3) :: cHmat, cHmatInv
186 >    integer :: cBoxIsOrthorhombic
187      integer :: smallest, status, i
188 <
189 <    thisSim%box = new_box_size
190 <    box = thisSim%box
191 <
188 >    
189 >    Hmat = cHmat
190 >    HmatInv = cHmatInv
191 >    if (cBoxIsOrthorhombic .eq. 0 ) then
192 >       boxIsOrthorhombic = .false.
193 >    else
194 >       boxIsOrthorhombic = .true.
195 >    endif
196 >    
197      return    
198 <  end subroutine setBox_3d
198 >  end subroutine setBox
199  
207  subroutine setBox_1d(dim, new_box_size)
208    integer :: dim, status
209    real(kind=dp) :: new_box_size
210    thisSim%box(dim) = new_box_size
211    box(dim) = thisSim%box(dim)
212  end subroutine setBox_1d
213
200    subroutine setRcut(new_rcut, status)
201      real(kind = dp) :: new_rcut
202      integer :: myStatus, status
# Line 220 | Line 206 | contains
206      status = 0
207      return
208    end subroutine setRcut
223
224  function getBox_3d() result(thisBox)
225    real( kind = dp ), dimension(3) :: thisBox
226    thisBox = thisSim%box
227  end function getBox_3d
228  
229  function getBox_1d(dim) result(thisBox)
230    integer, intent(in) :: dim
231    real( kind = dp ) :: thisBox
232    
233    thisBox = thisSim%box(dim)
234  end function getBox_1d
209      
210    subroutine getRcut(thisrcut,rc2,rc6,status)
211      real( kind = dp ), intent(out) :: thisrcut
# Line 271 | Line 245 | contains
245    function getRrf() result(rrf)
246      real( kind = dp ) :: rrf
247      rrf = thisSim%rrf
248 <    write(*,*) 'getRrf = ', rrf, thisSim%rrf
248 >    write(*,*) 'getRrf = ', rrf
249    end function getRrf
250    
251    function getRt() result(rt)
252      real( kind = dp ) :: rt
253      rt = thisSim%rt
254 +    write(*,*) 'getRt = ', rt
255    end function getRt
256  
257    function getDielect() result(dielect)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines