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.13 2003-01-30 15:20:21 chuckv Exp $, $Date: 2003-01-30 15:20:21 $, $Name: not supported by cvs2svn $, $Revision: 1.13 $ |
5 |
> |
!! @version $Id: lj_FF.F90,v 1.14 2003-01-30 20:03:36 chuckv Exp $, $Date: 2003-01-30 20:03:36 $, $Name: not supported by cvs2svn $, $Revision: 1.14 $ |
6 |
|
|
7 |
|
|
8 |
|
|
131 |
|
integer :: ncol |
132 |
|
#endif |
133 |
|
status = 0 |
134 |
+ |
|
135 |
+ |
|
136 |
+ |
|
137 |
+ |
|
138 |
|
!! if were're not in MPI, we just update ljatypePtrList |
139 |
|
#ifndef IS_MPI |
140 |
|
call create_IdentPtrlst(ident,ljListHead,identPtrList,thisStat) |
158 |
|
|
159 |
|
! if were're in MPI, we also have to worry about row and col lists |
160 |
|
#else |
161 |
+ |
|
162 |
|
! We can only set up forces if mpiSimulation has been setup. |
163 |
|
if (.not. isMPISimSet()) then |
164 |
+ |
write(default_error,*) "MPI is not set" |
165 |
|
status = -1 |
166 |
|
return |
167 |
|
endif |
168 |
< |
nrow = getNrow() |
169 |
< |
ncol = getNcol() |
168 |
> |
nrow = getNrow(plan_row) |
169 |
> |
ncol = getNcol(plan_col) |
170 |
|
!! Allocate temperary arrays to hold gather information |
171 |
|
allocate(identRow(nrow),stat=alloc_stat) |
172 |
|
if (alloc_stat /= 0 ) then |
179 |
|
status = -1 |
180 |
|
return |
181 |
|
endif |
182 |
+ |
|
183 |
|
!! Gather idents into row and column idents |
184 |
+ |
|
185 |
|
call gather(ident,identRow,plan_row) |
186 |
|
call gather(ident,identCol,plan_col) |
187 |
+ |
|
188 |
|
|
189 |
|
!! Create row and col pointer lists |
190 |
< |
call create_IdentPtrlst(identRow,ljListTail,identPtrListRow,thisStat) |
190 |
> |
|
191 |
> |
call create_IdentPtrlst(identRow,ljListHead,identPtrListRow,thisStat) |
192 |
|
if (thisStat /= 0 ) then |
193 |
|
status = -1 |
194 |
|
return |
195 |
|
endif |
196 |
|
|
197 |
< |
call create_IdentPtrlst(identCol,ljListTail,identPtrListColumn,thisStat) |
197 |
> |
call create_IdentPtrlst(identCol,ljListHead,identPtrListColumn,thisStat) |
198 |
|
if (thisStat /= 0 ) then |
199 |
|
status = -1 |
200 |
|
return |
353 |
|
type(lj_atype), pointer :: ljAtype_j |
354 |
|
|
355 |
|
#ifdef IS_MPI |
356 |
< |
real( kind = DP ), dimension(3,getNcol()) :: efr |
356 |
> |
real( kind = DP ), dimension(3,getNcol(plan_col)) :: efr |
357 |
|
real( kind = DP ) :: pot_local |
358 |
|
#else |
359 |
|
real( kind = DP ), dimension(3,getNlocal()) :: efr |
361 |
|
|
362 |
|
!! Local arrays needed for MPI |
363 |
|
#ifdef IS_MPI |
364 |
< |
real(kind = dp), dimension(3:getNrow()) :: qRow |
365 |
< |
real(kind = dp), dimension(3:getNcol()) :: qCol |
364 |
> |
real(kind = dp), dimension(3,getNrow(plan_row)) :: qRow |
365 |
> |
real(kind = dp), dimension(3,getNcol(plan_col)) :: qCol |
366 |
|
|
367 |
< |
real(kind = dp), dimension(3:getNrow()) :: fRow |
368 |
< |
real(kind = dp), dimension(3:getNcol()) :: fCol |
369 |
< |
real(kind = dp), dimension(3:getNlocal()) :: fMPITemp |
367 |
> |
real(kind = dp), dimension(3,getNrow(plan_row)) :: fRow |
368 |
> |
real(kind = dp), dimension(3,getNcol(plan_col)) :: fCol |
369 |
> |
real(kind = dp), dimension(3,getNlocal()) :: fMPITemp |
370 |
|
|
371 |
< |
real(kind = dp), dimension(getNrow()) :: eRow |
372 |
< |
real(kind = dp), dimension(getNcol()) :: eCol |
371 |
> |
real(kind = dp), dimension(getNrow(plan_row)) :: eRow |
372 |
> |
real(kind = dp), dimension(getNcol(plan_col)) :: eCol |
373 |
|
|
374 |
|
real(kind = dp), dimension(getNlocal()) :: eTemp |
375 |
|
#endif |
494 |
|
#ifdef IS_MPI |
495 |
|
! Assign identity pointers and tags |
496 |
|
ljAtype_j => identPtrListColumn(j)%this |
497 |
< |
tag_j = tagCol(j) |
497 |
> |
tag_j = tagColumn(j) |
498 |
|
if (newtons_thrd) then |
499 |
|
if (tag_i <= tag_j) then |
500 |
|
if (mod(tag_i + tag_j,2) == 0) cycle inner |
599 |
|
j = list(jnab) |
600 |
|
#ifdef IS_MPI |
601 |
|
ljAtype_j = identPtrListColumn(j)%this |
602 |
< |
rxij = wrap(rxi - q_col(1,j), 1) |
603 |
< |
ryij = wrap(ryi - q_col(2,j), 2) |
604 |
< |
rzij = wrap(rzi - q_col(3,j), 3) |
602 |
> |
rxij = wrap(rxi - qCol(1,j), 1) |
603 |
> |
ryij = wrap(ryi - qCol(2,j), 2) |
604 |
> |
rzij = wrap(rzi - qCol(3,j), 3) |
605 |
|
#else |
606 |
|
ljAtype_j = identPtrList(j)%this |
607 |
|
rxij = wrap(rxi - q(1,j), 1) |