2 |
|
!! Corresponds to the force field defined in lj_FF.cpp |
3 |
|
!! @author Charles F. Vardeman II |
4 |
|
!! @author Matthew Meineke |
5 |
< |
!! @version $Id: lj_FF.F90,v 1.15 2003-01-30 22:29:37 chuckv Exp $, $Date: 2003-01-30 22:29:37 $, $Name: not supported by cvs2svn $, $Revision: 1.15 $ |
5 |
> |
!! @version $Id: lj_FF.F90,v 1.18 2003-02-04 20:16:08 chuckv Exp $, $Date: 2003-02-04 20:16:08 $, $Name: not supported by cvs2svn $, $Revision: 1.18 $ |
6 |
|
|
7 |
|
|
8 |
|
|
124 |
|
|
125 |
|
integer :: thisStat |
126 |
|
integer :: i |
127 |
+ |
|
128 |
+ |
integer :: myNode |
129 |
|
#ifdef IS_MPI |
130 |
|
integer, allocatable, dimension(:) :: identRow |
131 |
|
integer, allocatable, dimension(:) :: identCol |
169 |
|
endif |
170 |
|
nrow = getNrow(plan_row) |
171 |
|
ncol = getNcol(plan_col) |
172 |
< |
|
172 |
> |
mynode = getMyNode() |
173 |
|
!! Allocate temperary arrays to hold gather information |
174 |
|
allocate(identRow(nrow),stat=alloc_stat) |
175 |
|
if (alloc_stat /= 0 ) then |
188 |
|
call gather(ident,identRow,plan_row) |
189 |
|
call gather(ident,identCol,plan_col) |
190 |
|
|
191 |
< |
|
191 |
> |
|
192 |
|
!! Create row and col pointer lists |
193 |
< |
|
193 |
> |
|
194 |
|
call create_IdentPtrlst(identRow,ljListHead,identPtrListRow,thisStat) |
195 |
|
if (thisStat /= 0 ) then |
196 |
|
status = -1 |
197 |
|
return |
198 |
|
endif |
199 |
< |
|
199 |
> |
|
200 |
|
call create_IdentPtrlst(identCol,ljListHead,identPtrListColumn,thisStat) |
201 |
|
if (thisStat /= 0 ) then |
202 |
|
status = -1 |
203 |
|
return |
204 |
|
endif |
205 |
< |
write(*,*) "After createIdent row-col lists" |
205 |
> |
|
206 |
|
!! free temporary ident arrays |
207 |
|
if (allocated(identCol)) then |
208 |
|
deallocate(identCol) |
249 |
|
endif |
250 |
|
isljFFinit = .true. |
251 |
|
|
252 |
+ |
|
253 |
|
end subroutine init_ljFF |
254 |
|
|
255 |
|
|
656 |
|
|
657 |
|
#ifdef IS_MPI |
658 |
|
!!distribute forces |
659 |
+ |
|
660 |
|
call scatter(fRow,f,plan_row3d) |
661 |
|
|
662 |
|
call scatter(fCol,fMPITemp,plan_col3d) |
668 |
|
|
669 |
|
|
670 |
|
if (do_pot) then |
671 |
+ |
|
672 |
|
! scatter/gather pot_row into the members of my column |
673 |
|
call scatter(eRow,eTemp,plan_row) |
674 |
|
|
684 |
|
pe_local = pe_local + eTemp(i) |
685 |
|
enddo |
686 |
|
endif |
687 |
+ |
|
688 |
+ |
pe = pe_local |
689 |
|
endif |
683 |
– |
potE = pe_local |
690 |
|
#endif |
691 |
|
|
692 |
|
potE = pe |
693 |
|
|
688 |
– |
|
689 |
– |
|
690 |
– |
|
694 |
|
end subroutine do_lj_ff |
695 |
|
|
696 |
|
!! Calculates the potential between two lj particles based on two lj_atype pointers, optionally returns second |