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 460 by chuckv, Fri Apr 4 22:22:30 2003 UTC vs.
Revision 482 by chuckv, Tue Apr 8 22:38:43 2003 UTC

# Line 25 | Line 25 | module simulation
25    integer, public, save :: nExcludes_Local = 0
26    integer, allocatable, dimension(:,:), public :: excludesLocal
27    integer, allocatable, dimension(:), public :: excludesGlobal
28 +  integer, allocatable, dimension(:), public :: molMembershipList
29  
30    real(kind=dp), save :: rcut2 = 0.0_DP
31    real(kind=dp), save :: rcut6 = 0.0_DP
# Line 67 | Line 68 | contains
68   contains
69    
70    subroutine SimulationSetup(setThisSim, nComponents, c_idents, &
71 <       CnLocalExcludes, CexcludesLocal, CnGlobalExcludes, CexcludesGlobal, &
71 >       CnLocalExcludes, CexcludesLocal, CnGlobalExcludes, CexcludesGlobal, CmolMembership, &
72         status)    
73  
74      type (simtype) :: setThisSim
# Line 78 | Line 79 | contains
79      integer, dimension(2,CnLocalExcludes), intent(in) :: CexcludesLocal
80      integer :: CnGlobalExcludes
81      integer, dimension(CnGlobalExcludes), intent(in) :: CexcludesGlobal
82 +    integer, dimension(nComponents),intent(in) :: CmolMembership
83      !!  Result status, success = 0, status = -1
84      integer, intent(out) :: status
85      integer :: i, me, thisStat, alloc_stat, myNode
# Line 104 | Line 106 | contains
106  
107      call InitializeForceGlobals(natoms, thisStat)
108      if (thisStat /= 0) then
109 +       write(default_error,*) "SimSetup: InitializeForceGlobals error"
110         status = -1
111         return
112      endif
113  
114      call InitializeSimGlobals(thisStat)
115      if (thisStat /= 0) then
116 +       write(default_error,*) "SimSetup: InitializeSimGlobals error"
117         status = -1
118         return
119      endif
# Line 167 | Line 171 | contains
171      enddo
172   #endif
173  
170    !! Create neighbor lists
171    call expandNeighborList(nComponents, thisStat)
172    if (thisStat /= 0) then
173       status = -1
174       return
175    endif
174  
175  
176      do i = 1, nExcludes_Local
# Line 184 | Line 182 | contains
182         excludesGlobal(i) = CexcludesGlobal(i)
183      enddo
184  
185 +    molMemberShipList = CmolMembership
186 +
187      if (status == 0) simulation_setup_complete = .true.
188      
189    end subroutine SimulationSetup
# Line 348 | Line 348 | contains
348         thisStat = -1
349         return
350      endif
351 +
352 +    allocate(molMembershipList(getNlocal()), stat=alloc_stat)
353 +    if (alloc_stat /= 0 ) then
354 +       thisStat = -1
355 +       return
356 +    endif
357      
358    end subroutine InitializeSimGlobals
359    
# Line 357 | Line 363 | contains
363      
364      if (allocated(excludesGlobal)) deallocate(excludesGlobal)
365      if (allocated(excludesLocal)) deallocate(excludesLocal)
366 <
366 >    if (allocated(molMembershipList)) deallocate(molMembershipList)
367    end subroutine FreeSimGlobals
368  
369    pure function getNlocal() result(nlocal)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines