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 |
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 |
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 |
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 |
344 |
|
endif |
345 |
|
|
346 |
|
allocate(excludesGlobal(nExcludes_Global), stat=alloc_stat) |
347 |
+ |
if (alloc_stat /= 0 ) then |
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 |
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) |